Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 2faae13

Browse files
committed
initial commit of main edition files
did not test yet
1 parent 68a8605 commit 2faae13

File tree

125 files changed

+12716
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+12716
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
tab_width = 2
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true

.eslintrc

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"builtin": true
5+
},
6+
"globals": {},
7+
"rules": {
8+
"block-scoped-var": 0,
9+
"camelcase": 0,
10+
"comma-spacing": [1, {"before": false, "after": true}],
11+
"consistent-return": 2,
12+
"curly": [2, "all"],
13+
"dot-notation": [1, { "allowKeywords": true }],
14+
"eqeqeq": [2, "allow-null"],
15+
"global-strict": [0, "never"],
16+
"guard-for-in": 2,
17+
"indent": [1, 2, {"SwitchCase": 1, "VariableDeclarator": 1}],
18+
"lines-around-comment": [1, {
19+
"beforeBlockComment": true,
20+
"beforeLineComment": true,
21+
"allowBlockStart": true,
22+
"allowObjectStart": true,
23+
"allowArrayStart": true
24+
}],
25+
"key-spacing": 0,
26+
"keyword-spacing": 1,
27+
"new-cap": 0,
28+
"no-alert": 2,
29+
"no-bitwise": 2,
30+
"no-caller": 2,
31+
"no-cond-assign": [2, "except-parens"],
32+
"no-debugger": 2,
33+
"no-dupe-args": 2,
34+
"no-dupe-keys": 2,
35+
"no-empty": 2,
36+
"no-eval": 2,
37+
"no-extend-native": 2,
38+
"no-extra-bind": 2,
39+
"no-extra-parens": 0,
40+
"no-extra-semi": 2,
41+
"no-func-assign": 2,
42+
"no-implied-eval": 2,
43+
"no-invalid-regexp": 2,
44+
"no-irregular-whitespace": 1,
45+
"no-iterator": 2,
46+
"no-loop-func": 2,
47+
"no-mixed-requires": 0,
48+
"no-multi-str": 2,
49+
"no-multi-spaces": 1,
50+
"no-native-reassign": 2,
51+
"no-new": 2,
52+
"no-param-reassign": 1,
53+
"no-proto": 2,
54+
"no-redeclare": 0,
55+
"no-script-url": 2,
56+
"no-self-assign": 2,
57+
"no-self-compare": 2,
58+
"no-sequences": 2,
59+
"no-shadow": 2,
60+
"no-undef": 2,
61+
"no-underscore-dangle": 0,
62+
"no-unreachable": 1,
63+
"no-unused-vars": 1,
64+
"no-use-before-define": 1,
65+
"no-useless-call": 2,
66+
"no-useless-concat": 2,
67+
"no-with": 2,
68+
"quotes": [0, "single"],
69+
"radix": 2,
70+
"semi": [0, "never"],
71+
"strict": 0,
72+
"space-before-blocks": 1,
73+
"space-before-function-paren": [1, {
74+
"anonymous": "always",
75+
"named": "never"
76+
}],
77+
"space-in-parens": [1, "never"],
78+
"space-infix-ops": 1,
79+
"valid-typeof": 2,
80+
"vars-on-top": 0,
81+
"wrap-iife": [2, "inside"]
82+
}
83+
}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules/
2+
.DS_Store
3+
patternlab.json
4+
.sass-cache/*
5+
/sass-cache
6+
Thumbs.db
7+
.idea/
8+
public

Gruntfile.js

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
module.exports = function (grunt) {
2+
3+
var path = require('path');
4+
5+
function paths() {
6+
return require('./patternlab-config.json').paths;
7+
}
8+
9+
// Project configuration.
10+
grunt.initConfig({
11+
pkg: grunt.file.readJSON('package.json'),
12+
copy: {
13+
main: {
14+
files: [
15+
{ expand: true, cwd: path.resolve(paths().source.js), src: '*.js', dest: path.resolve(paths().public.js) },
16+
{ expand: true, cwd: path.resolve(paths().source.css), src: '*.css', dest: path.resolve(paths().public.css) },
17+
{ expand: true, cwd: path.resolve(paths().source.images), src: ['**/*.png', '**/*.jpg', '**/*.gif', '**/*.jpeg'], dest: path.resolve(paths().public.images) },
18+
{ expand: true, cwd: path.resolve(paths().source.fonts), src: '*', dest: path.resolve(paths().public.fonts) },
19+
{ expand: true, cwd: path.resolve(paths().source.data), src: 'annotations.js', dest: path.resolve(paths().public.data) }
20+
]
21+
},
22+
styleguide: {
23+
files: [
24+
{ expand: true, cwd: path.resolve(paths().source.styleguide), src: ['*.*', '**/*.*'], dest: path.resolve(paths().public.styleguide) }
25+
]
26+
}
27+
},
28+
watch: {
29+
all: {
30+
files: [
31+
path.resolve(paths().source.css + '**/*.css'),
32+
path.resolve(paths().source.styleguide + 'css/*.css'),
33+
path.resolve(paths().source.patterns + '**/*'),
34+
path.resolve(paths().source.fonts + '/*'),
35+
path.resolve(paths().source.images + '/*'),
36+
path.resolve(paths().source.data + '*.json'),
37+
path.resolve(paths().source.js + '/*.js')
38+
],
39+
tasks: ['default', 'bsReload:css']
40+
}
41+
},
42+
browserSync: {
43+
dev: {
44+
options: {
45+
server: path.resolve(paths().public.root),
46+
watchTask: true,
47+
watchOptions: {
48+
ignoreInitial: true,
49+
ignored: '*.html'
50+
},
51+
snippetOptions: {
52+
// Ignore all HTML files within the templates folder
53+
blacklist: ['/index.html', '/', '/?*']
54+
},
55+
plugins: [
56+
{
57+
module: 'bs-html-injector',
58+
options: {
59+
files: [path.resolve(paths().public.root + '/index.html'), path.resolve(paths().public.styleguide + '/styleguide.html')]
60+
}
61+
}
62+
],
63+
notify: {
64+
styles: [
65+
'display: none',
66+
'padding: 15px',
67+
'font-family: sans-serif',
68+
'position: fixed',
69+
'font-size: 1em',
70+
'z-index: 9999',
71+
'bottom: 0px',
72+
'right: 0px',
73+
'border-top-left-radius: 5px',
74+
'background-color: #1B2032',
75+
'opacity: 0.4',
76+
'margin: 0',
77+
'color: white',
78+
'text-align: center'
79+
]
80+
}
81+
}
82+
}
83+
},
84+
bsReload: {
85+
css: path.resolve(paths().public.root + '**/*.css')
86+
}
87+
});
88+
89+
// load all grunt tasks
90+
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
91+
92+
//load the patternlab task
93+
require('./core/lib/patternlab_grunt')(grunt);
94+
95+
grunt.registerTask('default', ['patternlab', 'copy:main', 'copy:styleguide']);
96+
97+
grunt.registerTask('serve', ['patternlab', 'copy:main', 'copy:styleguide', 'browserSync', 'watch:all']);
98+
99+
};

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Pattern Lab
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "edition-node-grunt",
3+
"description": "The grunt wrapper around patternlab-node core.",
4+
"version": "0.1.0",
5+
"main": "./core/lib/patternlab.js",
6+
"dependencies": {
7+
"bs-html-injector": "^3.0.0",
8+
"grunt": "~1.0.1",
9+
"grunt-browser-sync": "^2.2.0",
10+
"grunt-contrib-watch": "^1.0.0",
11+
"grunt-contrib-copy": "^1.0.0",
12+
"patternlab-node": "pattern-lab/patternlab-node#dev-2.0-core",
13+
"matchdep": "^1.0.0",
14+
"mustache": "^2.2.0",
15+
"handlebars": "^4.0.5",
16+
"underscore": "^1.8.3",
17+
"twig": "^0.9.5"
18+
},
19+
"keywords": [
20+
"Pattern Lab",
21+
"Atomic Web Design",
22+
"Node",
23+
"Grunt",
24+
"Javascript"
25+
],
26+
"repository": {
27+
"type": "git",
28+
"url": "git://github.com/pattern-lab/edition-node-grunt.git"
29+
},
30+
"bugs": "https://github.com/pattern-lab/edition-node-grunt/issues",
31+
"author": "Brian Muenzenmeyer",
32+
"license": "MIT",
33+
"engines": {
34+
"node": ">=5.0"
35+
}
36+
}

