Skip to content

Commit

Permalink
Merge branch 'v3.x' into v3.362-custom-jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
sergsadovyi authored Aug 4, 2020
2 parents cc7a77e + ff58bdb commit 951253c
Show file tree
Hide file tree
Showing 89 changed files with 6,352 additions and 7,325 deletions.
2 changes: 1 addition & 1 deletion .grunt/grunt-gh-pages/gh-pages/src
Submodule src updated from 81e723 to be2fb1
71 changes: 71 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,77 @@ A record of the changes made to `ALPS V3`.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.6.5]
Added the media block captions and fixed gardients in Safari and background colors for <mark> tags.

### Added:
- Added support for captions in the Page Header - Featured media block. [#486](https://github.com/adventistchurch/alps/issues/486)

### Fixed:
- Fixed the Incorrect color gradients in Safari. [#482](https://github.com/adventistchurch/alps/issues/482)
- Fixed the background color for the <mark> tag and added example pages in search. [#483](https://github.com/adventistchurch/alps/pull/483)
- Fixed an error with the search form not displaying the search button label.

## [3.6.4]
Refactored the Javascript to removed significant unused portions of code, including `moment`, `Moment Duration Format`, and `Modaal` libriaries. This is matching the removal of `Modaal` from the CSS that happened in `3.6.3`.

### Added:
- Trimming the scripts.js file [#464](https://github.com/adventistchurch/alps/issues/464)

## [3.6.3]
Added unique CSS files for each theme.

### Added:
- Added unique CSS files for each theme. [#463](https://github.com/adventistchurch/alps/issues/463)

### Fixed:
- Resized the `background-pattern.png` file.

## [3.6.2]
Dynamic versioning

### Added:
- `versions.json` file with links to all the assets

## [3.6.1]
Fixed the accordion menu not showing.

### Fixed:
- Fixes to accordion content not showing.

## [3.6.0]
Adding search suggestions.

### Added:
- Added molecules, components and style sheets for search suggestions.

## [3.5.7]
### Fixed:
- Fixed bug with the cursor getting changed for the `.c-accordion__item` intead of `.c-accordion__heading`.

## [3.5.6]
### Fixed:
- Fixed bug on `.u-shift--left--1-col--standard` when partial `.hide-sabbath` applies.

## [3.5.5]
### Fixed:
- Fixed bug on `.u-shift--left--1-col--standard` when `.hide-sabbath` applies.
- Fixed the Support for "start" attribute in `<ol>`. [#460](https://github.com/adventistchurch/alps/issues/460)

## [3.5.4]
#### Added:
- Added depth classes for comments. (For Wordpress). [#458](https://github.com/adventistchurch/alps/pull/458)

#### Fixed:
- Fixed the spacing before the blockquotes.

## [3.5.3]
### Added:
- Added `.u-link--no-underline` and `.o-link-wrapper--no-underline a` classes.

## [3.5.2]
### Fixed:
- Updating the blockquote styles to remove certain nested styles.

## [3.5.1]
### Fixed:
Expand Down
120 changes: 95 additions & 25 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
module.exports = function(grunt) {
const sass = require('node-sass');
const semver = require('semver');

module.exports = function (grunt) {
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);

var pkg = grunt.file.readJSON('package.json');
const pkg = grunt.file.readJSON('package.json');

/**
* Major Version and Version Number
Expand All @@ -11,8 +14,37 @@ module.exports = function(grunt) {
* files. This will also create a version directory in the /cdn folder in the structure
* of /cdn/<major_version/<version>/ that contains the javascript and css.
*/
var major_version = "3";
var version = "3.5.1";
const major_version = "3";
const version = "3.6.5";

/**
* Split SCSS files by theme
*
*/
const themes = [
'treefrog',
'ming',
'bluejay',
'iris',
'lily',
'scarlett',
'campfire',
'winter',
'forest',
'cave',
'denim',
'emperor',
'grapevine',
'velvet',
'earth',
'night',
];
const sassFiles = {
'cdn/<%= major_version %>/<%= version %>/css/main.css': 'source/css/main.scss',
};
for (const themeName of themes) {
sassFiles[`cdn/<%= major_version %>/<%= version %>/css/main-${themeName}.css`] = `source/css/main-${themeName}.scss`
}

grunt.initConfig({
pkg: pkg,
Expand All @@ -24,7 +56,7 @@ module.exports = function(grunt) {
failOnError: false,
execOptions: {
maxBuffer: 1024 * 1024 * 64
// maxBuffer: Infinity
// maxBuffer: Infinity
},
},
command: "php core/console --generate",
Expand All @@ -45,6 +77,7 @@ module.exports = function(grunt) {

sass: {
options: {
implementation: sass,
imagePath: 'source/images',
precision: 5
},
Expand All @@ -63,9 +96,7 @@ module.exports = function(grunt) {
outputStyle: 'compressed',
sourceMap: false,
},
files: {
'cdn/<%= major_version %>/<%= version %>/css/main.css': 'source/css/main.scss',
}
files: sassFiles,
}
},

Expand Down Expand Up @@ -150,7 +181,7 @@ module.exports = function(grunt) {
cwd: 'public/v3/patterns/',
src: ['00-atoms*/*', '01-molecules*/*', '02-organisms*/*', '03-templates*/*'],
dest: '../igs-guidelines/_includes/patterns/',
rename: function(dest, src) {
rename: function (dest, src) {
return dest + src.replace(/@inprogress|@complete|@inreview/g, '');
}
},
Expand All @@ -162,7 +193,7 @@ module.exports = function(grunt) {
cwd: 'public/v3/patterns/',
src: ['00-atoms*/*', '01-molecules*/*', '02-organisms*/*', '03-templates*/*'],
dest: '../igs-guidelines/patterns/',
rename: function(dest, src) {
rename: function (dest, src) {
return dest + src.replace(/@inprogress|@complete|@inreview/g, '');
}
},
Expand Down Expand Up @@ -202,12 +233,12 @@ module.exports = function(grunt) {
cwd: 'source/_patterns/',
src: ['**/*.twig'],
dest: 'source/drupal-patterns/',
rename: function(dest, src) {
rename: function (dest, src) {
return dest + src.replace('.twig', '.html.twig');
}
}],
options: {
process: function(content, srcpath) {
process: function (content, srcpath) {
return content.replace(/.twig/g, '.html.twig');
}
}
Expand All @@ -218,17 +249,17 @@ module.exports = function(grunt) {
concat: {
dist: {
files: [{
expand: true,
cwd: 'public/v3/patterns/',
src: ['00-atoms*/*.twig', '01-molecules*/*.twig', '02-organisms*/*.twig', '03-templates*/*.twig'],
dest: '../igs-guidelines/_includes/patterns/'
},
{
expand: true,
cwd: 'public/v3/patterns/',
src: ['00-atoms*/*.twig', '01-molecules*/*.twig', '02-organisms*/*.twig', '03-templates*/*.twig'],
dest: '../igs-guidelines/patterns/'
}
expand: true,
cwd: 'public/v3/patterns/',
src: ['00-atoms*/*.twig', '01-molecules*/*.twig', '02-organisms*/*.twig', '03-templates*/*.twig'],
dest: '../igs-guidelines/_includes/patterns/'
},
{
expand: true,
cwd: 'public/v3/patterns/',
src: ['00-atoms*/*.twig', '01-molecules*/*.twig', '02-organisms*/*.twig', '03-templates*/*.twig'],
dest: '../igs-guidelines/patterns/'
}
]
},
options: {
Expand Down Expand Up @@ -346,7 +377,9 @@ module.exports = function(grunt) {
},
options: {
watchTask: true,
proxy: "alps3.test",
server: {
baseDir: './public'
},
startPath: "/v3"
}
},
Expand Down Expand Up @@ -422,7 +455,8 @@ module.exports = function(grunt) {
'images',
'symlink',
'copy:prod',
'add_comment:prod'
'add_comment:prod',
'versions'
]);

grunt.registerTask('cdn', [
Expand All @@ -442,7 +476,43 @@ module.exports = function(grunt) {
'add_comment:dev'
]);

grunt.registerTask('versions', 'Create a versions.json file', () => {
const versionsFile = 'cdn/3/versions.json';
const changeLogFile = 'CHANGELOG.md';
const changeLogData = grunt.file.read(changeLogFile);

const exprVersions = /^## \[(?<version>[\d.]+)\].*\n(?<description>[^#]*)/gum;
const matches = changeLogData.matchAll(exprVersions);

const versionsData = [];

for (const m of matches) {
const v = m.groups.version;
const desc = m.groups.description ? m.groups.description.trim() : '';

const themesStyle = {};
if (semver.gt(v, '3.6.2')) {
for (const theme of themes) {
themesStyle[theme] = `https://cdn.adventist.org/alps/3/${v}/css/main-${theme}.css`;
}
}

versionsData.push({
version: v,
description: desc,
styles: {
main: `https://cdn.adventist.org/alps/3/${v}/css/main.css`,
themes: themesStyle,
},
scripts: {
main: `https://cdn.adventist.org/alps/3/${v}/js/script.min.js`,
head: `https://cdn.adventist.org/alps/3/${v}/js/head-script.min.js`,
},
});
}

grunt.file.write(versionsFile, JSON.stringify(versionsData, null, 2));
});

/**
* Default Tasks
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ Questions or issues can be [filed as tickets on this repository](https://github.
## Seventh-day Adventist Pattern Lab

## Overview
This repository contains the front-end code for the Seventh Day Adventist project. [Pattern Lab](http://patternlab.io/) is the tool used for pattern template building and pattern library compilation.
This repository contains the front-end code for the Seventh-day Adventist project. [Pattern Lab](http://patternlab.io/) is the tool used for pattern template building and pattern library compilation.

### Getting Started
- Use node -v `v7.2.0`
- `nvm use 7`
- [Install Composer globally](https://getcomposer.org/doc/00-intro.md#globally)
- run `composer install`
- Set up your local dev url to be `alps.test`
- [Install node globally](https://docs.npmjs.com/getting-started/installing-node)

- [Install node globally](https://docs.npmjs.com/getting-started/installing-node) (`node >= v12)`
- run `npm install` (may need to be run as `sudo`)
- run `grunt`
- run `npm run dev`

This creates all patterns, the styleguide, and the pattern lab site as well as a local server for development.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"require": {
"php": ">=5.4",
"pattern-lab/patternengine-twig": "^2.0.0",
"pattern-lab/patternengine-twig": "^2.2.2",
"pattern-lab/styleguidekit-twig-default": "^3.0.0",
"pattern-lab/plugin-data-inheritance": "^1.0"
},
Expand Down
Loading

0 comments on commit 951253c

Please sign in to comment.