Skip to content
Commits on Source (2)
{
"env": {
"browser": true,
"builtin": true,
"es6": true,
"jasmine": true,
"jquery": true,
"mocha": true,
"node": true
},
"globals": {
"Foundation": true
},
"parserOptions": {
"ecmaFeatures": {
"impliedStrict": true,
"jsx": false
},
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
"block-scoped-var": 2,
"camelcase": 2,
"comma-style": [2, "last"],
"curly": [0, "all"],
"dot-notation": [
2,
{
"allowKeywords": true
}
],
"eqeqeq": [2, "allow-null"],
"guard-for-in": 2,
"new-cap": 2,
"no-bitwise": 2,
"no-caller": 2,
"no-cond-assign": [2, "except-parens"],
"no-debugger": 2,
"no-empty": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-parens": 1,
"no-irregular-whitespace": 2,
"no-iterator": 2,
"no-loop-func": 2,
"no-multi-str": 2,
"no-new": 2,
"no-plusplus": 0,
"no-proto": 2,
"no-script-url": 2,
"no-sequences": 2,
"no-shadow": 1,
"no-undef": 2,
"no-unused-vars": 1,
"no-with": 2,
"quotes": 0,
"radix" : 2,
"semi": [0, "never"],
"strict": [1, "global"],
"valid-typeof": 2,
"wrap-iife": [2, "inside"]
}
}
......@@ -4,6 +4,7 @@
.setting*
.nyc*
package-lock.json
node_modules
vendor
dist
......@@ -4,6 +4,17 @@ stages:
- test
- deploy
# Cache modules in between jobs
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
# cache JS dependencies
- node_modules/
# cache PHP dependencies
- vendor/
# cache package/project stuff, non-artifacts
- dist/
variables:
BUILD_TARGET: httpdocs
BUILD_LABEL_TMPFILE: build.txt
......@@ -11,22 +22,31 @@ variables:
before_script:
- if [ -f ${BUILD_LABEL_TMPFILE} ]; then export BUILD_LABEL=`cat ${BUILD_LABEL_TMPFILE}`; fi
init:
stage: setup
tags:
#- kunden-web
- kunden-web
#- node
- php
#- php
before_script:
- export BUILD_LABEL=$(TZ=Europe/Berlin date +%Y%m%d-%H%M)
script:
# save timestamp to file
- echo $BUILD_LABEL > ${BUILD_LABEL_TMPFILE}
- echo -e "\n\n\n\e[96mCreated new build label \e[107;30;1m $BUILD_LABEL \e[0m\n\n\n"
- echo -e "\n\n\e[96mCreated new build label \e[107;30;1m $BUILD_LABEL \e[0m\n\n"
# other init commands
- whoami
- pwd
- node -v
- npm -v
- php -v
# check if a build environment exists and copy it or install a new one if it doesn't
- if [ -d /build-env_DOES_NOT_EXIT_USE_INSTALL_FOR_NOW/node_modules ] && [ -f /build-env/package-lock.json ];
then echo -e "\e[96mFOUND EXISTING BUILD ENVIRONMENT" && mv /build-env/* ./;
else echo -e "\e[93mNO EXISTING BUILD ENVIRONMENT - RUNNING INSTALL" && npm install;
fi
# list used packages and info
- npm ls || true
artifacts:
paths:
- ${BUILD_LABEL_TMPFILE}
......@@ -34,29 +54,26 @@ init:
app-build:
stage: build
tags:
#- kunden-web
- kunden-web
#- node
- php
#- php
dependencies:
- init
variables:
BUILD_INFO_FILE: httpdocs/build.txt
script:
# check if a build environment exists and copy it or install a new one if it doesn't
- if [ -d /build-env_DOES_NOT_EXIT_USE_INSTALL_FOR_NOW/node_modules ] && [ -f /build-env/package-lock.json ];
then echo -e "\e[96mFOUND EXISTING BUILD ENVIRONMENT" && mv /build-env/* ./;
else echo -e "\e[93mNO EXISTING BUILD ENVIRONMENT - RUNNING INSTALL" && npm install;
fi
# list used packages
- npm ls || true
#
# run no build
#- echo "Warning - no build specified" && exit 0
#
# run node build
- npm -v
- php -v
- npm run build
# create build info file
- echo -e "LABEL=`cat ${BUILD_LABEL_TMPFILE}`" > ${BUILD_INFO_FILE}
- echo -e "TAG=${CI_COMMIT_TAG}" >> ${BUILD_INFO_FILE}
- echo -e "COMMIT=${CI_COMMIT_SHA}" >> ${BUILD_INFO_FILE}
- echo -e "PIPELINE=${CI_PIPELINE_ID}" >> ${BUILD_INFO_FILE}
- echo -e "USER=${GITLAB_USER_NAME} (${GITLAB_USER_LOGIN}) <${GITLAB_USER_EMAIL}>" >> ${BUILD_INFO_FILE}
# print debug-info
- cat ${BUILD_INFO_FILE}
- ls -la ${BUILD_TARGET}
......@@ -65,54 +82,104 @@ app-build:
- ${BUILD_TARGET}
app-tests:
app-test-sass:
stage: test
tags:
#- kunden-web
#- node
- php
- kunden-web
dependencies:
- app-build
variables:
BUILD_TEST_COVERAGE_FILE: httpdocs/coverage.xml
script:
# check if a build environment exists and copy it or install a new one if it doesn't
- php -v
- node -v
#
# run no tests
#- echo "Warning - no SASS tests specified" && exit 0
#
# run SASS tests
- npm run test:sass
artifacts:
paths:
- ${BUILD_TARGET}
app-test-javascript:
stage: test
tags:
- kunden-web
dependencies:
- app-build
script:
#
# run no tests
#- echo "Warning - no JavaScript tests specified" && exit 0
#
# run SASS tests
- npm run test:javascript
artifacts:
paths:
- ${BUILD_TARGET}
app-test-browser:
stage: test
tags:
- kunden-web
dependencies:
- app-build
script:
#
# run no tests
#- echo "Warning - no browser tests specified" && exit 0
#
# run browser/headless tests
- npm run test:browser
artifacts:
paths:
- ${BUILD_TARGET}
rsync:
stage: deploy
src-lint-sass:
stage: test
tags:
- web-rsync-runner
- kunden-web
dependencies:
- app-build
- app-tests
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh-add <(echo "$SSH_STAGING_PRIVATE_KEY")
- apt-get install rsync
script:
- ssh -p22 user@staging.example.com "mkdir -p /_tmp"
- rsync -rav -e ssh --exclude='.git/' --exclude='.gitlab-ci.yml' --delete-excluded /${BUILD_TARGET}/ user@staging.example.com:/_tmp
- ssh -p22 user@staging.example.com "mv /${BUILD_TARGET} /${BUILD_TARGET}_save && mv /_tmp /${BUILD_TARGET}"
- ssh -p22 user@staging.example.com "rm -rf /${BUILD_TARGET}_save"
only:
refs:
- master
when: manual
#
# run no linting
#- echo "Warning - no SASS linting specified" && exit 0
#
# run SASS linting
- npm run lint:sass
artifacts:
paths:
- ${BUILD_TARGET}
src-lint-javascript:
stage: test
tags:
- kunden-web
dependencies:
- app-build
script:
#
# run no linting
#- echo "Warning - no JavaScript linting specified" && exit 0
#
# run SASS linting
- npm run lint:javascript
artifacts:
paths:
- ${BUILD_TARGET}
# ftp to dev host
ftp-dev:
stage: deploy
tags:
- kunden-web
dependencies:
- app-build
- app-tests
before_script:
#- no action for now...
script:
# deploy files
- npm run deploy
# ftp to host
- 'which lftp || ( apt-get update -qq && apt-get install -y -qq lftp )'
- lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; mirror -Rev ${BUILD_TARGET}/ ./$FTP_PATH/${BUILD_TARGET} --parallel=10 --exclude-glob .git* --exclude .git/"
except:
......@@ -121,20 +188,30 @@ ftp-dev:
- tags
- release
when: manual
artifacts:
paths:
- ${BUILD_TARGET}
# ftp to production/live host
ftp-prod:
stage: deploy
tags:
- kunden-web
dependencies:
- app-build
- app-tests
before_script:
#- no action for now...
script:
# deploy files
- npm run deploy
# ftp to host
- 'which lftp || ( apt-get update -qq && apt-get install -y -qq lftp )'
- lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME_PROD,$FTP_PASSWORD_PROD $FTP_HOST_PROD; mirror -Rev ${BUILD_TARGET}/ ./$FTP_PATH_PROD/${BUILD_TARGET} --parallel=10 --exclude-glob .git* --exclude .git/"
only:
refs:
- master
- tags
- release
when: manual
artifacts:
paths:
- ${BUILD_TARGET}
options:
formatter: stylish
files:
include: '**/*.s+(a|c)ss'
ignore: ''
rules:
# Extends
extends-before-mixins: 1
extends-before-declarations: 1
placeholder-in-extend: 1
# Mixins
mixins-before-declarations: 1
# Line Spacing
one-declaration-per-line: 1
empty-line-between-blocks: 1
single-line-per-selector: 1
# Disallows
no-attribute-selectors: 0
no-color-hex: 0
no-color-keywords: 1
no-color-literals: 1
no-combinators: 0
no-css-comments: 1
no-debug: 1
no-disallowed-properties: 0
no-duplicate-properties: 1
no-empty-rulesets: 1
no-extends: 0
no-ids: 1
no-important: 1
no-invalid-hex: 1
no-mergeable-selectors: 1
no-misspelled-properties: 1
no-qualifying-elements: 1
no-trailing-whitespace: 1
no-trailing-zero: 1
no-transition-all: 1
no-universal-selectors: 0
no-url-domains: 1
no-url-protocols: 1
no-vendor-prefixes: 1
no-warn: 1
property-units: 0
# Nesting
declarations-before-nesting: 1
force-attribute-nesting: 1
force-element-nesting: 1
force-pseudo-nesting: 1
# Name Formats
class-name-format: 1
function-name-format: 1
id-name-format: 0
mixin-name-format: 1
placeholder-name-format: 1
variable-name-format: 1
# Style Guide
attribute-quotes: 1
bem-depth: 0
border-zero: 1
brace-style: 1
clean-import-paths: 1
empty-args: 1
hex-length: 1
hex-notation: 1
indentation: 1
leading-zero: 1
max-line-length: 0
max-file-line-count: 0
nesting-depth: 1
property-sort-order: 1
pseudo-element: 1
quotes: 1
shorthand-values: 1
url-quotes: 1
variable-for-property: 1
zero-unit: 1
# Inner Spacing
space-after-comma: 1
space-before-colon: 1
space-after-colon: 1
space-before-brace: 1
space-before-bang: 1
space-after-bang: 1
space-between-parens: 1
space-around-operator: 1
# Final Items
trailing-semicolon: 1
final-newline: 1
{
"name": "p-ad/web-base",
"name": "web-base",
"version": "0.0.1",
"license": "MIT",
"require": {}
}
# Your project's server will run on localhost:xxxx at this port
PORT: 8000
# Autoprefixer will make sure your CSS works with these browsers
COMPATIBILITY:
- "last 2 versions"
- "ie >= 9"
- "ios >= 7"
# UnCSS will use these settings
UNCSS_OPTIONS:
html:
# Search for used CSS classes in generated HTML files
- "dist/**/*.html"
ignore:
- !!js/regexp .foundation-mq
- !!js/regexp ^\.is-.*
# Gulp will reference these paths when it copies files
PATHS:
# Path to dist folder
dist: "dist"
# Paths to static assets that aren't images, CSS, or JavaScript
assets:
- "src/assets/**/*"
- "!src/assets/{img,js,scss}/**/*"
# Paths to Sass libraries, which can then be loaded with @import
sass:
- "node_modules/foundation-sites/scss"
- "node_modules/motion-ui/src"
# Paths to JavaScript entry points for webpack to bundle modules
entries:
- "src/assets/js/*.js"
deploy:
pages:
source: "dist/**/*.html"
target: "httpdocs/"
css:
source: "dist/assets/css/**/*"
target: "httpdocs/assets/css/"
js:
source: "dist/assets/js/**/*"
target: "httpdocs/assets/js/"
img:
source: "dist/assets/img/**/*"
target: "httpdocs/assets/img/"
'use strict';
import plugins from 'gulp-load-plugins';
import yargs from 'yargs';
import browser from 'browser-sync';
import gulp from 'gulp';
import panini from 'panini';
import rimraf from 'rimraf';
import sherpa from 'style-sherpa';
import yaml from 'js-yaml';
import fs from 'fs';
import webpackStream from 'webpack-stream';
import webpack2 from 'webpack';
import named from 'vinyl-named';
import uncss from 'uncss';
import autoprefixer from 'autoprefixer';
// Load all Gulp plugins into one variable
const $ = plugins();
// Check for --production flag
const PRODUCTION = !!(yargs.argv.production);
// Load settings from settings.yml
const { COMPATIBILITY, PORT, UNCSS_OPTIONS, PATHS } = loadConfig();
function loadConfig() {
let ymlFile = fs.readFileSync('config.yml', 'utf8');
return yaml.load(ymlFile);
}
// Delete the "dist" folder
// This happens every time a build starts
function clean(done) {
rimraf(PATHS.dist, done);
}
// Copy files out of the assets folder
// This task skips over the "img", "js", and "scss" folders, which are parsed separately
function copy() {
return gulp.src(PATHS.assets)
.pipe(gulp.dest(PATHS.dist + '/assets'));
}
// Copy page templates into finished HTML files
function pages() {
return gulp.src('src/pages/**/*.{html,hbs,handlebars}')
.pipe(panini({
root: 'src/pages/',
layouts: 'src/layouts/',
partials: 'src/partials/',
data: 'src/data/',
helpers: 'src/helpers/'
}))
.pipe(gulp.dest(PATHS.dist));
}
// Load updated HTML templates and partials into Panini
function resetPages(done) {
panini.refresh();
done();
}
// Generate a style guide from the Markdown content and HTML template in styleguide/
function styleGuide(done) {
sherpa('src/styleguide/index.md', {
output: PATHS.dist + '/styleguide.html',
template: 'src/styleguide/template.html'
}, done);
}
// Compile Sass into CSS
// In production, the CSS is compressed
function sass() {
const postCssPlugins = [
// Autoprefixer
autoprefixer({ browsers: COMPATIBILITY }),
// UnCSS - Uncomment to remove unused styles in production
// PRODUCTION && uncss.postcssPlugin(UNCSS_OPTIONS),
].filter(Boolean);
return gulp.src('src/assets/scss/*.scss')
.pipe($.sourcemaps.init())
.pipe($.sass({
includePaths: PATHS.sass
})
.on('error', $.sass.logError))
.pipe($.postcss(postCssPlugins))
.pipe($.if(PRODUCTION, $.cleanCss({ compatibility: 'ie9' })))
.pipe($.if(!PRODUCTION, $.sourcemaps.write()))
.pipe(gulp.dest(PATHS.dist + '/assets/css'))
.pipe(browser.reload({ stream: true }));
}
let webpackConfig = {
mode: (PRODUCTION ? 'production' : 'development'),
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: [ "@babel/preset-env" ],
compact: false
}
}
}
]
},
devtool: !PRODUCTION && 'source-map'
}
// Combine JavaScript into one file
// In production, the file is minified
function javascript() {
return gulp.src(PATHS.entries)
.pipe(named())
.pipe($.sourcemaps.init())
.pipe(webpackStream(webpackConfig, webpack2))
.pipe($.if(PRODUCTION, $.uglify()
.on('error', e => { console.log(e); })
))
.pipe($.if(!PRODUCTION, $.sourcemaps.write()))
.pipe(gulp.dest(PATHS.dist + '/assets/js'));
}
// Copy images to the "dist" folder
// In production, the images are compressed
function images() {
return gulp.src('src/assets/img/**/*')
.pipe($.if(PRODUCTION, $.imagemin([
$.imagemin.jpegtran({ progressive: true }),
])))
.pipe(gulp.dest(PATHS.dist + '/assets/img'));
}
// Start a server with BrowserSync to preview the site in
function server(done) {
browser.init({
server: PATHS.dist, port: PORT
}, done);
}
// Reload the browser with BrowserSync
function reload(done) {
browser.reload();
done();
}
// Watch for changes to static assets, pages, Sass, and JavaScript
function watch() {
gulp.watch(PATHS.assets, copy);
gulp.watch('src/pages/**/*.html').on('all', gulp.series(pages, browser.reload));
gulp.watch('src/{layouts,partials}/**/*.html').on('all', gulp.series(resetPages, pages, browser.reload));
gulp.watch('src/data/**/*.{js,json,yml}').on('all', gulp.series(resetPages, pages, browser.reload));
gulp.watch('src/helpers/**/*.js').on('all', gulp.series(resetPages, pages, browser.reload));
gulp.watch('src/assets/scss/**/*.scss').on('all', sass);
gulp.watch('src/assets/js/**/*.js').on('all', gulp.series(javascript, browser.reload));
gulp.watch('src/assets/img/**/*').on('all', gulp.series(images, browser.reload));
gulp.watch('src/styleguide/**').on('all', gulp.series(styleGuide, browser.reload));
}
// Deploy/copy HTML files
gulp.task('deploy:pages', () => {
return ( gulp.src( PATHS.deploy.pages.source ).pipe( gulp.dest(PATHS.deploy.pages.target) ) )
});
// Deploy/copy CSS files
gulp.task('deploy:stylesheets', () => {
return ( gulp.src( PATHS.deploy.css.source ).pipe( gulp.dest(PATHS.deploy.css.target) ) )
});
// Deploy/copy JS files
gulp.task('deploy:javascript', () => {
return ( gulp.src( PATHS.deploy.js.source ).pipe( gulp.dest(PATHS.deploy.js.target) ) )
});
// Deploy/copy images
gulp.task('deploy:images', () => {
return ( gulp.src( PATHS.deploy.img.source ).pipe( gulp.dest(PATHS.deploy.img.target) ) )
});
// Deploy/copy files
gulp.task('deploy', gulp.parallel('deploy:pages', 'deploy:stylesheets', 'deploy:javascript', 'deploy:images'));
// Build the "dist" folder by running all of the below tasks
// Sass must be run later so UnCSS can search for used classes in the others assets.
gulp.task('build', gulp.series(clean, gulp.parallel(pages, javascript, images, copy), sass, styleGuide /*, 'deploy'*/ ));
// Build the site, run the server, and watch for file changes
gulp.task('default', gulp.series('build', server, watch));
{
"name": "web-base",
"version": "1.0.0",
"version": "0.0.1",
"description": "",
"main": "index.js",
"author": "coding@bjoernbartels.earth",
"license": "MIT",
"repository": {
"type": "git",
"url": "git@gitlab.bjoernbartels.earth/devops/web-base.git"
},
"bugs": {
"url": "https://gitlab.bjoernbartels.earth/devops/web-base/issues",
"email": "coding@bjoernbartels.earth"
},
"private": false,
"main": "gulpfile.babel.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "gulp",
"build": "gulp build --production",
"build:dev": "gulp build",
"lint": "npm run lint:sass && npm run lint:javascript",
"lint:sass": "sass-lint './src/assets/scss/**/*.scss'",
"lint:javascript": "./node_modules/.bin/eslint ./src/assets/js/**/*.js",
"test": "npm run test:sass && npm run test:javascript && npm run test:browser",
"test:sass": "mocha ./test/sass/*.js",
"test:javascript": "nyc mocha --require '@babel/register' ./test/js/*.js;",
"test:browser": "mocha-headless-chrome -a no-sandbox -f ./test/headless/*.html -c ./dist/coverage.json",
"deploy": "gulp deploy",
"reinstall": "rm -rf node_modules package-lock.json; npm install;"
},
"dependencies": {
"aos": "^2.2.0",
"foundation-sites": "^6.5",
"jquery": "^3",
"jquery-ui": "^1",
"motion-ui": "^2.0.3",
"what-input": "^5.1.2"
},
"author": "",
"license": "MIT"
"devDependencies": {
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
"@babel/register": "^7.0.0",
"autoprefixer": "^9.1.5",
"babel-loader": "^8.0.4",
"browser-sync": "^2.10.0",
"gulp": "^4.0.0",
"gulp-babel": "^8.0.0",
"gulp-clean-css": "^3.3.1",
"gulp-eslint": "^3.0.1",
"gulp-sass-lint": "^1.3.2",
"gulp-cli": "^2.0.1",
"gulp-concat": "^2.5.2",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
"gulp-extname": "^0.2.0",
"gulp-if": "^2.0.0",
"gulp-imagemin": "^4.1.0",
"gulp-load-plugins": "^1.1.0",
"gulp-postcss": "^8.0.0",
"gulp-sass": "^4.0.1",
"gulp-sourcemaps": "^2.6.4",
"gulp-uglify": "^3.0.1",
"js-yaml": "^3.4.6",
"panini": "^1.3.0",
"rimraf": "^2.4.3",
"style-sherpa": "^1.0.0",
"uncss": "^0.16.2",
"vinyl-named": "^1.1.0",
"webpack": "^4.20.2",
"webpack-stream": "^5.1.1",
"yargs": "^12.0.2",
"chai": "^4",
"chai-jquery": "^2",
"mocha": "^5",
"mocha-headless-chrome": "^2",
"mocha-lcov-reporter": "^1",
"nyc": "^13",
"sinon": "^7",
"sass-true": "^2.2.2",
"sass-lint": "^1.12.1",
"eslint": "^5.8.0"
},
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
"@babel/preset-env"
]
}
]
]
},
"babel": {
"presets": [
"@babel/preset-env"
]
},
"nyc": {
"include": [
"./src/assets/js/**/*.js"
],
"exclude": [],
"reporter": [
"lcov",
"clover",
"html",
"text-summary"
],
"report-dir": "./dist/coverage",
"instrument": true,
"sourceMap": true
}
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>web-base</title>
<link rel="stylesheet" href="/assets/css/app.css" />
<script src="/assets/js/app.js"></script>
</head>
<body>
{{> body}}
</body>
</html>
<header class="row">
<div class="large-12 columns">
<h1>[Theme - HTML Elements]</h1>
</div>
</header>
<div class="row">
<div class="large-12 columns">
<h2>Typography</h2>
<div class="callout">
<h1>H1 headline text example 😎</h1>
<h2>H2 headline text example</h2>
<h3>H3 headline text example</h3>
<h4>H4 headline text example</h4>
<h5>H5 headline text example</h5>
<h6>H6 headline text example</h6>
<p>paragraph text example</p>
<p><em>emphasized text example</em></p>
<p><strong>strong emphasized text example</strong></p>
<p><code>code text example</code></p>
<p><pre>pre-formated text example</pre></p>
<p><a href=".">text link example</a></p>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<h2>Unordered lists</h2>
<div class="callout">
<ul>
<li>Lorem ipsum...</li>
<li>Lorem ipsum...</li>
<li>Lorem ipsum...</li>
<li>
<ul>
<li>Lorem ipsum...</li>
<li>Lorem ipsum...</li>
<li>
<ul>
<li>Lorem ipsum...</li>
<li>Lorem ipsum...</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<h2>Ordered lists</h2>
<div class="callout">
<ol>
<li>Lorem ipsum...</li>
<li>Lorem ipsum...</li>
<li>Lorem ipsum...</li>
<ol>
<li>Lorem ipsum...</li>
<li>Lorem ipsum...</li>
<li>
<ol>
<li>Lorem ipsum...</li>
<li>Lorem ipsum...</li>
</ol>
</li>
</ol>
<li>
</li>
</ol>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Horizontal Rules</h2>
<div class="callout">
<hr>
<hr>
<hr>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Typographic replacements</h2>
<div class="callout">
<p>Enable typographer option to see result.</p>
<p>© © ® ® ™ ™ § § ±</p>
<p>test… test… test… test?.. test!..</p>
<p>!!! ??? , – —</p>
<p>“Smartypants, double quotes” and ‘single quotes’</p>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Emphasis</h2>
<div class="callout">
<p><strong>This is bold text</strong></p>
<p><b>This is bold text</b></p>
<p><em>This is italic text</em></p>
<p><i>This is italic text</i></p>
<p><s>Strikethrough</s></p>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Blockquotes</h2>
<div class="callout">
<blockquote>
<p>Blockquotes can also be nested…</p>
<blockquote>
<p>…by using additional greater-than signs right next to each other…</p>
<blockquote>
<p>…or with spaces between arrows.</p>
</blockquote>
</blockquote>
</blockquote>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Lists</h2>
<div class="callout">
<p>Unordered</p>
<ul>
<li>Create a list by starting a line with <code>+</code>, <code>-</code>, or <code>*</code></li>
<li>Sub-lists are made by indenting 2 spaces:
<ul>
<li>Marker character change forces new list start:
<ul>
<li>Ac tristique libero volutpat at</li>
</ul>
<ul>
<li>Facilisis in pretium nisl aliquet</li>
</ul>
<ul>
<li>Nulla volutpat aliquam velit</li>
</ul>
</li>
</ul>
</li>
<li>Very easy!</li>
</ul>
<p>Ordered</p>
<ol>
<li>
<p>Lorem ipsum dolor sit amet</p>
</li>
<li>
<p>Consectetur adipiscing elit</p>
</li>
<li>
<p>Integer molestie lorem at massa</p>
</li>
<li>
<p>You can use sequential numbers…</p>
</li>
<li>
<p>…or keep all the numbers as <code>1.</code></p>
</li>
</ol>
<p>Start numbering with offset:</p>
<ol start="57">
<li>foo</li>
<li>bar</li>
</ol>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Code</h2>
<div class="callout">
<p>Inline <code>code</code></p>
<p>Indented code</p>
<pre><code>// Some comments
line 1 of code
line 2 of code
line 3 of code
</code></pre>
<p>Block code “fences”</p>
<pre class="hljs"><code>Sample text here...
</code></pre>
<p>Syntax highlighting</p>
<pre class="hljs language-js"><code><span class="hljs-keyword">var</span> foo = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">bar</span>) </span>{
<span class="hljs-keyword">return</span> bar++;
};
<span class="hljs-built_in">console</span>.log(foo(<span class="hljs-number">5</span>));
</code></pre>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Tables</h2>
<div class="callout">
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>data</td>
<td>path to data files to supply the data that will be passed into templates.</td>
</tr>
<tr>
<td>engine</td>
<td>engine to be used for processing templates. Handlebars is the default.</td>
</tr>
<tr>
<td>ext</td>
<td>extension to be used for dest files.</td>
</tr>
</tbody>
</table>
<p>Right aligned columns</p>
<table>
<thead>
<tr>
<th style="text-align:right">Option</th>
<th style="text-align:right">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">data</td>
<td style="text-align:right">path to data files to supply the data that will be passed into templates.</td>
</tr>
<tr>
<td style="text-align:right">engine</td>
<td style="text-align:right">engine to be used for processing templates. Handlebars is the default.</td>
</tr>
<tr>
<td style="text-align:right">ext</td>
<td style="text-align:right">extension to be used for dest files.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Links</h2>
<div class="callout">
<p><a href="http://dev.nodeca.com">link text</a></p>
<p><a href="http://nodeca.github.io/pica/demo/" title="title text!">link with title</a></p>
<p>Autoconverted link <a href="https://github.com/nodeca/pica">https://github.com/nodeca/pica</a> (enable linkify to see)</p>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Images</h2>
<div class="callout">
<p><img src="https://octodex.github.com/images/minion.png" alt="Minion">
<img src="https://octodex.github.com/images/stormtroopocat.jpg" alt="Stormtroopocat" title="The Stormtroopocat"></p>
<p>Like links, Images also have a footnote style syntax</p>
<p><img src="https://octodex.github.com/images/dojocat.jpg" alt="Alt text" title="The Dojocat"></p>
<p>With a reference later in the document defining the URL location:</p>
</div>
</div>
</div>
<div class="row">
<div class="large-12 column">
<h2>Plugins</h2>
<div class="callout">
<p>The killer feature of <code>markdown-it</code> is very effective support of
<a href="https://www.npmjs.org/browse/keyword/markdown-it-plugin">syntax plugins</a>.</p>
<h3><a href="https://github.com/markdown-it/markdown-it-emoji">Emojies</a></h3>
<blockquote>
<p>Classic markup: 😉 :crush: 😢 :tear: 😆 😋</p>
<p>Shortcuts (emoticons): 😃 😦 😎 😉</p>
</blockquote>
<p>see <a href="https://github.com/markdown-it/markdown-it-emoji#change-output">how to change output</a> with twemoji.</p>
<h3><a href="https://github.com/markdown-it/markdown-it-sub">Subscript</a> / <a href="https://github.com/markdown-it/markdown-it-sup">Superscript</a></h3>
<ul>
<li>19<sup>th</sup></li>
<li>H<sub>2</sub>O</li>
</ul>
<h3><a href="https://github.com/markdown-it/markdown-it-ins">&lt;ins&gt;</a></h3>
<p><ins>Inserted text</ins></p>
<h3><a href="https://github.com/markdown-it/markdown-it-mark">&lt;mark&gt;</a></h3>
<p><mark>Marked text</mark></p>
<h3><a href="https://github.com/markdown-it/markdown-it-footnote">Footnotes</a></h3>
<p>Footnote 1 link<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup>.</p>
<p>Footnote 2 link<sup class="footnote-ref"><a href="#fn2" id="fnref2">[2]</a></sup>.</p>
<p>Inline footnote<sup class="footnote-ref"><a href="#fn3" id="fnref3">[3]</a></sup> definition.</p>
<p>Duplicated footnote reference<sup class="footnote-ref"><a href="#fn2" id="fnref2:1">[2:1]</a></sup>.</p>
<h3><a href="https://github.com/markdown-it/markdown-it-deflist">Definition lists</a></h3>
<dl>
<dt>Term 1</dt>
<dd>
<p>Definition 1
with lazy continuation.</p>
</dd>
<dt>Term 2 with <em>inline markup</em></dt>
<dd>
<p>Definition 2</p>
<pre><code> { some code, part of Definition 2 }
</code></pre>
<p>Third paragraph of definition 2.</p>
</dd>
</dl>
<p><em>Compact style:</em></p>
<dl>
<dt>Term 1</dt>
<dd>Definition 1</dd>
<dt>Term 2</dt>
<dd>Definition 2a</dd>
<dd>Definition 2b</dd>
</dl>
<h3><a href="https://github.com/markdown-it/markdown-it-abbr">Abbreviations</a></h3>
<p>This is <abbr title="Hyper Text Markup Language">HTML</abbr> abbreviation example.</p>
<p>It converts “<abbr title="Hyper Text Markup Language">HTML</abbr>”, but keep intact partial entries like “xxxHTMLyyy” and so on.</p>
<h3><a href="https://github.com/markdown-it/markdown-it-container">Custom containers</a></h3>
<div class="warning">
<p><em>here be dragons</em></p>
</div>
<hr class="footnotes-sep">
<section class="footnotes">
<ol class="footnotes-list">
<li id="fn1" class="footnote-item"><p>Footnote <strong>can have markup</strong></p>
<p>and multiple paragraphs. <a href="#fnref1" class="footnote-backref">↩︎</a></p>
</li>
<li id="fn2" class="footnote-item"><p>Footnote text. <a href="#fnref2" class="footnote-backref">↩︎</a> <a href="#fnref2:1" class="footnote-backref">↩︎</a></p>
</li>
<li id="fn3" class="footnote-item"><p>Text of inline footnote <a href="#fnref3" class="footnote-backref">↩︎</a></p>
</li>
</ol>
</section>
</div>
</div>
</div>
<header class="row">
<div class="large-12 columns">
<h1>[Theme]</h1>
</div>
</header>
<div class="row">
<div class="large-12 columns">
<h2>Pages</h2>
<ul>
<li><a href="/htmlelements.html">HTML elements</a></li>
<li><a href="/styleguide.html">Styleguide</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<h2>Info</h2>
<ul>
<li><a href="/build.txt">build info</a></li>
</ul>
</div>
</div>