├── .babelrc ├── .browserslistrc ├── .gitignore ├── .nvmrc ├── .prettierrc ├── README.md ├── gulp ├── config.js └── tasks │ ├── browserSync.js │ ├── build.js │ ├── clean.js │ ├── default.js │ ├── fonts.js │ ├── icons.js │ ├── images.js │ ├── rev.js │ ├── rootfiles.js │ ├── scripts.js │ ├── styles.js │ ├── svg.js │ ├── templates.js │ ├── utils.js │ └── watch.js ├── gulpfile.js ├── package.json ├── src ├── assets │ ├── fonts │ │ └── .keep │ ├── icons │ │ └── .keep │ ├── img │ │ └── .keep │ ├── js │ │ ├── app.js │ │ ├── components │ │ │ └── .keep │ │ └── utils │ │ │ └── .kepp │ └── scss │ │ ├── _settings.scss │ │ ├── app.scss │ │ ├── atoms │ │ ├── _a_button.scss │ │ ├── _a_input_checkbox.scss │ │ ├── _a_input_radio.scss │ │ ├── _a_input_select.scss │ │ ├── _a_input_text.scss │ │ ├── _a_input_textarea.scss │ │ └── _a_label.scss │ │ ├── base │ │ ├── _b_font_face.scss │ │ ├── _b_normalize.scss │ │ └── _b_reset.scss │ │ ├── layout │ │ ├── _l_app.scss │ │ ├── _l_grid.scss │ │ └── _l_wrapper.scss │ │ ├── molecules │ │ ├── _m_content.scss │ │ ├── _m_form.scss │ │ └── _m_form_inline.scss │ │ ├── pages │ │ └── .keep │ │ ├── styleguide.scss │ │ ├── tools │ │ ├── _function.scss │ │ └── _mixin.scss │ │ └── utils │ │ ├── _u_layout.scss │ │ ├── _u_show_hide.scss │ │ ├── _u_spacing.scss │ │ ├── _u_text.scss │ │ ├── _u_text_color.scss │ │ └── _u_width.scss ├── rootfiles │ ├── .htaccess │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ └── robots.txt └── template │ ├── config.pug │ ├── layout │ ├── base.pug │ ├── styleguide.pug │ └── summary.pug │ ├── mixins │ └── mixins.pug │ ├── pages │ ├── home.pug │ ├── index.pug │ └── styleguide │ │ ├── atoms │ │ ├── a-button.pug │ │ ├── a-input-checkbox.pug │ │ ├── a-input-radio.pug │ │ ├── a-input-select.pug │ │ ├── a-input-text.pug │ │ ├── a-input-textarea.pug │ │ └── a-label.pug │ │ ├── index.pug │ │ ├── layout │ │ ├── l-grid.pug │ │ └── l-wrapper.pug │ │ ├── molecules │ │ ├── m-content.pug │ │ ├── m-form-inline.pug │ │ └── m-form.pug │ │ └── utils │ │ ├── u-layout.pug │ │ ├── u-show-hide.pug │ │ ├── u-spacing.pug │ │ ├── u-text-color.pug │ │ ├── u-text.pug │ │ └── u-width.pug │ └── partials │ ├── footer.pug │ ├── head.pug │ └── header.pug ├── webpack ├── webpack.config.base.js ├── webpack.config.dev.js └── webpack.config.prod.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env"] 3 | } 4 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | last 2 version 2 | > 1% 3 | IE 10 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OSX 2 | .DS_Store 3 | 4 | # IDE 5 | .idea 6 | *.iml 7 | *.sublime-project 8 | *.sublime-workspace 9 | 10 | # Npm & yarn 11 | /npm-debug.log 12 | node_modules 13 | yarn-error.log 14 | 15 | # Generated folder 16 | dist 17 | 18 | # Generated SVG sprite 19 | src/assets/icons/symbol 20 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v8.12.0 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "useTabs": false, 4 | "printWidth": 80, 5 | "tabWidth": 2, 6 | "singleQuote": false 7 | } 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 1. Hello Front 2 | 3 | Boilerplate SCSS / PUG / ES6 for clean and fast Front-end project. 4 | 5 | * Démo : [https://hellofront.netlify.com/](https://hellofront.netlify.com/) 6 | 7 | 8 | Work on **src/** folder and gulp build in **dist/**. 9 | 10 | 11 | 12 | - [1. Hello Front](#1-hello-front) 13 | - [1.1. Installation](#11-installation) 14 | - [1.1.1. Node version manager](#111-node-version-manager) 15 | - [1.1.2. Install Sass](#112-install-sass) 16 | - [1.1.3. Install Yarn](#113-install-yarn) 17 | - [1.1.4. Install Gulp](#114-install-gulp) 18 | - [1.1.5. Download the dependencies NPM](#115-download-the-dependencies-npm) 19 | - [1.1.6. Install Tooling](#116-install-tooling) 20 | - [1.2. Commands](#12-commands) 21 | - [1.2.1. Run project](#121-run-project) 22 | - [1.2.2. Build project](#122-build-project) 23 | - [1.2.3. Optimize SVG](#123-optimize-svg) 24 | - [1.2.4. Clean project](#124-clean-project) 25 | - [1.3. How it works](#13-how-it-works) 26 | - [1.3.1. Works with SCSS](#131-works-with-scss) 27 | - [1.3.2. Works with Pug templating](#132-works-with-pug-templating) 28 | - [1.3.3. Works with JavaScript](#133-works-with-javascript) 29 | - [1.3.4. Working with Images](#134-working-with-images) 30 | - [1.3.5. Working with Fonts](#135-working-with-fonts) 31 | - [1.3.6. Working width SVG Sprite](#136-working-width-svg-sprite) 32 | 33 | 34 | 35 | ## 1.1. Installation 36 | 37 | ### 1.1.1. Node version manager 38 | 39 | Install [NVM](https://github.com/creationix/nvm) 40 | 41 | ```bash 42 | nvm use 43 | ``` 44 | 45 | ### 1.1.2. Install Sass 46 | 47 | Go to [sass-lang.com/install](http://sass-lang.com/install) for installation in 48 | command line. 49 | 50 | ### 1.1.3. Install Yarn 51 | 52 | Go to 53 | [https://yarnpkg.com/docs/install](https://yarnpkg.com/docs/install/#mac-tab) 54 | 55 | ### 1.1.4. Install Gulp 56 | 57 | Go to [https://gulpjs.com/](https://gulpjs.com/) 58 | 59 | ### 1.1.5. Download the dependencies NPM 60 | 61 | ```bash 62 | yarn install 63 | ``` 64 | 65 | ### 1.1.6. Install Tooling 66 | 67 | Use [Prettier](https://github.com/prettier/prettier) for clean your **JS** / 68 | **SCSS** files. 69 | 70 | Plugin for IDE : 71 | 72 | - [Visual Code Studio](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) 73 | - [Atom](https://atom.io/packages/prettier-atom) 74 | - [Sublime text](https://github.com/danreeves/sublime-prettier) 75 | 76 | ## 1.2. Commands 77 | 78 | ### 1.2.1. Run project 79 | 80 | ```bash 81 | yarn dev 82 | ``` 83 | 84 | ### 1.2.2. Build project 85 | 86 | ```bash 87 | yarn build 88 | ``` 89 | 90 | ### 1.2.3. Optimize SVG 91 | 92 | ```bash 93 | yarn svg 94 | ``` 95 | 96 | ### 1.2.4. Clean project 97 | 98 | ```bash 99 | yarn reset 100 | ``` 101 | 102 | ## 1.3. How it works 103 | 104 | ### 1.3.1. Works with SCSS 105 | 106 | Use [atomic design](http://bradfrost.com/blog/post/atomic-web-design/) design for orgaznise components 107 | 108 | The SCSS files are located in `./src/assets/scss`. 109 | 110 | Example SCSS hierarchy : 111 | 112 | - **base/** : Unclassed HTML elements (type selector) 113 | - **atoms/** : Atoms are the basic building blocks of matter (button, input, etc.) 114 | - **molecules/** : Molecules are groups of atoms bonded together and are the smallest fundamental units of a compound (from, cards, etc.) 115 | - **layout/** : Layout are the basic elment for build layout. 116 | - **page/** : Pages are specific instances of templates 117 | - **tools/** : Default mixin and functions 118 | - **utils/** : Helpers and overrides 119 | - **\_settings.scss** : Global variables 120 | - **app.scss** : Main stylesheet 121 | 122 | Use the [BEM](http://getbem.com/introduction/) namming convention. 123 | 124 | ### 1.3.2. Works with Pug templating 125 | 126 | The PUG files are located in `./src/template` 127 | 128 | - **layout** : layout of html files generated 129 | - **mixin** : for reusable pattern 130 | - **pages** : the content of html files generated 131 | - **partial** : includes of html pattern 132 | - **config.pug** : global variables 133 | 134 | ### 1.3.3. Works with JavaScript 135 | 136 | The Javascript files are located in `./src/assets/js`. 137 | 138 | **Use the ES6 syntaxe** Babel convert it in ES5 for you via webpack. 139 | 140 | ### 1.3.4. Working with Images 141 | 142 | The Image files are located in `./src/assets/img` 143 | 144 | Accepted file formats : - jpg - png - gif - svg 145 | 146 | ### 1.3.5. Working with Fonts 147 | 148 | The font files are located in `./src/assets/font` 149 | 150 | ### 1.3.6. Working width SVG Sprite 151 | 152 | The svg files for sprite are located in `./src/assets/icons`. 153 | 154 | Uncomment the line 11 of the file `./src/template/layout/base.pug` to include them in the basic layout. 155 | 156 | A PUG mixin is planned for use: 157 | 158 | ```pug 159 | +icon('name-of-file', 'my-css-class') 160 | ``` 161 | -------------------------------------------------------------------------------- /gulp/config.js: -------------------------------------------------------------------------------- 1 | const src = "./src"; 2 | const dist = "./dist"; 3 | const fontName = "app-font"; 4 | const assets_dist = "./dist/assets"; 5 | 6 | module.exports = { 7 | src: src, 8 | dist: dist, 9 | assets_dist: assets_dist, 10 | 11 | browserSync: { 12 | notify: false, 13 | open: false, 14 | server: dist, 15 | files: [dist + "/**/*.css"], 16 | }, 17 | 18 | styles: { 19 | src: src + "/assets/scss", 20 | files_src: src + "/assets/scss/**/*.scss", 21 | dist: assets_dist, 22 | }, 23 | 24 | scripts: { 25 | files_src: src + "/assets/js/**/*.js", 26 | main_src: src + "/assets/js/main.js", 27 | main_name: "main.js", 28 | dist: assets_dist, 29 | }, 30 | 31 | templates: { 32 | src: src + "/template", 33 | files_src: [src + "/template/**/*.pug", src + "/template/**/*.md"], 34 | page_src: src + "/template/pages/**/*.pug", 35 | dist: dist, 36 | files_dist: dist + "/**/*.html", 37 | }, 38 | 39 | icons: { 40 | dir: src + "/assets/icons/", 41 | src_files: [ 42 | `${src}/assets/icons/**/*.svg`, 43 | `!${src}/assets/icons/symbol/**/*`, 44 | ], 45 | }, 46 | 47 | svg: { 48 | files_src: [ 49 | "!" + src + "/assets/img/sprite/**/*.svg", 50 | "!" + src + "/assets/img/sprite.svg", 51 | src + "/assets/img/**/*.svg", 52 | ], 53 | dist: src + "/assets/img", 54 | }, 55 | 56 | images: { 57 | files_src: [ 58 | "!" + src + "/assets/img/sprite/**/*.svg", 59 | "!" + src + "/assets/img/sprite.svg", 60 | src + "/assets/img/**/*.{jpg,png,gif, svg}", 61 | ], 62 | dist: assets_dist, 63 | }, 64 | 65 | rootfiles: { 66 | src: src + "/rootfiles/**", 67 | dist: dist, 68 | }, 69 | 70 | fonts: { 71 | src: src + "/assets/fonts/**", 72 | dist: assets_dist, 73 | }, 74 | }; 75 | -------------------------------------------------------------------------------- /gulp/tasks/browserSync.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config").browserSync; 3 | const browserSync = require("browser-sync"); 4 | const reload = browserSync.reload; 5 | 6 | gulp.task("browserSync", () => { 7 | browserSync(config); 8 | }); 9 | 10 | gulp.task("browserSync-reload", () => { 11 | browserSync.reload(); 12 | }); 13 | -------------------------------------------------------------------------------- /gulp/tasks/build.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const runSequence = require("run-sequence"); 3 | 4 | gulp.task("build", callback => { 5 | runSequence( 6 | "clean", 7 | "svg", 8 | "icons", 9 | ["styles", "templates", "images", "rootfiles", "fonts", "scripts"], 10 | callback 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /gulp/tasks/clean.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const del = require("del"); 3 | const config = require("../config"); 4 | 5 | gulp.task("clean", del.bind(null, [config.dist])); 6 | -------------------------------------------------------------------------------- /gulp/tasks/default.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config"); 3 | const browserSync = require("browser-sync"); 4 | const runSequence = require("run-sequence"); 5 | 6 | gulp.task("default", callback => { 7 | process.WATCH_SCRIPTS = true; 8 | runSequence("build", "browserSync", "watch", callback); 9 | }); 10 | -------------------------------------------------------------------------------- /gulp/tasks/fonts.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config").fonts; 3 | 4 | gulp.task("fonts", () => { 5 | return gulp.src(config.src).pipe(gulp.dest(config.dist)); 6 | }); 7 | -------------------------------------------------------------------------------- /gulp/tasks/icons.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config").icons; 3 | const utils = require("./utils"); 4 | const imagemin = require("gulp-imagemin"); 5 | const svgSprite = require("gulp-svg-sprite"); 6 | const rename = require("gulp-rename"); 7 | 8 | gulp.task("icons", () => { 9 | if (utils.checkDirectoryForExt(config.dir, ".svg")) { 10 | return gulp 11 | .src(config.src_files) 12 | .pipe(rename({ prefix: "spriteIcon-" })) 13 | .pipe( 14 | imagemin( 15 | [ 16 | imagemin.svgo({ 17 | plugins: [{ removeViewBox: false }, { removeDimensions: false }], 18 | }), 19 | ], 20 | { 21 | verbose: true, 22 | } 23 | ) 24 | ) 25 | .pipe( 26 | svgSprite({ 27 | mode: { 28 | symbol: { 29 | dest: config.dest, 30 | sprite: "icons.svg", 31 | inline: true, 32 | }, 33 | }, 34 | }) 35 | ) 36 | .pipe(gulp.dest(config.dir)); 37 | } else 38 | console.info( 39 | "Icon source folder is empty, skipping svg sprite icon creation" 40 | ); 41 | }); 42 | -------------------------------------------------------------------------------- /gulp/tasks/images.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config").images; 3 | const imagemin = require("gulp-imagemin"); 4 | const size = require("gulp-size"); 5 | const plumber = require("gulp-plumber"); 6 | const notify = require("gulp-notify"); 7 | 8 | gulp.task("images", () => { 9 | return gulp 10 | .src(config.files_src) 11 | .pipe( 12 | plumber({ 13 | errorHandler: notify.onError("Images Error: <%= error.message %>"), 14 | }) 15 | ) 16 | .pipe( 17 | imagemin( 18 | [ 19 | imagemin.gifsicle({ interlaced: true }), 20 | imagemin.jpegtran({ progressive: true }), 21 | imagemin.optipng({ optimizationLevel: 5 }), 22 | imagemin.svgo({ 23 | plugins: [{ removeViewBox: false }, { removeDimensions: false }], 24 | }), 25 | ], 26 | { 27 | verbose: true, 28 | } 29 | ) 30 | ) 31 | .pipe( 32 | size({ 33 | title: "image", 34 | }) 35 | ) 36 | .pipe(gulp.dest(config.dist)); 37 | }); 38 | -------------------------------------------------------------------------------- /gulp/tasks/rev.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config"); 3 | const rev = require("gulp-rev"); 4 | const revdel = require("gulp-rev-delete-original"); 5 | const revReplace = require("gulp-rev-replace"); 6 | 7 | gulp.task("rev", () => { 8 | console.log([config.assets_dist + "/**.css", config.assets_dist + "/**.js"]); 9 | return gulp 10 | .src([config.assets_dist + "/**.css", config.assets_dist + "/**.js"], { 11 | dot: true, 12 | }) 13 | .pipe(rev()) 14 | .pipe(revdel()) 15 | .pipe(gulp.dest(config.assets_dist)) 16 | .pipe(rev.manifest()) 17 | .pipe(gulp.dest(config.assets_dist)); 18 | }); 19 | 20 | gulp.task("revreplace", () => { 21 | const manifest = gulp.src(config.assets_dist + "/rev-manifest.json"); 22 | return gulp 23 | .src(config.dist + "/**/*.html") 24 | .pipe(revReplace({ manifest: manifest })) 25 | .pipe(gulp.dest(config.dist)); 26 | }); 27 | -------------------------------------------------------------------------------- /gulp/tasks/rootfiles.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config").rootfiles; 3 | 4 | gulp.task("rootfiles", () => { 5 | return gulp 6 | .src(config.src, { 7 | dot: true, 8 | }) 9 | .pipe(gulp.dest(config.dist)); 10 | }); 11 | -------------------------------------------------------------------------------- /gulp/tasks/scripts.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const webpack = require("webpack-stream"); 3 | const config = require("../config").scripts; 4 | const named = require("vinyl-named"); 5 | const browserSync = require("browser-sync"); 6 | const gutil = require("gulp-util"); 7 | const plumber = require("gulp-plumber"); 8 | const options = require("minimist")(process.argv.slice(2)); 9 | 10 | const webpackConfig = options.production 11 | ? require("../../webpack/webpack.config.prod") 12 | : require("../../webpack/webpack.config.dev"); 13 | 14 | const webpackChangeHandler = (_, stats) => { 15 | gutil.log( 16 | "[webpack]", 17 | stats.toString({ 18 | hash: false, 19 | timings: true, 20 | chunks: false, 21 | chunkModules: false, 22 | modules: false, 23 | children: false, 24 | version: false, 25 | cached: false, 26 | cachedAssets: false, 27 | reasons: false, 28 | source: false, 29 | errorDetails: false, 30 | }) 31 | ); 32 | browserSync.reload(); 33 | }; 34 | 35 | gulp.task("scripts", () => { 36 | if (process.WATCH_SCRIPTS) webpackConfig.watch = true; 37 | 38 | const webpackStream = gulp 39 | .src(config.main_src) 40 | .pipe( 41 | plumber({ 42 | errorHandler: gutil.noop, // prevent double errors in console 43 | }) 44 | ) 45 | .pipe(named()) 46 | .pipe(webpack(webpackConfig, null, webpackChangeHandler)) 47 | .pipe(gulp.dest(config.dist)); 48 | 49 | if (!process.WATCH_SCRIPTS) { 50 | return webpackStream; // return the stream if scripts watch is disabled to properly finish the script tasks 51 | } 52 | }); 53 | -------------------------------------------------------------------------------- /gulp/tasks/styles.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config"); 3 | const fs = require("fs"); 4 | const sass = require("gulp-sass"); 5 | const plumber = require("gulp-plumber"); 6 | const autoprefixer = require("gulp-autoprefixer"); 7 | const notify = require("gulp-notify"); 8 | const sourcemaps = require("gulp-sourcemaps"); 9 | const gutil = require("gulp-util"); 10 | const size = require("gulp-size"); 11 | const cssnano = require("gulp-cssnano"); 12 | const options = require("minimist")(process.argv.slice(2)); 13 | 14 | gulp.task("styles", () => { 15 | return gulp 16 | .src(config.styles.files_src) 17 | .pipe( 18 | plumber({ 19 | errorHandler: notify.onError("SASS Error: <%= error.message %>"), 20 | }) 21 | ) 22 | .pipe(!options.production ? sourcemaps.init() : gutil.noop()) 23 | .pipe(sass({ precision: 10 })) 24 | .pipe( 25 | autoprefixer({ 26 | cascade: false, 27 | }) 28 | ) 29 | .pipe(!options.production ? sourcemaps.write(".") : gutil.noop()) 30 | .pipe(options.production ? cssnano() : gutil.noop()) 31 | .pipe(size({ title: "style" })) 32 | .pipe(gulp.dest(config.styles.dist)); 33 | }); 34 | -------------------------------------------------------------------------------- /gulp/tasks/svg.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config").svg; 3 | const imagemin = require("gulp-imagemin"); 4 | const size = require("gulp-size"); 5 | const plumber = require("gulp-plumber"); 6 | const notify = require("gulp-notify"); 7 | 8 | gulp.task("svg", () => { 9 | return gulp 10 | .src(config.files_src) 11 | .pipe( 12 | plumber({ 13 | errorHandler: notify.onError("SVG Error: <%= error.message %>"), 14 | }) 15 | ) 16 | .pipe( 17 | imagemin( 18 | [ 19 | imagemin.svgo({ 20 | plugins: [{ removeViewBox: false }, { removeDimensions: false }], 21 | }), 22 | ], 23 | { 24 | verbose: true, 25 | } 26 | ) 27 | ) 28 | .pipe( 29 | size({ 30 | title: "svg", 31 | }) 32 | ) 33 | .pipe(gulp.dest(config.dist)); 34 | }); 35 | -------------------------------------------------------------------------------- /gulp/tasks/templates.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const config = require("../config").templates; 3 | const pug = require("gulp-pug"); 4 | const plumber = require("gulp-plumber"); 5 | const notify = require("gulp-notify"); 6 | const gutil = require("gulp-util"); 7 | const htmlmin = require("gulp-htmlmin"); 8 | const size = require("gulp-size"); 9 | const cache = require("gulp-cache"); 10 | const options = require("minimist")(process.argv.slice(2)); 11 | 12 | const filters = { 13 | code(html, options) { 14 | const lang = options.lang || "html"; 15 | const preview = 16 | lang === "html" ? `
${html}
21 | .l-grid__item--X-XX
à l'élément ayant la classe .l-grid__item
afin de modifier son nombre de colonnes.
25 | p Le dernier nombre de la chaine de caractères (ex : -50) correspond à la largeur en pourcentage (50%).
26 | p Modifiers disponibles :
27 | .u-mtM
28 | table
29 | thead
30 | tr
31 | th Taille
32 | th Valeurs
33 | tbody
34 | tr
35 | td
36 | b Taille s - de 480px à 768px
37 | td
38 | s-20
39 | s-25
40 | s-33
41 | s-40
42 | s-50
43 | s-60
44 | s-66
45 | s-75
46 | tr
47 | td
48 | b Taille s-up - sup à 480px
49 | td
50 | s-up-20
51 | s-up-25
52 | s-up-33
53 | s-up-40
54 | s-up-50
55 | s-up-60
56 | s-up-66
57 | s-up-75
58 | s-up-80
59 | tr
60 | td
61 | b Taille m - de 768px à 1049px
62 | td
63 | m-20
64 | m-25
65 | m-33
66 | m-40
67 | m-50
68 | m-60
69 | m-66
70 | m-75
71 | m-80
72 | tr
73 | td
74 | b Taille m-up - sup à 768px
75 | td
76 | m-up-20
77 | m-up-25
78 | m-up-33
79 | m-up-40
80 | m-up-50
81 | m-up-60
82 | m-up-66
83 | m-up-75
84 | m-up-80
85 | tr
86 | td
87 | b Taille l-up - sup à 1049px
88 | td
89 | l-up-20
90 | l-up-25
91 | l-up-33
92 | l-up-40
93 | l-up-50
94 | l-up-60
95 | l-up-66
96 | l-up-75
97 | l-up-80
98 | :code
99 | .l-wrapper
permet de center des éléments sur la grille.
18 | :code
19 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Reiciendis vero debitis est facilis, neque eveniet corporis sunt qui necessitatibus dolores quisquam aperiam omnis itaque laboriosam non, quaerat iure. Voluptates, exercitationem.
21 |Lorem ipsum dolor sit amet consectetur adipisicing elit. Reiciendis vero debitis est facilis, neque eveniet corporis sunt qui necessitatibus dolores quisquam aperiam omnis itaque laboriosam non, quaerat iure. Voluptates, exercitationem.
29 |Lorem ipsum dolor sit amet consectetur adipisicing elit. Reiciendis vero debitis est facilis, neque eveniet corporis sunt qui necessitatibus dolores quisquam aperiam omnis itaque laboriosam non, quaerat iure. Voluptates, exercitationem.
36 |.m-content
permet de styliser tout les éléments HTML de base pour un contenu éditorial.
17 | :code
18 | One night when I had tasted bitterness I went out on to the hill. Dark heather checked my feet. Below marched the suburban lamps.
21 |Windows, their curtains drawn, were shut eyes, inwardly watching the lives of dreams. Beyond the sea’s level darkness a lighthouse pulsed. Overhead, obscurity. I distinguished our own house, our islet in the tumultuous and bitter currents of the world. 22 | There, for a decade and a half, we two, so different in quality, had grown in and in to one another, for mutual support and nourishment, in intricate symbiosis. There daily we planned our several undertakings, and recounted the day’s oddities 23 | and vexations. There letters piled up to be answered, socks to be darned. There the children were born, those sudden new lives. There, under that roof, our own two lives, recalcitrant sometimes to one another, were all the while thankfully one, 24 | one larger, more conscious life than either alone.
25 |Yet there was bitterness. And bitterness not only invaded us from the world; it welled up also within our own magic circle. For horror at our futility, at our own unreality, and not only at the world’s delirium, had driven me out on to the hill.
27 |We were always hurrying from one little urgent task to another, but the upshot was insubstantial. Had we, perhaps, misconceived our whole existence? Were we, as it were, living from false premises? And in particular, this partnership of ours, this 28 | seemingly so well-based fulcrum for activity in the world, was it after all nothing but a little eddy of complacent and ingrown domesticity, ineffectively whirling on the surface of the great flux, having in itself no depth of being, and no significance? 29 | Had we perhaps after all deceived ourselves? Behind those rapt windows did we, like so many others, indeed live only a dream? In a sick world even the hale are sick. And we two, spinning our little life mostly by rote, seldom with clear cognizance, 30 | seldom with firm intent, were products of a sick world.
31 |Yet this life of ours was not all sheer and barren fantasy. Was it not spun from the actual fibres of reality, which we gathered in with all the comings and goings through our door, all our traffic with the suburb and the city and with remoter cities, 32 | and with the ends of the earth? And were we not spinning together an authentic expression of our own nature? Did not our life issue daily as more or less firm threads of active living, and mesh itself into the growing web, the intricate, ever-proliferating 33 | pattern of mankind?
34 |And a kind of amused awe. How could I describe our relationship even to myself without either disparaging it or insulting it with the tawdry decoration of sentimentality? For this our delicate balance of dependence and independence, this coolly critical, 36 | shrewdly ridiculing, but loving mutual contact, was surely a microcosm of true community, was after all in its simple style an actual and living example of that high goal which the world seeks.
37 |38 |42 |I reflected that not one of the visible features of this celestial and living gem revealed the presence of man. Displayed before me, though invisible, were some of the most congested centers of human population. There below me lay huge industrial 39 | regions, blackening the air with smoke. Yet all this thronging life and humanly momentous enterprise had made no mark whatever on the features of the planet. From this high look-out the Earth would have appeared no different before the dawn 40 | of man. No visiting angel, or explorer from another planet, could have guessed that this bland orb teemed with vermin, with world-mastering, self-torturing, incipiently angelic beasts. — Olaf Stapledon, Star Maker
41 |
The whole world? The whole universe? Overhead, obscurity unveiled a star. One tremulous arrow of light, projected how many thousands of years ago, now stung my nerves with vision, and my heart with fear. For in such a universe as this what significance 43 | could there be in our fortuitous, our frail, our evanescent community?
44 |With a strange worship, not, surely of the star, that mere furnace which mere distance falsely sanctified, but of something other, which the dire contrast of the star and us signified to the heart. Yet what, what could thus be signified? Intellect, 46 | peering beyond the star, discovered no Star Maker, but only darkness; no Love, no Power even, but only Nothing.
47 |Impatiently I shook off this folly, and reverted from the inscrutable to the familiar and the concrete. Thrusting aside worship, and fear also and bitterness, I determined to examine more coldly this remarkable “us,” this surprisingly impressive datum, 49 | which to ourselves remained basic to the universe, though in relation to the stars it appeared so slight a thing.
50 |We were after all insignificant, perhaps ridiculous. We were such a commonplace occurrence, so trite, so respectable. We were just a married couple, making shift to live together without undue strain. Marriage in our time was suspect. And ours, with 52 | its trivial romantic origin, was doubly suspect.
53 |Yes! How predestinate had seemed our union! Yet now, in retrospect, how accidental. True, of course, that as a long-married couple we fitted rather neatly, like two close trees whose trunks have grown upwards together as a single shaft, mutually distorting, but mutually supporting. ABC
Here's some code: e = mc2
\n80 |
# | 91 |First Name | 92 |Last Name | 93 |Username | 94 |
---|---|---|---|
1 | 99 |Mark | 100 |Otto | 101 |@mdo | 102 |
2 | 105 |Jacob | 106 |Thornton | 107 |@fat | 108 |
3 | 111 |Larry | 112 |the Bird | 113 |
margin
/ padding
sur un élément. A utiliser pour assembler différents composants sans avoir à définir une nouvelle classe de wrapper.
16 | .hf-content.hf-wrapper
17 | h3 Définition
18 | ul
19 | li p, m = padding, margin
20 | li a, t, r, b, l = all, top, right, bottom, left
21 | li s, m, l, n = Small (10 px), Medium (20 px), Large (40 px) , None (0)
22 | .hf-content.hf-wrapper
23 | h3 Margin
24 | table
25 | thead
26 | tr
27 | th Class
28 | th Usage
29 | tbody
30 | tr
31 | td
32 | code .u-mas
33 | td margin: 10 px;
34 | tr
35 | td
36 | code .u-mam
37 | td margin: 20 px;
38 | tr
39 | td
40 | code .u-mal
41 | td margin: 40 px;
42 | tr
43 | td
44 | code .u-man
45 | td margin: 0;
46 | tr
47 | td
48 | code .u-mts
49 | td margin-top: 10 px;
50 | tr
51 | td
52 | code .u-mtm
53 | td margin-top: 20 px;
54 | tr
55 | td
56 | code .u-mtl
57 | td margin-top: 40 px;
58 | tr
59 | td
60 | code .u-mtn
61 | td margin-top: 0;
62 | tr
63 | td
64 | code .u-mrs
65 | td margin-right: 10 px;
66 | tr
67 | td
68 | code .u-mrm
69 | td margin-right: 20 px;
70 | tr
71 | td
72 | code .u-mrl
73 | td margin-right: 40 px;
74 | tr
75 | td
76 | code .u-mrn
77 | td margin-right: 0;
78 | tr
79 | td
80 | code .u-mbs
81 | td margin-bottom: 10 px;
82 | tr
83 | td
84 | code .u-mbm
85 | td margin-bottom: 20 px;
86 | tr
87 | td
88 | code .u-mbl
89 | td margin-bottom: 40 px;
90 | tr
91 | td
92 | code .u-mbn
93 | td margin-bottom: 0;
94 | tr
95 | td
96 | code .u-mls
97 | td margin-left: 10 px;
98 | tr
99 | td
100 | code .u-mlm
101 | td margin-left: 20 px;
102 | tr
103 | td
104 | code .u-mll
105 | td margin-left: 40 px;
106 | tr
107 | td
108 | code .u-mln
109 | td margin-left: 0;
110 | .hf-content.hf-wrapper
111 | h3 Padding
112 | table
113 | thead
114 | tr
115 | th Class
116 | th Usage
117 | tbody
118 | tr
119 | td
120 | code .u-pas
121 | td padding: 10 px;
122 | tr
123 | td
124 | code .u-pam
125 | td padding: 20 px;
126 | tr
127 | td
128 | code .u-pal
129 | td padding: 40 px;
130 | tr
131 | td
132 | code .u-pan
133 | td padding: 0;
134 | tr
135 | td
136 | code .u-pts
137 | td padding-top: 10 px;
138 | tr
139 | td
140 | code .u-ptm
141 | td padding-top: 20 px;
142 | tr
143 | td
144 | code .u-ptl
145 | td padding-top: 40 px;
146 | tr
147 | td
148 | code .u-ptn
149 | td padding-top: 0;
150 | tr
151 | td
152 | code .u-prs
153 | td padding-right: 10 px;
154 | tr
155 | td
156 | code .u-prm
157 | td padding-right: 20 px;
158 | tr
159 | td
160 | code .u-prl
161 | td padding-right: 40 px;
162 | tr
163 | td
164 | code .u-prn
165 | td padding-right: 0;
166 | tr
167 | td
168 | code .u-pbs
169 | td padding-bottom: 10 px;
170 | tr
171 | td
172 | code .u-pbm
173 | td padding-bottom: 20 px;
174 | tr
175 | td
176 | code .u-pbl
177 | td padding-bottom: 40 px;
178 | tr
179 | td
180 | code .u-pbn
181 | td padding-bottom: 0;
182 | tr
183 | td
184 | code .u-pls
185 | td padding-left: 10 px;
186 | tr
187 | td
188 | code .u-plm
189 | td padding-left: 20 px;
190 | tr
191 | td
192 | code .u-pll
193 | td padding-left: 40 px;
194 | tr
195 | td
196 | code .u-pln
197 | td padding-left: 0;
198 |
--------------------------------------------------------------------------------
/src/template/pages/styleguide/utils/u-text-color.pug:
--------------------------------------------------------------------------------
1 | extends ../../../layout/styleguide
2 |
3 | append config
4 | - var template = 't-styleguide'
5 | - var title = "Utils de couleur de texte"
6 | - var metaDesc = "Utils de couleur de texte - CSS"
7 | - var path = './../../'
8 |
9 | block content
10 | .hf-head
11 | .hf-wrapper
12 | h1 Text Color
13 | .hf-content.hf-wrapper
14 | h2 Documentation
15 | p Les utilitaires de couleurs permettent de modifier les couleurs des éléments.
16 | .hf-content.hf-wrapper
17 | h3 Couleur : Light (blanc)
18 | table
19 | thead
20 | tr
21 | th Class
22 | th Rendu
23 | tbody
24 | tr
25 | td
26 | code .u-text-color-light
27 | td.u-text-color-light lorem ipsum dolor
28 | .hf-content.hf-wrapper
29 | h3 Couleur : Clr0 (noir)
30 | table
31 | thead
32 | tr
33 | th Class
34 | th Rendu
35 | tbody
36 | tr
37 | td
38 | code .u-text-color-0-darken
39 | td
40 | .u-text-color-0-darken lorem ipsum dolor
41 | tr
42 | td
43 | code .u-text-color-0-dark
44 | td
45 | .u-text-color-0-dark lorem ipsum dolor
46 | tr
47 | td
48 | code .u-text-color-0
49 | td
50 | .u-text-color-0 lorem ipsum dolor
51 | tr
52 | td
53 | code .u-text-color-0-light
54 | td
55 | .u-text-color-0-light lorem ipsum dolor
56 | tr
57 | td
58 | code .u-text-color-0-lighten
59 | td
60 | .u-text-color-0-lighten lorem ipsum dolor
61 | .hf-content.hf-wrapper
62 | h3 Couleur : Clr1 (bleu)
63 | table
64 | thead
65 | tr
66 | th Class
67 | th Rendu
68 | tbody
69 | tr
70 | td
71 | code .u-text-color-1-darken
72 | td
73 | .u-text-color-1-darken lorem ipsum dolor
74 | tr
75 | td
76 | code .u-text-color-1-dark
77 | td
78 | .u-text-color-1-dark lorem ipsum dolor
79 | tr
80 | td
81 | code .u-text-color-1
82 | td
83 | .u-text-color-1 lorem ipsum dolor
84 | tr
85 | td
86 | code .u-text-color-1-light
87 | td
88 | .u-text-color-1-light lorem ipsum dolor
89 | tr
90 | td
91 | code .u-text-color-1-lighten
92 | td
93 | .u-text-color-1-lighten lorem ipsum dolor
94 | .hf-content.hf-wrapper
95 | h3 Couleur : Clr2 (violet)
96 | table
97 | thead
98 | tr
99 | th Class
100 | th Rendu
101 | tbody
102 | tr
103 | td
104 | code .u-text-color-2-darken
105 | td
106 | .u-text-color-2-darken lorem ipsum dolor
107 | tr
108 | td
109 | code .u-text-color-2-dark
110 | td
111 | .u-text-color-2-dark lorem ipsum dolor
112 | tr
113 | td
114 | code .u-text-color-2
115 | td
116 | .u-text-color-2 lorem ipsum dolor
117 | tr
118 | td
119 | code .u-text-color-2-light
120 | td
121 | .u-text-color-2-light lorem ipsum dolor
122 | tr
123 | td
124 | code .u-text-color-2-lighten
125 | td
126 | .u-text-color-2-lighten lorem ipsum dolor
127 | .hf-content.hf-wrapper
128 | h3 Couleur : État
129 | table
130 | thead
131 | tr
132 | th Class
133 | th Rendu
134 | tbody
135 | tr
136 | td
137 | code .u-text-color-notice
138 | td
139 | .u-text-color-notice lorem ipsum dolor
140 | tr
141 | td
142 | code .u-text-color-error
143 | td
144 | .u-text-color-error lorem ipsum dolor
145 | tr
146 | td
147 | code .u-text-color-warning
148 | td
149 | .u-text-color-warning lorem ipsum dolor
150 | tr
151 | td
152 | code .u-text-color-success
153 | td
154 | .u-text-color-success lorem ipsum dolor
155 |
--------------------------------------------------------------------------------
/src/template/pages/styleguide/utils/u-text.pug:
--------------------------------------------------------------------------------
1 | extends ../../../layout/styleguide
2 |
3 | append config
4 | - var template = 't-styleguide'
5 | - var title = "Utils de texte"
6 | - var metaDesc = "Utils de texte - CSS"
7 | - var path = './../../'
8 |
9 | block content
10 | .hf-head
11 | .hf-wrapper
12 | h1 Text
13 | .hf-content.hf-wrapper
14 | h2 Documentation
15 | p Les utilitaires de texte permettent de modifier les styles de texte des éléments.
16 | .hf-content.hf-wrapper
17 | h3 Modification de style
18 | table
19 | thead
20 | tr
21 | th Class
22 | th Usage
23 | tbody
24 | tr
25 | td
26 | code .u-text-upper
27 | td.u-text-upper Texte tout en capitales
28 | tr
29 | td
30 | code .u-text-lower
31 | td.u-text-lower Texte tout en minuscules
32 | tr
33 | td
34 | code .u-text-bold
35 | td.u-text-bold Texte tout en gras
36 | tr
37 | td
38 | code .u-text-thin
39 | td.u-text-thin Texte tout en light
40 | tr
41 | td
42 | code .u-text-center
43 | td.u-text-center Texte centré
44 | tr
45 | td
46 | code .u-text-left
47 | td.u-text-left Texte aligné à droite
48 | tr
49 | td
50 | code .u-text-right
51 | td.u-text-right Texte aligné à gauche
52 | .hf-content.hf-wrapper
53 | h3 Modification de taille
54 | table
55 | thead
56 | tr
57 | th Class
58 | th Usage
59 | tbody
60 | tr
61 | td
62 | code .u-text-xxl
63 | td.u-text-xxl Lorem ipsum
64 | tr
65 | td
66 | code .u-text-xl
67 | td.u-text-xl Lorem ipsum
68 | tr
69 | td
70 | code .u-text-l
71 | td.u-text-l Lorem ipsum
72 | tr
73 | td
74 | code .u-text-m
75 | td.u-text-m Lorem ipsum
76 | tr
77 | td
78 | code .u-text-s
79 | td.u-text-s Lorem ipsum
80 | tr
81 | td
82 | code .u-text-xs
83 | td.u-text-xs Lorem ipsum
84 | tr
85 | td
86 | code .u-text-xxs
87 | td.u-text-xxs Lorem ipsum
88 |
--------------------------------------------------------------------------------
/src/template/pages/styleguide/utils/u-width.pug:
--------------------------------------------------------------------------------
1 | extends ../../../layout/styleguide
2 |
3 | append config
4 | - var template = 't-styleguide'
5 | - var title = "Utils de taille"
6 | - var metaDesc = "Utils de taille - CSS"
7 | - var path = './../../'
8 |
9 | block content
10 | .hf-head
11 | .hf-wrapper
12 | h1 Width
13 | .hf-content.hf-wrapper
14 | h2 Documentation
15 | p Les utilitaires de taille permettent modifier la taille des élements
16 | table
17 | thead
18 | tr
19 | th Class
20 | th Usage
21 | tbody
22 | tr
23 | td
24 | code .u-w20
25 | td
26 | .hf-gridItem.u-w20
27 | tr
28 | td
29 | code .u-w25
30 | td
31 | .hf-gridItem.u-w25
32 | tr
33 | td
34 | code .u-w33
35 | td
36 | .hf-gridItem.u-w33
37 | tr
38 | td
39 | code .u-w40
40 | td
41 | .hf-gridItem.u-w40
42 | tr
43 | td
44 | code .u-w50
45 | td
46 | .hf-gridItem.u-w50
47 | tr
48 | td
49 | code .u-w60
50 | td
51 | .hf-gridItem.u-w60
52 | tr
53 | td
54 | code .u-w66
55 | td
56 | .hf-gridItem.u-w66
57 | tr
58 | td
59 | code .u-w75
60 | td
61 | .hf-gridItem.u-w75
62 | tr
63 | td
64 | code .u-w80
65 | td
66 | .hf-gridItem.u-w80
67 | tr
68 | td
69 | code .u-w100
70 | td
71 | .hf-gridItem.u-w100
72 |
--------------------------------------------------------------------------------
/src/template/partials/footer.pug:
--------------------------------------------------------------------------------
1 | footer.footer
2 | .l-wrapper
3 | div Footer here
4 |
--------------------------------------------------------------------------------
/src/template/partials/head.pug:
--------------------------------------------------------------------------------
1 | meta(charset='UTF-8')
2 | title= title
3 | meta(name='description', content= metaDesc )
4 | meta(name='viewport', content='width=device-width, initial-scale=1.0, shrink-to-fit=no')
5 | link(rel="icon", type="image/png", href= path + "favicon-32x32.png",sizes="32x32")
6 | link(rel="icon", type="image/png", href= path + "favicon-16x16.png",sizes="16x16")
7 | link(href='favicon.ico', rel='shortcut icon', type='image/x-icon')
8 | link(rel='stylesheet', href= path + 'assets/app.css')
9 |
--------------------------------------------------------------------------------
/src/template/partials/header.pug:
--------------------------------------------------------------------------------
1 | header.header
2 |
3 | .l-wrapper
4 |
5 | h1.header-logo
6 | a.header-logo-link(href="./") App name
7 |
8 | nav.menu
9 | +menu([
10 | { 'title':'Author', 'link': 'https://sutterlity.fr/' },
11 | { 'title':'Repo Github', 'link': 'https://github.com/sutter/helloFront' }
12 | ])
13 |
--------------------------------------------------------------------------------
/webpack/webpack.config.base.js:
--------------------------------------------------------------------------------
1 | const path = require("path");
2 |
3 | module.exports = {
4 | watch: false,
5 | entry: {
6 | app: "./src/assets/js/app.js",
7 | },
8 | output: {
9 | path: path.resolve(__dirname, "../dist/assets/js"),
10 | filename: "[name].js",
11 | },
12 | externals: {
13 | jquery: "jQuery",
14 | },
15 | module: {
16 | rules: [
17 | {
18 | test: /\.js?$/,
19 | exclude: /(node_modules|bower_components)/,
20 | use: {
21 | loader: "babel-loader",
22 | },
23 | },
24 | ],
25 | },
26 | };
27 |
--------------------------------------------------------------------------------
/webpack/webpack.config.dev.js:
--------------------------------------------------------------------------------
1 | const webpackMerge = require("webpack-merge");
2 | const webpackConfigBase = require("./webpack.config.base.js");
3 |
4 | module.exports = webpackMerge(webpackConfigBase, {
5 | devtool: "cheap-module-eval-source-map",
6 | });
7 |
--------------------------------------------------------------------------------
/webpack/webpack.config.prod.js:
--------------------------------------------------------------------------------
1 | const webpackMerge = require("webpack-merge");
2 | const webpackConfigBase = require("./webpack.config.base.js");
3 | const uglifyJSPlugin = require("uglifyjs-webpack-plugin");
4 |
5 | module.exports = webpackMerge(webpackConfigBase, {
6 | devtool: "source-map",
7 | plugins: [new uglifyJSPlugin({ sourceMap: true })],
8 | });
9 |
--------------------------------------------------------------------------------