patternlab-config.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"paths" : {
3+
"source" : {
4+
"root": "./source/",
5+
"patterns" : "./source/_patterns/",
6+
"data" : "./source/_data/",
7+
"annotations" : "./source/_annotations/",
8+
"styleguide" : "./node_modules/styleguidekit-assets-default/dist/",
9+
"patternlabFiles" : "./node_modules/styleguidekit-mustache-default/views/",
10+
"js" : "./source/js",
11+
"images" : "./source/images",
12+
"fonts" : "./source/fonts",
13+
"css" : "./source/css/"
14+
},
15+
"public" : {
16+
"root" : "./public/",
17+
"patterns" : "./public/patterns/",
18+
"data" : "./public/styleguide/data/",
19+
"annotations" : "./public/annotations/",
20+
"styleguide" : "./public/styleguide/",
21+
"js" : "./public/js",
22+
"images" : "./public/images",
23+
"fonts" : "./public/fonts",
24+
"css" : "./public/css"
25+
}
26+
},
27+
"styleGuideExcludes": [
28+
"templates",
29+
"pages"
30+
],
31+
"defaultPattern": "all",
32+
"patternExtension": "mustache",
33+
"ignored-extensions" : ["scss", "DS_Store", "less"],
34+
"ignored-directories" : ["scss"],
35+
"debug": false,
36+
"ishControlsHide": {
37+
"s": false,
38+
"m": false,
39+
"l": false,
40+
"full": false,
41+
"random": false,
42+
"disco": false,
43+
"hay": true,
44+
"mqs": false,
45+
"find": false,
46+
"views-all": false,
47+
"views-annotations": false,
48+
"views-code": false,
49+
"views-new": false,
50+
"tools-all": false,
51+
"tools-docs": false
52+
},
53+
"ishMinimum": "240",
54+
"ishMaximum": "2600",
55+
"patternStateCascade": ["inprogress", "inreview", "complete"],
56+
"patternStates": {
57+
"molecules-single-comment" : "complete",
58+
"organisms-sticky-comment" : "inreview",
59+
"templates-article" : "complete"
60+
},
61+
"patternExportPatternPartials": [],
62+
"patternExportDirectory": "./pattern_exports/",
63+
"baseurl" : "",
64+
"cacheBust": true
65+
}

source/_annotations/annotations.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
var comments = {
2+
"comments" : [
3+
{
4+
"el": "header[role=banner]",
5+
"title" : "Masthead",
6+
"comment": "The main header of the site doesn't take up too much screen real estate in order to keep the focus on the core content. It's using a linear CSS gradient instead of a background image to give greater design flexibility and reduce HTTP requests."
7+
},
8+
{
9+
"el": ".logo",
10+
"title" : "Logo",
11+
"comment": "The logo image is an SVG file, which ensures that the logo displays crisply even on high resolution displays. A PNG fallback is provided for browsers that don't support SVG images.</p><p>Further reading: <a href=\"http://bradfrostweb.com/blog/mobile/hi-res-optimization/\">Optimizing Web Experiences for High Resolution Screens</a></p>"
12+
},
13+
{
14+
"el": "#nav",
15+
"title" : "Navigation",
16+
"comment": "<p>Navigation for adaptive web experiences can be tricky. Top navigations are typical on desktop sites, but mobile screen sizes don't give us the luxury of space. We're dealing with this situation by creating a simple menu anchor that toggles the main navigation on small screens. This is just one method. <a href=\"http://bagcheck.com/\">Bagcheck</a> and <a href=\"http://contentsmagazine.com/\">Contents Magazine</a> add an anchor in the header that jumps users to the navigation which is placed in the footer. This solution works well because it doesn't require any Javascript in order to work. Other methods exist too. For example, <a href=\"http://m.espn.com\">ESPN's mobile navigation</a> overlays the main content of the page.</p><p>The nav is only hidden when a certain level of javascript is supported in order to ensure that users with little/poor javascript support can still access the navigation. Once the screen size is large enough to accommodate the nav, we show the main navigation links and hide the menu anchor.<p><p>See also: <a href=\"http://bradfrostweb.com/blog/web/responsive-nav-patterns/\">Responsive Navigation Patterns</a></p>"
17+
},
18+
{
19+
"el": ".search-form",
20+
"title" : "Search",
21+
"comment": "<p>Search is an incredibly important priority, especially for mobile. It is a great idea to give users the ability to jump directly to what they are looking for without forcing them to wade through your site's navigation. Check out the <a href=\"http://burton.com\">Burton</a> and <a href=\"http://yelp.com\">Yelp</a> mobile sites for great examples of experiences that prioritize search.</p><p>We're also using the <a href=\"http://dev.w3.org/html5/markup/input.search.html\">HTML5 search input type</a>, which is great for mobile devices that can <a href=\"http://diveintohtml5.info/forms.html\">bring up the appropriate virtual keyboard</a> for many smartphones. And like the main header navigation, we're hiding the search form on small screens to save space. Clicking the search anchor toggles the form. </p>"
22+
},
23+
{
24+
"el": ".article-header h1",
25+
"title" : "Article Header",
26+
"comment": "<p>The article header should be no more than 140 characters. </p>"
27+
},
28+
{
29+
"el": ".block-hero",
30+
"title" : "Hero",
31+
"comment": "<p>The hero area highlights one major story using a large image and a captivating headline.</p>"
32+
}
33+
]
34+
};

0 commit comments

Comments
 (0)