Compare commits

...
117 Commits
Author SHA1 Message Date
squidfunk d2285b4d92 Prepare 1.0.0-beta release 2016-12-18 19:42:08 +01:00
squidfunk 91c4926fe3 Fix highlight colors for navigation links 2016-12-18 14:22:08 +01:00
squidfunk 2ae22c2e3b Added pandoc table styles to specimen 2016-12-18 14:02:20 +01:00
squidfunk 2c8a324324 Integrated data table styles from 0.2.x 2016-12-18 13:29:03 +01:00
squidfunk be2532d47f Rename bin to scripts to avoid confusion 2016-12-17 13:04:57 +01:00
squidfunk bb9a4a752d Fix specificity problem for permalinks color 2016-12-17 13:00:15 +01:00
squidfunk 41fb9cd97a Integrated palettes from 0.2.x 2016-12-17 12:53:24 +01:00
squidfunk b44c503008 Refactored search result styles 2016-12-16 09:21:31 +01:00
Martin Donath a74a025f47 Merge pull request #68 from brendo/fix-edit-uri
Build the assets so the edit link work
2016-12-16 09:01:43 +01:00
Brendan Abbott c31f1c6125 Build the assets so the edit link work, change base to 'rework' branch (for now) 2016-12-16 10:46:52 +10:00
squidfunk ee36e2368f Remove gcc/g++ dependency from CI build 2016-12-15 20:12:45 +01:00
squidfunk 3a73abad08 Added breadcrumbs in header 2016-12-15 20:04:30 +01:00
squidfunk 420b841ecf Bring back h1 headline handling from 0.2.4 2016-12-15 18:29:46 +01:00
Martin Donath 5e6f5d9089 Merge pull request #66 from brendo/specimen-updates
Specimen updates
2016-12-15 16:52:06 +01:00
Martin Donath ab99591d76 Merge branch 'rework' into specimen-updates 2016-12-15 16:48:42 +01:00
squidfunk fe12548f8e Merge pull request #65 from brendo:issue-63-mkdocs-016-compatible 2016-12-15 16:43:40 +01:00
squidfunk 49020c51ae Remove unused import 2016-12-15 15:58:53 +01:00
squidfunk 2fcfb551be Refactored JavaScript architecture 2016-12-15 15:55:40 +01:00
Brendan Abbott 9eae3956b7 Correct table styles, fix inline code link style 2016-12-03 15:17:42 +10:00
Brendan Abbott e1a24279a7 Update specimen, add inlinehilite content 2016-12-03 14:54:08 +10:00
squidfunk 65f23355c8 Added support for tasklist and critic extension + em fixes 2016-11-05 23:26:07 +01:00
squidfunk 528afd7d7f Remove unused import from mkdocs task 2016-11-02 19:33:49 +01:00
squidfunk 0d5e66d9a5 Refactored JavaScript into components 2016-11-02 19:21:14 +01:00
squidfunk 21720f1283 Switch to /Volumes/Shipwreck/github/squidfunk/mkdocs-material-experimental/node_modules/.bin 2016-11-02 09:18:00 +01:00
squidfunk 18fd27024c Added lighter and smoother styles for admonition 2016-11-01 21:38:06 +01:00
squidfunk 971aa3de0b Keep colored output of mkdocs server 2016-11-01 20:57:30 +01:00
squidfunk 2e9b339d84 Set expanded variables to backticks [ci skip] 2016-11-01 20:32:28 +01:00
squidfunk 2cd7f3de6e Make paths in bin absolute 2016-11-01 20:30:28 +01:00
squidfunk 23ebd31b30 Added missing return into task load helper 2016-10-31 17:10:31 +01:00
squidfunk ee91b92c4a Fix wrong path in scripts + try user-level install for pip 2016-10-31 10:16:26 +01:00
squidfunk 00b289bc0e Added double brackets to scripts 2016-10-31 10:06:50 +01:00
squidfunk cedc65d9fa Fix linter errors and warnings 2016-10-31 09:58:43 +01:00
squidfunk bcf634faa8 Added mkdocs to requirements.txt 2016-10-31 09:32:05 +01:00
squidfunk 3fbb56d9cf Moved scripts into bin 2016-10-30 19:30:55 +01:00
squidfunk 1bb5eb631c Add sudo to fix issues with system-wide Python installation on Travis 2016-10-30 14:15:09 +01:00
squidfunk a0c10d868a Build with node 4, 5 and 6 and install requirements 2016-10-30 14:10:44 +01:00
squidfunk 738177d5a3 Forgot to update mkdocs.yml [ci skip] 2016-10-30 11:29:24 +01:00
squidfunk e76be3b704 Removed unnecessary docs 2016-10-30 11:28:21 +01:00
squidfunk cb215d0da4 Added documentation for Permalinks extension [ci skip] 2016-10-30 11:26:55 +01:00
squidfunk f1af230918 Finished footnotes integration 2016-10-30 11:02:18 +01:00
squidfunk 8cac945757 Finished full integration for CodeHilite 2016-10-30 10:36:18 +01:00
squidfunk 669d7cbc19 Added print styles for links 2016-10-25 10:14:55 +02:00
squidfunk d3ed8ccec6 Added basic styles for @media print 2016-10-24 18:02:53 +02:00
squidfunk 26b1de049b Removed temporary rules in shame 2016-10-23 19:32:27 +02:00
squidfunk 83c5c7512b Cleaned up search modal styles 2016-10-23 19:31:54 +02:00
Martin Donath e61f12d429 Merge pull request #58 from brendo/dynamic-source-version
Use `extra.version` if it is available when generating source partial
2016-10-23 16:55:46 +02:00
Martin Donath 60f48d71d1 Merge pull request #59 from brendo/github-source-facts
Abstracts fact fetching for Github sources
2016-10-23 16:55:05 +02:00
Brendan Abbott 3537235d78 Add GithubSourceFacts, which abstracts fact fetching for Github sources 2016-10-23 19:49:22 +10:00
squidfunk 95435e7035 Implemented basic search modal functionality 2016-10-23 10:21:37 +02:00
Brendan Abbott d5a78ce396 Use extra.version if it is available when generating source partial 2016-10-23 18:11:44 +10:00
squidfunk 46b7e0f5fe Refactored admonition styles to be slightly lighter 2016-10-21 21:15:35 +02:00
squidfunk 130bd9fe0b Resolved double-clean from build process 2016-10-21 21:13:47 +02:00
squidfunk 507e98871e Improve performance by reducing compound repaints 2016-10-18 20:53:08 +02:00
squidfunk a18eb4f982 Add extra.repo_type config option to override link parser 2016-10-16 18:22:07 +02:00
squidfunk eaeba59dd8 Added guards for repository banner 2016-10-16 17:08:34 +02:00
squidfunk 4dbd2978a8 Added signal handler for karma 2016-10-16 17:06:29 +02:00
Martin Donath 1d637134b2 Merge pull request #56 from brendo/doc-updates
Minor documentation updates
2016-10-12 10:03:13 +02:00
squidfunk c814cc1584 Remove Gemini again from package.json 2016-10-12 09:46:47 +02:00
Brendan Abbott 1b58bba115 Update documentation for installation 2016-10-12 17:45:44 +10:00
squidfunk 4dbb6095bc Update GCC to 4.8 in Travis build environment 2016-10-12 09:40:23 +02:00
squidfunk e7160cb85c Remove gemini for now as it breaks the build 2016-10-12 09:28:30 +02:00
squidfunk 7b585f191a Added full JSX support to build pipeline 2016-10-10 12:35:25 +02:00
squidfunk 3e47149fe4 Restructure package.json according to npm guidelines 2016-10-07 21:27:29 +02:00
squidfunk 82eef9340f Integrated karma for unit tests 2016-10-07 16:38:13 +02:00
squidfunk cc302a70fc Added editor configuration 2016-10-07 11:17:00 +02:00
squidfunk 57822b1290 Updated changelog 2016-10-06 19:26:49 +02:00
squidfunk 2159c730c5 Introduced post-merge hook to update dependencies 2016-10-06 15:45:41 +02:00
squidfunk d5ddc1ab8f Added npm-debug.log to .gitignore 2016-10-06 15:16:57 +02:00
squidfunk ccfdbf040f Introduced pre-commit hook for linting 2016-10-06 15:14:03 +02:00
squidfunk 48dc0527c8 Added babel-register as a dependency 2016-10-06 12:20:48 +02:00
squidfunk 914ccc4550 Rewrite of Gulp asset pipeline in ES6 and separation of tasks 2016-10-06 12:14:33 +02:00
squidfunk 46f45bb8a9 Introduced ESLint for code style checks 2016-09-30 13:29:45 +02:00
squidfunk 02915210f4 Fix jittery scroll bouncing 2016-09-24 19:12:05 +02:00
squidfunk fc7fb28edb Prototyped animation for navigation on desktop 2016-09-24 18:52:37 +02:00
squidfunk e32562fb1e Repair build 2016-09-23 20:58:55 +02:00
squidfunk ffe06939a7 Refactored code container 2016-09-23 20:26:27 +02:00
squidfunk 71d022ef39 Refactored repository view and integrated into drawer 2016-09-23 17:46:16 +02:00
squidfunk 2fd1740f3d Fixed bug in scrollspy 2016-09-23 12:39:47 +02:00
squidfunk 9338045887 Refactored navigation and drawer 2016-09-23 11:56:25 +02:00
squidfunk b387f2abee Corrected BEM nesting depths 2016-09-13 20:58:28 +02:00
squidfunk 0111478b65 Added icons for GitHub, GitLab and BitBucket integrations 2016-09-11 19:58:22 +02:00
squidfunk 37310eb52d Refactored Gulp workflow and added styles for extensions 2016-09-11 19:00:53 +02:00
squidfunk 841b493df6 Adjusted error handling in px2em 2016-09-08 22:29:26 +02:00
squidfunk f5ad733181 General refactoring of rework 2016-09-08 19:43:23 +02:00
squidfunk 6ac4b0f749 Updated resets 2016-09-04 18:13:17 +02:00
squidfunk adf6f50c3e Exclude _shame.scss from linting [ci skip] 2016-09-04 17:39:16 +02:00
squidfunk ba788dcaba Fix errors in generated SassDoc 2016-09-04 17:32:12 +02:00
squidfunk 5e838ecf4f Introduced SassLint for code style checks 2016-09-04 17:11:58 +02:00
squidfunk 72c7841808 Updated changelog 2016-09-03 16:05:10 +02:00
squidfunk 2eed3bdb4f Added support for footnotes 2016-09-02 22:59:14 +02:00
squidfunk 930c206132 Fix material color library in package.json 2016-09-02 00:59:49 +02:00
squidfunk 1a92f01c41 Fix ci build script 2016-09-02 00:44:49 +02:00
squidfunk d7d7ef566c Fix indent 2016-09-02 00:44:04 +02:00
squidfunk fec7e13bea Admonition styles and removed bower as dependency 2016-09-02 00:33:45 +02:00
squidfunk c3e10c25f3 Add target support for permalinks 2016-08-10 23:01:31 +02:00
squidfunk c534800ab9 Added search bar to screen header 2016-08-08 23:33:06 +02:00
squidfunk 7f2444174f Initial commit of rework 2016-08-07 18:01:56 +02:00
squidfunk 4b9c8b9a49 Prepare 0.2.1 release 2016-03-12 13:25:05 +01:00
squidfunk a58cb0aea6 Added documentation for Google Analytics integration 2016-03-12 13:21:06 +01:00
squidfunk cf8e992c24 Fixed empty list in table of contents when no headline is defined 2016-03-12 13:20:19 +01:00
squidfunk bf227de93e Fixed #13: Table cells don't wrap 2016-03-12 13:15:15 +01:00
squidfunk c829555313 Set up tracking of site search for Google Analytics 2016-02-27 12:20:49 +01:00
squidfunk f6195de306 Corrected wrong path for static asset monitoring in Gulpfile 2016-02-27 12:19:18 +01:00
squidfunk 3e508f45f2 Fixed #10: Invisible header after closing search bar with ESC key 2016-02-25 19:05:53 +01:00
squidfunk 573b74881d Prepare 0.2.0 release 2016-02-24 18:11:04 +01:00
squidfunk a65b1a05d8 Added images showing colors to documentation 2016-02-24 18:10:11 +01:00
squidfunk bb5f98e617 Updated documentation 2016-02-24 17:31:01 +01:00
squidfunk e256360619 Remove bottom border on footer hover and fix default label 2016-02-24 17:30:42 +01:00
squidfunk 0eb02a0d10 Fixed #7: Better colors for links inside admonition notes and warnings 2016-02-24 16:40:00 +01:00
squidfunk 32a14cbb12 Fixed #6: Include multiple color palettes via mkdocs.yml 2016-02-24 16:24:32 +01:00
squidfunk bf8be26e0a Fixed #9: Text for prev/next footer navigation should be customizable 2016-02-24 12:40:02 +01:00
squidfunk 60f2982c25 Prepare 0.1.3 release 2016-02-21 18:30:49 +01:00
squidfunk 610d8c0e95 Fixed #5: Page without headlines renders empty list in table of contents 2016-02-21 18:19:25 +01:00
squidfunk ba72ddb949 Fixed #4: Click on Logo/Title without Github-Repository: None 2016-02-21 17:32:36 +01:00
squidfunk e7a41822a0 Moved Modernizr to top to ensure basic usability in IE8 2016-02-20 17:25:14 +01:00
squidfunk fd290d0d7c Fixed #2: Ordered lists within an unordered list have ::before content 2016-02-20 17:03:27 +01:00
squidfunk 9d9effc106 Updated documentation 2016-02-17 18:08:11 +01:00
185 changed files with 19977 additions and 5359 deletions
+10
View File
@@ -0,0 +1,10 @@
{
"presets": ["es2015"],
"plugins": [
"add-module-exports",
"babel-root-import",
["transform-react-jsx", {
"pragma": "JSX.createElement"
}]
]
}
+31
View File
@@ -0,0 +1,31 @@
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Top-level config
root = true
# All files
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
+7
View File
@@ -0,0 +1,7 @@
/build
/material
/site
# Temporary
/tests/regression
/lib/tasks/tests/regression
+199
View File
@@ -0,0 +1,199 @@
{
"extends": "eslint:recommended",
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"globalReturn": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"octalLiterals": true,
"regexUFlag": true,
"regexYFlag": true,
"spread": true,
"superInFunctions": false,
"templateStrings": true,
"unicodeCodePointEscapes": true
},
"env": {
"browser": true,
"es6": true,
"node": true
},
"globals": {
"Modernizr": true,
"navigator": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"impliedStrict": true,
"sourceType": "module"
},
"plugins": [],
"rules": {
"array-callback-return": 2,
"array-bracket-spacing": 2,
"arrow-parens": [2, "as-needed"],
"arrow-spacing": 2,
"block-scoped-var": 2,
"block-spacing": 2,
"brace-style": 2,
"camelcase": [2, {
"properties": "always"
}],
"comma-dangle": [2, "never"],
"comma-style": [2, "last"],
"complexity": 2,
"computed-property-spacing": 2,
"consistent-this": 2,
"dot-notation": 2,
"eol-last": 2,
"eqeqeq": 2,
"func-call-spacing": 2,
"func-names": [2, "never"],
"func-style": 2,
"generator-star-spacing": 2,
"indent": [2, 2, {
"FunctionDeclaration": {
"body": 1,
"parameters": 2
},
"FunctionExpression": {
"body": 1,
"parameters": 2
},
"MemberExpression": 1,
"VariableDeclarator": {
"var": 2,
"let": 2,
"const": 3
},
"SwitchCase": 1
}],
"init-declarations": 2,
"key-spacing": 2,
"keyword-spacing": 2,
"linebreak-style": 2,
"lines-around-comment": 2,
"lines-around-directive": 2,
"max-depth": 2,
"max-len": [1, {
"ignorePattern": "\/\/ TODO"
}],
"max-nested-callbacks": 2,
"max-params": 2,
"max-statements-per-line": 2,
"new-cap": 2,
"newline-per-chained-call": 2,
"no-array-constructor": 2,
"no-alert": 2,
"no-caller": 2,
"no-confusing-arrow": [2, {
"allowParens": false
}],
"no-console": 1,
"no-duplicate-imports": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-floating-decimal": 2,
"no-global-assign": 2,
"no-invalid-this": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multiple-empty-lines": [1, {
"max": 1
}],
"no-nested-ternary": 2,
"no-new": 0,
"no-new-object": 2,
"no-param-reassign": 2,
"no-prototype-builtins": 2,
"no-shadow": 2,
"no-tabs": 2,
"no-template-curly-in-string": 2,
"no-throw-literal": 2,
"no-trailing-spaces": 2,
"no-undefined": 2,
"no-underscore-dangle": [2, {
"allowAfterThis": true,
"allowAfterSuper": true
}],
"no-unneeded-ternary": 2,
"no-unsafe-negation": 2,
"no-unused-expressions": 2,
"no-unused-vars": 1,
"no-use-before-define": 2,
"no-useless-call": 2,
"no-useless-computed-key": 2,
"no-useless-constructor": 2,
"no-useless-rename": 2,
"no-var": 2,
"no-whitespace-before-property": 2,
"no-with": 2,
"object-curly-spacing": [2, "always"],
"object-shorthand": 2,
"one-var-declaration-per-line": 2,
"operator-assignment": 2,
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-numeric-literals": 2,
"prefer-spread": 2,
"prefer-template": 2,
"quotes": [2, "double"],
"radix": 2,
"require-jsdoc": [1, {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": false
}
}],
"rest-spread-spacing": 2,
"semi": [2, "never"],
"semi-spacing": 2,
"space-before-function-paren": [2, "never"],
"space-in-parens": 2,
"space-infix-ops": 2,
"space-unary-ops": 2,
"spaced-comment": [2, "always", {
"line": {
"markers": ["/"],
"exceptions": ["-", "+"]
},
"block": {
"markers": ["!"],
"exceptions": ["*"],
"balanced": true
}
}],
"strict": 2,
"template-curly-spacing": 2,
"unicode-bom": 2,
"valid-jsdoc": [1, {
"prefer": {
"arg": "param",
"argument": "param",
"class": "constructor",
"returns": "return",
"virtual": "abstract"
},
"requireParamDescription": true,
"requireReturn": false,
"requireReturnDescription": true
}],
"yield-star-spacing": 2
},
"root": true
}
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Check, if all changes are added to the index
CHANGED="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
# Perform install and prune of NPM dependencies if package.json changed
if $(echo "$CHANGED" | grep --quiet package.json); then
echo "Hook[post-merge]: Updating dependencies..."
npm install && npm prune
fi
+70
View File
@@ -0,0 +1,70 @@
#!/bin/bash
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Check, if all changes are added to the index
CWD_CLEAN="$(git diff-index HEAD --)"
# This variables stores the state of the stash.
# 0 = not restored yet.
# 1 = stash was already reset
STASH_POPPED=0
# Pop the stash in case of trap
function cleanup {
if test -n "$CWD_CLEAN"; then
if test "$STASH_POPPED" != 1 ; then
# Pop the changes (= stash) back to the work space
git stash pop -q
fi
fi
exit
}
# Register signal handler
trap cleanup SIGHUP SIGINT SIGTERM
# Stash all changes that were not added to the commit
if test -n "$CWD_CLEAN"; then
git stash -q --keep-index --include-untracked
fi
# Run the check and print indicator
echo "Hook[pre-commit]: Running linter..."
STD_OUT=$(npm run lint --silent)
# Grab exit code of check
HAD_ERROR=$?
# Pop the changes (= stash) back to the work space
if test -n "$CWD_CLEAN"; then
git stash pop -q
STASH_POPPED=1
fi
# In case of error, print output of check
if test "$HAD_ERROR" != 0 ; then
echo ${STD_OUT}
exit 1
fi
# Reset indicator and exit
exit 0
+28
View File
@@ -0,0 +1,28 @@
## Description
[Description of the bug]
### Expected behavior
[What you expected to happen]
### Actual behavior
[What is actually happening]
### Steps to reproduce the bug
1. [First step]
2. [Second step]
3. [and so on...]
### Package versions
- Python: `python --version`
- MkDocs: `mkdocs --version`
- Material: `pip show mkdocs-material | grep -E ^Version`
### System information
- OS: [The operating system you're running]
- Browser: [The browser used, if relevant]
+9 -8
View File
@@ -21,15 +21,16 @@
# Mac OS X internals
.DS_Store
# Bower and NPM libraries
bower_components
node_modules
# NPM-related
/node_modules
/npm-debug.log
# Build files
build
MANIFEST
site
/build
/manifest.json
/MANIFEST
/site
# Distribution files
dist
mkdocs_material.egg-info
/dist
/mkdocs_material.egg-info
+128
View File
@@ -0,0 +1,128 @@
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
files:
ignore:
- node_modules/**
- src/assets/stylesheets/extensions/pymdown/_arithmatex.scss
- src/assets/stylesheets/extensions/pymdown/_inlinehilite.scss
- src/assets/stylesheets/_shame.scss
options:
merge-default-rules: true
formatter: stylish
rules:
attribute-quotes: 2
bem-depth: 2
border-zero: 2
brace-style: 2
class-name-format:
- 2
- convention: hyphenatedbem
clean-import-paths: 2
empty-args: 2
empty-line-between-blocks: 2
extends-before-declarations: 2
extends-before-mixins: 2
final-newline: 2
function-name-format:
- 2
- allow-leading-underscore: false
force-attribute-nesting: 0
force-element-nesting: 0
force-pseudo-nesting: 0
hex-length:
- 2
- style: long
hex-notation:
- 2
- style: uppercase
id-name-format:
- 2
indentation: 0
leading-zero:
- 2
- include: true
mixin-name-format:
- 2
- convention: hyphenatedbem
- allow-leading-underscore: false
mixins-before-declarations:
- 2
- exclude:
- break-at
- break-at-orientation
- break-at-ratio
- break-at-device
- break-from-device
- break-to-device
nesting-depth:
- 2
- max-depth: 4
no-color-keywords: 2
no-color-literals: 2
no-css-comments: 2
no-debug: 2
no-duplicate-properties: 0
no-empty-rulesets: 2
no-important: 2
no-invalid-hex: 2
no-mergeable-selectors: 0
no-misspelled-properties: 0
no-qualifying-elements:
- 2
- allow-element-with-attribute: true
no-trailing-zero: 0
no-transition-all: 2
no-url-protocols: 2
no-vendor-prefixes: 0
one-declaration-per-line: 2
placeholder-name-format:
- 2
- convention: hyphenatedbem
property-sort-order:
- 2
- order: smacss
property-units:
- 2
- global: [rem, em, s, vh, mm]
pseudo-element: 2
quotes:
- 2
- style: double
shorthand-values: 2
single-line-per-selector: 2
space-after-bang: 2
space-after-colon: 2
space-after-comma: 2
space-around-operator: 2
space-before-bang: 2
space-before-brace: 2
space-before-colon: 2
space-between-parens: 2
trailing-semicolon: 2
url-quotes: 2
variable-for-property: 2
variable-name-format:
- 2
- convention: hyphenatedbem
- allow-leading-underscore: false
zero-unit: 2
+7 -11
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2016 Martin Donath <martin.donath@squidfunk.com>
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
@@ -19,21 +19,17 @@
# IN THE SOFTWARE.
language: node_js
sudo: false
# Node.js versions
node_js:
- '4.1'
- '0.11'
- 4
- 5
- 6
# Install dependencies
before_script:
# Install bower
- npm install -g bower
# Install project dependencies
- npm install
- bower install
- pip install --user -r requirements.txt
# Perform build and tests
script: gulp build --production
script: npm run build
+78 -2
View File
@@ -1,3 +1,79 @@
mkdocs-material-1.0.0 (2016-12-18)
The theme has been entirely rewritten from scratch to better reflect the
idea of what a documentation theme using the Material Design guidelines
should look like. It is heavily inspired by Google's own documentation
theme, but doesn't copy it blindly.
* Introduced Webpack for more sophisticated JavaScript bundling
* Introduced ESLint and SassLint for code style checks
* Introduced more accurate Material Design colors and shadows
* Introduced modular scales for harmonic font sizing
* Introduced git-hooks for better development workflow
* Rewrite of CSS using the BEM methodology and SassDoc guidelines
* Rewrite of JavaScript using ES6 and Babel as a transpiler
* Rewrite of Admonition, Permalinks and Codehilite integration
* Rewrite of the complete typographical system
* Rewrite of Gulp asset pipeline in ES6 and separation of tasks
* Removed Bower as a dependency in favor of NPM
* Removed custom icon build in favor of the Material Design iconset
* Removed _blank targets on links due to vulnerability: http://bit.ly/1Mk2Rtw
* Removed unversioned assets from build directory
* Restructured templates into base templates and partials
* Added build and watch scripts in package.json
* Added support for Metadata and Footnotes Markdown extensions
* Added support for pymdownx.* Markdown extensions
* Added support for collapsible sections in navigation
* Added support for separate table of contents
* Added support for better accessibility through REM-based layout
* Added icons for GitHub, GitLab and BitBucket integrations
* Added more detailed documentation on specimen, extensions etc.
* Added a 404.html error page for deployment on GitHub Pages
* Fixed live reload chain in watch mode when saving a template
* Fixed variable references to work with mkdocs 0.16
mkdocs-material-0.2.4 (2016-06-26)
* Fixed improperly set default favicon
* Fixed #33: Protocol relative URL for webfonts doesn't work with file://
* Fixed #34: IE11 on Windows 7 doesn't honor max-width on main tag
* Fixed #35: Add styling for blockquotes
mkdocs-material-0.2.3 (2016-05-16)
* Fixed #25: Highlight inline fenced blocks
* Fixed #26: Better highlighting for keystrokes
* Fixed #30: Suboptimal syntax highlighting for PHP
mkdocs-material-0.2.2 (2016-03-20)
* Fixed #15: Document pygments dependency for codehilite
* Fixed #16: Favicon could not be set through mkdocs.yml
* Fixed #17: Put version into own container for styling
* Fixed #20: Fix rounded borders for tables
mkdocs-material-0.2.1 (2016-03-12)
* Fixed #10: Invisible header after closing search bar with ESC key
* Fixed #13: Table cells don't wrap
* Fixed empty list in table of contents when no headline is defined
* Corrected wrong path for static asset monitoring in Gulpfile.js
* Set up tracking of site search for Google Analytics
mkdocs-material-0.2.0 (2016-02-24)
* Fixed #6: Include multiple color palettes via mkdocs.yml
* Fixed #7: Better colors for links inside admonition notes and warnings
* Fixed #9: Text for prev/next footer navigation should be customizable
* Refactored templates (replaced if/else with modifiers where possible)
mkdocs-material-0.1.3 (2016-02-21)
* Fixed #3: Ordered lists within an unordered list have ::before content
* Fixed #4: Click on Logo/Title without Github-Repository: "None"
* Fixed #5: Page without headlines renders empty list in table of contents
* Moved Modernizr to top to ensure basic usability in IE8
mkdocs-material-0.1.2 (2016-02-16)
* Fixed styles for deep navigational hierarchies
@@ -11,11 +87,11 @@ mkdocs-material-0.1.2 (2016-02-16)
mkdocs-material-0.1.1 (2016-02-11)
* Fixed #1: GitHub stars don't work if the repo_url ends with a '/'
* Updated npm and bower dependencies to most recent versions
* Updated NPM and Bower dependencies to most recent versions
* Changed footer/copyright link to Material theme to GitHub pages
* Made MkDocs building/serving in build process optional
* Set up continuous integration with travis-ci.org
mkdocs-material-0.1.0 (2016-02-09)
* Initial release
* Initial release
+343
View File
@@ -0,0 +1,343 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import gulp from "gulp"
import notifier from "node-notifier"
import plumber from "gulp-plumber"
import util from "gulp-util"
import yargs from "yargs"
/* ----------------------------------------------------------------------------
* Configuration and arguments
* ------------------------------------------------------------------------- */
const config = {
assets: {
src: "src/assets", /* Source directory for assets */
build: "material/assets" /* Target directory for assets */
},
lib: "lib", /* Libraries */
views: {
src: "src", /* Source directory for views */
build: "material" /* Target directory for views */
}
}
const args = yargs
.default("clean", false) /* Clean before build */
.default("karma", true) /* Karma watchdog */
.default("lint", true) /* Lint sources */
.default("mkdocs", true) /* MkDocs watchdog */
.default("optimize", false) /* Optimize sources */
.default("revision", false) /* Revision assets */
.default("sourcemaps", false) /* Create sourcemaps */
.argv
/* ----------------------------------------------------------------------------
* Overrides and helpers
* ------------------------------------------------------------------------- */
/*
* Override gulp.src() for nicer error handling.
*/
const src = gulp.src
gulp.src = (...glob) => {
return src.apply(gulp, glob)
.pipe(
plumber(function(error) {
util.log(util.colors.red(
`Error (${error.plugin}): ${error.message}`
))
/* Extract file where error happened, if existent */
const file = error.relativePath
? error.relativePath.split("/").pop()
: ""
/* Dispatch system-level notification */
notifier.notify({
title: `Error (${error.plugin}): ${file}`,
message: error.messageOriginal
})
// eslint-disable-next-line no-invalid-this
this.emit("end")
/* Throw error and abort, if not in watch mode */
if (args._[0] !== "watch")
throw error
}))
}
/*
* Helper function to load a task
*/
const load = task => {
return require(`./${config.lib}/tasks/${task}`)(gulp, config, args)
}
/* ----------------------------------------------------------------------------
* Images
* ------------------------------------------------------------------------- */
/*
* Copy favicon
*/
gulp.task("assets:images:build:ico",
load("assets/images/build/ico"))
/*
* Copy and minify vector graphics
*/
gulp.task("assets:images:build:svg",
load("assets/images/build/svg"))
/*
* Copy images
*/
gulp.task("assets:images:build", args.clean ? [
"assets:images:clean"
] : [], () => {
return gulp.start([
"assets:images:build:ico",
"assets:images:build:svg"
])
})
/*
* Clean images generated by build
*/
gulp.task("assets:images:clean",
load("assets/images/clean"))
/* ----------------------------------------------------------------------------
* JavaScript
* ------------------------------------------------------------------------- */
/*
* Build application logic
*/
gulp.task("assets:javascripts:build:application",
load("assets/javascripts/build/application"))
/*
* Build custom modernizr
*/
gulp.task("assets:javascripts:build:modernizr", [
"assets:stylesheets:build"
], load("assets/javascripts/build/modernizr"))
/*
* Build application logic and modernizr
*/
gulp.task("assets:javascripts:build", (args.clean ? [
"assets:javascripts:clean"
] : []).concat(args.lint ? [
"assets:javascripts:lint"
] : []), () => {
return gulp.start([
"assets:javascripts:build:application",
"assets:javascripts:build:modernizr"
])
})
/*
* Clean JavaScript generated by build
*/
gulp.task("assets:javascripts:clean",
load("assets/javascripts/clean"))
/*
* Lint JavaScript
*/
gulp.task("assets:javascripts:lint",
load("assets/javascripts/lint"))
/* ----------------------------------------------------------------------------
* Stylesheets
* ------------------------------------------------------------------------- */
/*
* Build stylesheets from SASS source
*/
gulp.task("assets:stylesheets:build", (args.clean ? [
"assets:stylesheets:clean"
] : []).concat(args.lint ? [
"assets:stylesheets:lint"
] : []),
load("assets/stylesheets/build"))
/*
* Clean stylesheets generated by build
*/
gulp.task("assets:stylesheets:clean",
load("assets/stylesheets/clean"))
/*
* Lint SASS sources
*/
gulp.task("assets:stylesheets:lint",
load("assets/stylesheets/lint"))
/* ----------------------------------------------------------------------------
* Assets
* ------------------------------------------------------------------------- */
/*
* Build assets
*/
gulp.task("assets:build", [
"assets:images:build",
"assets:javascripts:build",
"assets:stylesheets:build"
])
/*
* Clean files generated by build
*/
gulp.task("assets:clean", [
"assets:images:clean",
"assets:javascripts:clean",
"assets:stylesheets:clean"
])
/* ----------------------------------------------------------------------------
* Views
* ------------------------------------------------------------------------- */
/*
* Minify views
*/
gulp.task("views:build", (args.revision ? [
"assets:images:build",
"assets:stylesheets:build",
"assets:javascripts:build"
] : []).concat(args.clean ? [
"views:clean"
] : []), load("views/build"))
/*
* Clean views
*/
gulp.task("views:clean",
load("views/clean"))
/* ----------------------------------------------------------------------------
* MkDocs
* ------------------------------------------------------------------------- */
/*
* Build documentation
*/
gulp.task("mkdocs:build", [
"assets:build",
"views:build",
"mkdocs:clean"
], load("mkdocs/build"))
/*
* Clean documentation build
*/
gulp.task("mkdocs:clean",
load("mkdocs/clean"))
/*
* Restart MkDocs server
*/
gulp.task("mkdocs:serve",
load("mkdocs/serve"))
/* ----------------------------------------------------------------------------
* Tests
* ------------------------------------------------------------------------- */
/*
* Start karma test runner
*/
gulp.task("tests:unit:watch",
load("tests/unit/watch"))
/* ----------------------------------------------------------------------------
* Interface
* ------------------------------------------------------------------------- */
/*
* Build assets and documentation
*/
gulp.task("build", [
"assets:build",
"views:build"
].concat(args.mkdocs
? "mkdocs:build"
: []))
/*
* Clean assets and documentation
*/
gulp.task("clean", [
"assets:clean",
"views:clean",
"mkdocs:clean"
])
/*
* Watch for changes and rebuild assets on the fly
*/
gulp.task("watch", [
"assets:build",
"views:build"
], () => {
process.env.WATCH = true
/* Start MkDocs server */
if (args.mkdocs)
gulp.start("mkdocs:serve")
/* Start karma test runner */
if (args.karma)
gulp.start("tests:unit:watch")
/* Rebuild stylesheets */
gulp.watch([
`${config.assets.src}/stylesheets/**/*.scss`
], ["assets:stylesheets:build"])
/* Rebuild JavaScript */
gulp.watch([
`${config.assets.src}/javascripts/**/*.{js,jsx}`
], ["assets:javascripts:build:application"])
/* Copy images */
gulp.watch([
`${config.assets.src}/images/**/*`
], ["assets:images:build"])
/* Minify views */
gulp.watch([
`${config.views.src}/**/*.html`
], ["views:build"])
})
/*
* Build assets by default
*/
gulp.task("default", ["build"])
-332
View File
@@ -1,332 +0,0 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
/* ----------------------------------------------------------------------------
* Imports
* ------------------------------------------------------------------------- */
var gulp = require('gulp');
var addsrc = require('gulp-add-src');
var args = require('yargs').argv;
var autoprefix = require('autoprefixer');
var child = require('child_process');
var clean = require('del');
var collect = require('gulp-rev-collector');
var compact = require('gulp-remove-empty-lines');
var concat = require('gulp-concat');
var ignore = require('gulp-ignore');
var gulpif = require('gulp-if');
var mincss = require('gulp-cssnano');
var minhtml = require('gulp-htmlmin');
var minimage = require('gulp-image-optimization');
var modernizr = require('gulp-modernizr');
var mqpacker = require('css-mqpacker');
var notifier = require('node-notifier');
var plumber = require('gulp-plumber');
var postcss = require('gulp-postcss');
var rev = require('gulp-rev');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var util = require('gulp-util');
var vinyl = require('vinyl-paths');
/* ----------------------------------------------------------------------------
* Locals
* ------------------------------------------------------------------------- */
/* MkDocs server */
var server = null;
/* ----------------------------------------------------------------------------
* Overrides
* ------------------------------------------------------------------------- */
/*
* Override gulp.src() for nicer error handling.
*/
var src = gulp.src;
gulp.src = function() {
return src.apply(gulp, arguments)
.pipe(
plumber(function(error) {
util.log(util.colors.red(
'Error (' + error.plugin + '): ' + error.message
));
notifier.notify({
title: 'Error (' + error.plugin + ')',
message: error.message.split('\n')[0]
});
this.emit('end');
}));
};
/* ----------------------------------------------------------------------------
* Asset pipeline
* ------------------------------------------------------------------------- */
/*
* Build stylesheets from SASS source.
*/
gulp.task('assets:stylesheets', function() {
return gulp.src('src/assets/stylesheets/*.scss')
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
.pipe(
sass({
includePaths: [
'bower_components/bourbon/app/assets/stylesheets/',
'bower_components/quantum-colors/',
'bower_components/quantum-shadows/'
]
}))
.pipe(
postcss([
autoprefix(),
mqpacker
]))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulpif(args.production, mincss()))
.pipe(gulp.dest('material/assets/stylesheets/'));
});
/*
* Build javascripts from Bower components and source.
*/
gulp.task('assets:javascripts', function() {
return gulp.src([
/* Bower components */
'bower_components/classlist/classList.js',
'bower_components/fastclick/lib/fastclick.js',
'bower_components/pegasus/dist/pegasus.js',
'bower_components/lunr.js/lunr.js',
/* Application javascripts */
'src/assets/javascripts/application.js',
'src/assets/javascripts/standalone.js'
]).pipe(gulpif(args.sourcemaps, sourcemaps.init()))
.pipe(concat('application.js'))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulpif(args.production, uglify()))
.pipe(gulp.dest('material/assets/javascripts/'));
});
/*
* Create a customized modernizr build.
*/
gulp.task('assets:modernizr', [
'assets:stylesheets',
'assets:javascripts'
], function() {
return gulp.src([
'material/assets/stylesheets/application.css',
'material/assets/javascripts/application.js'
]).pipe(
modernizr({
options: [
'addTest', /* Add custom tests */
'fnBind', /* Use function.bind */
'html5printshiv', /* HTML5 support for IE */
'setClasses', /* Add CSS classes to root tag */
'testProp' /* Test for properties */
]
}))
.pipe(addsrc.append('bower_components/respond/dest/respond.src.js'))
.pipe(concat('modernizr.js'))
.pipe(gulpif(args.production, uglify()))
.pipe(gulp.dest('material/assets/javascripts'));
});
/*
* Copy static assets like images and webfonts.
*/
gulp.task('assets:static', function() {
return gulp.src('src/assets/{fonts,images}/*.{jpg,png,gif}')
.pipe(gulpif(args.production,
minimage({
optimizationLevel: 5,
progressive: true,
interlaced: true
})))
.pipe(addsrc.append('src/assets/{fonts,images}/*.{ico,eot,svg,ttf,woff}'))
.pipe(gulp.dest('material/assets/'));
});
/*
* Minify views.
*/
gulp.task('assets:views', args.production ? [
'assets:modernizr',
'assets:revisions:clean',
'assets:revisions'
] : [], function() {
return gulp.src([
'src/*.html'
]).pipe(
minhtml({
collapseBooleanAttributes: true,
removeComments: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}))
.pipe(compact())
.pipe(gulpif(args.production,
addsrc.append([
'material/manifest.json',
'material/**/*.css'
])))
.pipe(gulpif(args.production, collect()))
.pipe(ignore.exclude(/manifest\.json$/))
.pipe(gulp.dest('material'));
});
/*
* Clean outdated revisions.
*/
gulp.task('assets:revisions:clean', function() {
return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}'])
.pipe(ignore.include(/-[a-f0-9]{8,}\.(ico|css|js|png|jpg|gif)$/))
.pipe(vinyl(clean));
});
/*
* Revision assets after build.
*/
gulp.task('assets:revisions', [
'assets:revisions:clean',
'assets:stylesheets',
'assets:javascripts',
'assets:static'
], function() {
return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}'])
.pipe(ignore.exclude(/-[a-f0-9]{8,}\.(css|js|png|jpg|gif)$/))
.pipe(rev())
.pipe(gulp.dest('material'))
.pipe(rev.manifest('manifest.json'))
.pipe(gulp.dest('material'));
});
/*
* Build assets.
*/
gulp.task('assets:build', [
'assets:stylesheets',
'assets:javascripts',
'assets:modernizr',
'assets:static',
'assets:views'
]);
/*
* Watch assets for changes and rebuild on the fly.
*/
gulp.task('assets:watch', function() {
/* Rebuild stylesheets */
gulp.watch([
'src/assets/stylesheets/**/*.scss'
], ['assets:stylesheets']);
/* Rebuild javascripts */
gulp.watch([
'src/assets/javascripts/**/*.js',
'bower.json'
], ['assets:javascripts']);
/* Copy static assets */
gulp.watch([
'assets/assets/{fonts,images}/*'
], ['assets:static']);
/* Minify views */
gulp.watch([
'src/*.html'
], ['assets:views']);
});
/* ----------------------------------------------------------------------------
* Application server
* ------------------------------------------------------------------------- */
/*
* Build documentation.
*/
gulp.task('mkdocs:build', [
'assets:build'
], function() {
return child.spawnSync('mkdocs', ['build']);
});
/*
* Restart MkDocs server.
*/
gulp.task('mkdocs:serve', function() {
if (server)
server.kill();
/* Spawn MkDocs server */
server = child.spawn('mkdocs', ['serve', '-a', '0.0.0.0:8000']);
/* Pretty print server log output */
server.stdout.on('data', function(data) {
var lines = data.toString().split('\n')
for (var l in lines)
if (lines[l].length)
util.log(lines[l]);
});
/* Print errors to stdout */
server.stderr.on('data', function(data) {
process.stdout.write(data.toString());
});
});
/* ----------------------------------------------------------------------------
* Interface
* ------------------------------------------------------------------------- */
/*
* Build assets and documentation.
*/
gulp.task('build', [
'assets:build'
].concat(args.mkdocs
? 'mkdocs:build'
: []));
/*
* Start asset and MkDocs watchdogs.
*/
gulp.task('watch', [
'assets:build',
], function() {
return gulp.start([
'assets:watch'
].concat(args.mkdocs
? 'mkdocs:serve'
: []));
});
/*
* Build assets by default.
*/
gulp.task('default', ['build']);
+4 -2
View File
@@ -1,2 +1,4 @@
recursive-include material *.ico *.js *.css *.html *.eot *.svg *.ttf *.woff
recursive-exclude site *
recursive-include material *.ico *.js *.css *.html *.svg
recursive-exclude site *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
+4 -3
View File
@@ -4,7 +4,7 @@
[![PyPI Downloads][pypi-dl-image]][pypi-dl-link]
[![PyPI Version][pypi-v-image]][pypi-v-link]
A material design theme for [MkDocs](http://www.mkdocs.org).
A material design theme for [MkDocs 0.16](http://www.mkdocs.org).
[![iOS](docs/images/screen.png)](http://squidfunk.github.io/mkdocs-material/)
@@ -27,7 +27,8 @@ http://squidfunk.github.io/mkdocs-material/
## License
**MIT License**
**MIT License**
Copyright (c) 2016 Martin Donath
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -53,4 +54,4 @@ IN THE SOFTWARE.
[pypi-dl-image]: https://img.shields.io/pypi/dm/mkdocs-material.png
[pypi-dl-link]: https://pypi.python.org/pypi/mkdocs-material
[pypi-v-image]: https://img.shields.io/pypi/v/mkdocs-material.png
[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material
[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material
-31
View File
@@ -1,31 +0,0 @@
{
"name": "mkdocs-material",
"version": "0.1.2",
"description": "A material design theme for MkDocs",
"homepage": "http://squidfunk.github.io/mkdocs-material/",
"authors": [
"squidfunk <martin.donath@squidfunk.com>"
],
"license": "MIT",
"moduleType": [
"globals"
],
"ignore": [
"**/.*",
"bower_components",
"node_modules"
],
"private": true,
"dependencies": {
"classlist": "^2014.12.13",
"fastclick": "^1.0.6",
"lunr.js": "^0.6.0",
"pegasus": "^0.3.2",
"respond": "^1.4.2"
},
"devDependencies": {
"bourbon": "^4.2.6",
"quantum-colors": "^1.0.1",
"quantum-shadows": "^1.0.0"
}
}
+24 -16
View File
@@ -26,38 +26,39 @@ Further assistance on including extra CSS and Javascript can be found in the
## Fundamental changes
If you want to make larger adjustments like changing the color palette or
typography, you should check out the repository of the project and compile
the SASS sources with your changes. The project design is very modular, so
most things can be changed by tweaking a few variables.
typography, you should check out or download the repository of the project and
compile the SASS sources with your changes. The project design is very modular,
so most things can be tweaked by changing a few variables.
### Setup
In order to compile the project, you need `node`, `bower` and `gulp` up and
running. It's best to use the most recent versions, but it should also work if
your installations are not too dated. The project itself is hosted on GitHub,
so the next thing you should do is clone the project from GitHub:
In order to compile the project, you need `node` with a version greater than
`0.11` up and running.
The project itself is hosted on GitHub, so the next
thing you should do is clone the project from GitHub:
``` sh
git clone https://github.com/squidfunk/mkdocs-material
```
Then you change the directory and install all dependencies specified in the
`package.json` and `bower.json`:
`package.json` and `bower.json` with the following command:
``` sh
cd mkdocs-material
npm install && bower install
npm install
```
### Development
The asset pipeline is contained in `Gulpfile.js`, which you can start with
`gulp watch`. This will also run `mkdocs serve`, to monitor changes to the
documentation. Point your browser to [localhost:8000](http://localhost:8000)
and you should see this very documentation in front of your eyes.
`gulp watch`. If you specify the `--mkdocs` flag, this will also run
`mkdocs serve`, to monitor changes to the documentation. Point your browser to [localhost:8000](http://localhost:8000) and you should see this very
documentation in front of your eyes.
``` sh
gulp watch
gulp watch --mkdocs
```
For example, changing the color palette is as simple as changing the `$primary`
@@ -80,13 +81,20 @@ When you finished making your changes, you can build the theme by invoking:
gulp build --production
```
The `production` flag triggers the production-level compilation and
The `--production` flag triggers the production-level compilation and
minification of all CSS and Javascript sources. When the command is ready,
the final theme is located in the `material` directory. Add the `theme_dir`
variable pointing to the aforementioned directory in your original
`mkdocs.yml` and you should see your documentation with your changes!
`mkdocs.yml`:
``` yaml
theme_dir: 'mkdocs-material/material'
```
Now you can run `mkdocs build` and you should see your documentation with your
changes to the original Material theme.
[MkDocs]: http://www.mkdocs.org
[MkDocs documentation]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme
[quantum-colors]: https://github.com/nkpfstr/quantum-colors
[material-colors]: http://www.materialui.co/colors
[material-colors]: http://www.materialui.co/colors
+315
View File
@@ -0,0 +1,315 @@
# Admonition
[Admonition][1] is an extension included in the standard Markdown library that
makes it possible to add block-styled side content to your documentation, for
example summaries, hints, notes or warnings.
[1]: https://pythonhosted.org/Markdown/extensions/admonition.html
## Installation
Add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- admonition
```
## Usage
Admonition blocks follow a simple syntax: every block is started with `!!!`,
followed by a single keyword which is used as the [type qualifier](#types) of
the block. The content of the block then follows on the next line, indented by
four spaces.
Example:
``` markdown
!!! hint
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! hint
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
### Changing the title
By default, the block title will equal the type qualifier. However, it can
easily be changed by adding a quoted string after the type qualifier.
Example:
``` markdown
!!! hint "Phasellus posuere in sem ut cursus"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! hint "Phasellus posuere in sem ut cursus"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
### Removing the title
Similar to setting a [custom title](#changing-the-title), the icon and title
can be omitted by providing an empty string after the type qualifier:
Example:
``` markdown
!!! hint ""
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! hint ""
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
### Embedded code blocks
Blocks can contain all kinds of text content, including headlines, lists,
paragraphs and other blocks except code blocks, because the parser from the
standard Markdown library does not account for those.
However, the [PyMdown Extensions][2] package adds an extension called
[SuperFences][3], which makes it possible to nest code blocks within other
blocks.
[2]: https://facelessuser.github.io/pymdown-extensions
[3]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
Example:
!!! hint
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
``` mysql
SELECT
Employees.EmployeeID,
Employees.Name,
Employees.Salary,
Manager.Name AS Manager
FROM
Employees
LEFT JOIN
Employees AS Manager
ON
Employees.ManagerID = Manager.EmployeeID
WHERE
Employees.EmployeeID = '087652';
```
Nunc eu odio eleifend, blandit leo a, volutpat sapien. Phasellus posuere in
sem ut cursus. Nullam sit amet tincidunt ipsum, sit amet elementum turpis.
Etiam ipsum quam, mattis in purus vitae, lacinia fermentum enim.
## Types
Admonition supports user-defined type qualifiers which may influence the style
of the inserted block. Following is a list of type qualifiers supported by the
Material theme, whereas the default type, and thus fallback for unknown type
qualifiers, is [hint](#hint).
### Hint
Example:
``` markdown
!!! hint
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! hint
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `hint`
* `note`
### Summary
Example:
``` markdown
!!! summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `summary`
* `tldr`
### Tip
Example:
``` markdown
!!! tip
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! tip
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `tip`
* `idea`
### Success
Example:
``` markdown
!!! success
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! success
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `success`
* `check`
* `done`
### Warning
Example:
``` markdown
!!! warning
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! warning
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `warning`
* `attention`
* `important`
### Failure
Example:
``` markdown
!!! failure
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! failure
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `failure`
* `fail`
* `missing`
### Danger
Example:
``` markdown
!!! danger
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! danger
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `danger`
* `caution`
### Error
Example:
``` markdown
!!! error
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! error
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `error`
* `bug`
+847
View File
@@ -0,0 +1,847 @@
# CodeHilite
[CodeHilite][1] is an extension that adds syntax highlighting to codeblocks and
is included in the standard Markdown library. The highlighting process is
executed during compilation of the Markdown file.
[1]: https://pythonhosted.org/Markdown/extensions/code_hilite.html
## Installation
CodeHilite parses code blocks and wraps them in `<pre>` tags. If [Pygments][2]
is installed, which is a generic syntax highlighter with support for over
[300 languages][3], CodeHilite will also highlight the code block. Pygments can
be installed with the following command:
``` sh
pip install pygments
```
To enable CodeHilite, add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- codehilite
```
[2]: http://pygments.org
[3]: http://pygments.org/languages
## Usage
### Specifying the language
The CodeHilite extension uses the same syntax as regular Markdown code blocks,
but needs to know the language of the code block. This can be done in three
different ways.
#### via Markdown syntax <small>recommended</small>
In Markdown, code blocks can be opened and closed by writing three backticks on
separate lines. To add code highlighting to those blocks, the easiest way is
to specify the language directly after the opening block.
Example:
```` markdown
``` python
import tensorflow as tf
```
````
Result:
``` python
import tensorflow as tf
```
#### via Shebang
Alternatively, if the first line of a code block contains a shebang, the
language is derived from the path referenced in the shebang. This will only
work for code blocks that are indented using four spaces, not for those
encapsulated in three backticks.
Example:
```` markdown
#!/usr/bin/python
import tensorflow as tf
````
Result:
``` python
#!/usr/bin/python
import tensorflow as tf
```
#### via three colons
If the first line starts with three colons followed by a language identifier,
the first line is stripped. This will only work for code blocks that are
indented using four spaces, not for those encapsulated in three backticks.
Example:
``` markdown
:::python
import tensorflow as tf
```
Result:
:::python
import tensorflow as tf
### Adding line numbers
Line numbers can be added by enabling the `linenums` flag in your `mkdocs.yml`:
``` yaml
markdown_extensions:
- codehilite(linenums=true)
```
Example:
```` markdown
``` python
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```
````
Result:
#!python
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
### Highlighting specific lines
Specific lines can be highlighted by passing the line numbers to the `hl_lines`
argument placed right after the language identifier. Line counts start at 1.
Example:
```` markdown
``` python hl_lines="3 4"
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```
````
Result:
#!python hl_lines="3 4"
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
## Supported languages <small>excerpt</small>
CodeHilite uses [Pygments][], a generic syntax highlighter with support for
over [300 languages][], so the following list of examples is just an excerpt.
### Bash
``` bash
#!/bin/bash
for OPT in "$@"
do
case "$OPT" in
'-f' ) canonicalize=1 ;;
'-n' ) switchlf="-n" ;;
esac
done
# readlink -f
function __readlink_f {
target="$1"
while test -n "$target"; do
filepath="$target"
cd `dirname "$filepath"`
target=`readlink "$filepath"`
done
/bin/echo $switchlf `pwd -P`/`basename "$filepath"`
}
if [ ! "$canonicalize" ]; then
readlink $switchlf "$@"
else
for file in "$@"
do
case "$file" in
-* ) ;;
* ) __readlink_f "$file" ;;
esac
done
fi
exit $?
```
### C
``` c
extern size_t
pb_varint_scan(const uint8_t data[], size_t left) {
assert(data && left);
left = left > 10 ? 10 : left;
#ifdef __SSE2__
/* Mapping: remaining bytes ==> bitmask */
static const int mask_map[] = {
0x0000, 0x0001, 0x0003, 0x0007,
0x000F, 0x001F, 0x003F, 0x007F,
0x00FF, 0x01FF, 0x03FF
};
/* Load buffer into 128-bit integer and create high-bit mask */
__m128i temp = _mm_loadu_si128((const __m128i *)data);
__m128i high = _mm_set1_epi8(0x80);
/* Intersect and extract mask with high-bits set */
int mask = _mm_movemask_epi8(_mm_and_si128(temp, high));
mask = (mask & mask_map[left]) ^ mask_map[left];
/* Count trailing zeroes */
return mask ? __builtin_ctz(mask) + 1 : 0;
#else
/* Linear scan */
size_t size = 0;
while (data[size++] & 0x80)
if (!--left)
return 0;
return size;
#endif /* __SSE2__ */
}
```
### C++
``` cpp
Extension::
Extension(const Descriptor *descriptor, const Descriptor *scope) :
descriptor_(descriptor),
scope_(scope) {
/* Extract full name for signature */
variables_["signature"] = descriptor_->full_name();
/* Prepare message symbol */
variables_["message"] = StringReplace(
variables_["signature"], ".", "_", true);
LowerString(&(variables_["message"]));
/* Suffix scope to identifiers, if given */
string suffix ("");
if (scope_) {
suffix = scope_->full_name();
/* Check if the base and extension types are in the same package */
if (!scope_->file()->package().compare(descriptor_->file()->package()))
suffix = StripPrefixString(suffix,
scope_->file()->package() + ".");
/* Append to signature */
variables_["signature"] += ".[" + suffix +"]";
suffix = "_" + suffix;
}
/* Prepare extension symbol */
variables_["extension"] = StringReplace(
suffix, ".", "_", true);
LowerString(&(variables_["extension"]));
}
```
### C&#35;
``` csharp
public static void Send(
Socket socket, byte[] buffer, int offset, int size, int timeout) {
int startTickCount = Environment.TickCount;
int sent = 0;
do {
if (Environment.TickCount > startTickCount + timeout)
throw new Exception("Timeout.");
try {
sent += socket.Send(buffer, offset + sent,
size - sent, SocketFlags.None);
} catch (SocketException ex) {
if (ex.SocketErrorCode == SocketError.WouldBlock ||
ex.SocketErrorCode == SocketError.IOPending ||
ex.SocketErrorCode == SocketError.NoBufferSpaceAvailable) {
/* Socket buffer is probably full, wait and try again */
Thread.Sleep(30);
} else {
throw ex;
}
}
} while (sent < size);
}
```
### Clojure
``` clojure
(clojure-version)
(defn partition-when
[f]
(fn [rf]
(let [a (java.util.ArrayList.)
fval (volatile! false)]
(fn
([] (rf))
([result]
(let [result (if (.isEmpty a)
result
(let [v (vec (.toArray a))]
;; Clear first
(.clear a)
(unreduced (rf result v))))]
(rf result)))
([result input]
(if-not (and (f input) @fval)
(do
(vreset! fval true)
(.add a input)
result)
(let [v (vec (.toArray a))]
(.clear a)
(let [ret (rf result v)]
(when-not (reduced? ret)
(.add a input))
ret))))))))
(into [] (partition-when
#(.startsWith % ">>"))
["1d" "33" ">> 1" ">> 2" "22" ">> 3"])
```
### Diff
``` diff
Index: grunt.js
===================================================================
--- grunt.js (revision 31200)
+++ grunt.js (working copy)
@@ -12,6 +12,7 @@
module.exports = function (grunt) {
+ console.log('hello world');
// Project configuration.
grunt.initConfig({
lint: {
@@ -19,10 +20,6 @@
'packages/services.web/{!(test)/**/,}*.js',
'packages/error/**/*.js'
],
- scripts: [
- 'grunt.js',
- 'db/**/*.js'
- ],
browser: [
'packages/web/server.js',
'packages/web/server/**/*.js',
```
### Docker
``` docker
FROM ubuntu
# Install vnc, xvfb in order to create a 'fake' display and firefox
RUN apt-get update && apt-get install -y x11vnc xvfb firefox
RUN mkdir ~/.vnc
# Setup a password
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
# Autostart firefox (might not be the best way, but it does the trick)
RUN bash -c 'echo "firefox" >> /.bashrc'
EXPOSE 5900
CMD ["x11vnc", "-forever", "-usepw", "-create"]
```
### Elixir
``` elixir
require Logger
def accept(port) do
{:ok, socket} = :gen_tcp.listen(port,
[:binary, packet: :line, active: false, reuseaddr: true])
Logger.info "Accepting connections on port #{port}"
loop_acceptor(socket)
end
defp loop_acceptor(socket) do
{:ok, client} = :gen_tcp.accept(socket)
serve(client)
loop_acceptor(socket)
end
defp serve(socket) do
socket
|> read_line()
|> write_line(socket)
serve(socket)
end
defp read_line(socket) do
{:ok, data} = :gen_tcp.recv(socket, 0)
data
end
defp write_line(line, socket) do
:gen_tcp.send(socket, line)
end
```
### Erlang
``` erlang
circular(Defs) ->
[ { { Type, Base }, Fields } ||
{ { Type, Base }, Fields } <- Defs, Type == msg, circular(Base, Defs) ].
circular(Base, Defs) ->
Fields = proplists:get_value({ msg, Base }, Defs),
circular(Defs, Fields, [Base]).
circular(_Defs, [], _Path) ->
false;
circular(Defs, [Field | Fields], Path) ->
case Field#field.type of
{ msg, Type } ->
case lists:member(Type, Path) of
false ->
Children = proplists:get_value({ msg, Type }, Defs),
case circular(Defs, Children, [Type | Path]) of
false -> circular(Defs, Fields, Path);
true -> true
end;
true ->
Type == lists:last(Path) andalso
(length(Path) == 1 orelse not is_tree(Path))
end;
_ ->
circular(Defs, Fields, Path)
end.
```
### F&#35;
``` fsharp
/// Asynchronously download retangles from the server
/// and decode the JSON format to F# Rectangle record
let [<Js>] getRectangles () : Async<Rectangle[]> = async {
let req = XMLHttpRequest()
req.Open("POST", "/get", true)
let! resp = req.AsyncSend()
return JSON.parse(resp) }
/// Repeatedly update rectangles after 0.5 sec
let [<Js>] updateLoop () = async {
while true do
do! Async.Sleep(500)
let! rects = getRectangles()
cleanRectangles()
rects |> Array.iter createRectangle }
```
### Go
``` go
package main
import "fmt"
func counter(id int, channel chan int, closer bool) {
for i := 0; i < 10000000; i++ {
fmt.Println("process", id," send", i)
channel <- 1
}
if closer { close(channel ) }
}
func main() {
channel := make(chan int)
go counter(1, channel, false)
go counter(2, channel, true)
x := 0
// receiving data from channel
for i := range channel {
fmt.Println("receiving")
x += i
}
fmt.Println(x)
}
```
### HTML
``` html
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>HTML5 Boilerplate</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<p>Hello world! This is HTML5 Boilerplate.</p>
</body>
</html>
```
### Java
``` java
import java.util.LinkedList;
import java.lang.reflect.Array;
public class UnsortedHashSet<E> {
private static final double LOAD_FACTOR_LIMIT = 0.7;
private int size;
private LinkedList<E>[] con;
public UnsortedHashSet() {
con = (LinkedList<E>[])(new LinkedList[10]);
}
public boolean add(E obj) {
int oldSize = size;
int index = Math.abs(obj.hashCode()) % con.length;
if (con[index] == null)
con[index] = new LinkedList<E>();
if (!con[index].contains(obj)) {
con[index].add(obj);
size++;
}
if (1.0 * size / con.length > LOAD_FACTOR_LIMIT)
resize();
return oldSize != size;
}
private void resize() {
UnsortedHashSet<E> temp = new UnsortedHashSet<E>();
temp.con = (LinkedList<E>[])(new LinkedList[con.length * 2 + 1]);
for (int i = 0; i < con.length; i++) {
if (con[i] != null)
for (E e : con[i])
temp.add(e);
}
con = temp.con;
}
public int size() {
return size;
}
}
```
### JavaScript
``` javascript
var Math = require('lib/math');
var _extends = function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
var e = exports.e = 2.71828182846;
exports['default'] = function (x) {
return Math.exp(x);
};
module.exports = _extends(exports['default'], exports);
```
### JSON
``` json
{
"name": "mkdocs-material",
"version": "0.2.4",
"description": "A material design theme for MkDocs",
"homepage": "http://squidfunk.github.io/mkdocs-material/",
"authors": [
"squidfunk <martin.donath@squidfunk.com>"
],
"license": "MIT",
"main": "Gulpfile.js",
"scripts": {
"start": "./node_modules/.bin/gulp watch --mkdocs",
"build": "./node_modules/.bin/gulp build --production"
}
...
}
```
### Julia
``` julia
using MXNet
mlp = @mx.chain mx.Variable(:data) =>
mx.FullyConnected(name=:fc1, num_hidden=128) =>
mx.Activation(name=:relu1, act_type=:relu) =>
mx.FullyConnected(name=:fc2, num_hidden=64) =>
mx.Activation(name=:relu2, act_type=:relu) =>
mx.FullyConnected(name=:fc3, num_hidden=10) =>
mx.SoftmaxOutput(name=:softmax)
# data provider
batch_size = 100
include(Pkg.dir("MXNet", "examples", "mnist", "mnist-data.jl"))
train_provider, eval_provider = get_mnist_providers(batch_size)
# setup model
model = mx.FeedForward(mlp, context=mx.cpu())
# optimization algorithm
optimizer = mx.SGD(lr=0.1, momentum=0.9)
# fit parameters
mx.fit(model, optimizer, train_provider, n_epoch=20, eval_data=eval_provider)
```
### Lua
``` lua
local ffi = require("ffi")
ffi.cdef[[
void Sleep(int ms);
int poll(struct pollfd *fds, unsigned long nfds, int timeout);
]]
local sleep
if ffi.os == "Windows" then
function sleep(s)
ffi.C.Sleep(s*1000)
end
else
function sleep(s)
ffi.C.poll(nil, 0, s * 1000)
end
end
for i = 1,160 do
io.write("."); io.flush()
sleep(0.01)
end
io.write("\n")
```
### MySQL
``` mysql
SELECT
Employees.EmployeeID,
Employees.Name,
Employees.Salary,
Manager.Name AS Manager
FROM
Employees
LEFT JOIN
Employees AS Manager
ON
Employees.ManagerID = Manager.EmployeeID
WHERE
Employees.EmployeeID = '087652';
```
### PHP
``` php
<?php
// src/AppBundle/Controller/LuckyController.php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
class LuckyController {
/**
* @Route("/lucky/number")
*/
public function numberAction() {
$number = mt_rand(0, 100);
return new Response(
'<html><body>Lucky number: '.$number.'</body></html>'
);
}
}
```
### Protocol Buffers
``` proto
syntax = "proto2";
package caffe;
// Specifies the shape (dimensions) of a Blob.
message BlobShape {
repeated int64 dim = 1 [packed = true];
}
message BlobProto {
optional BlobShape shape = 7;
repeated float data = 5 [packed = true];
repeated float diff = 6 [packed = true];
// 4D dimensions -- deprecated. Use "shape" instead.
optional int32 num = 1 [default = 0];
optional int32 channels = 2 [default = 0];
optional int32 height = 3 [default = 0];
optional int32 width = 4 [default = 0];
}
```
### Python
``` python
"""
A very simple MNIST classifier.
See extensive documentation at
http://tensorflow.org/tutorials/mnist/beginners/index.md
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# Import data
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_string('data_dir', '/tmp/data/', 'Directory for storing data')
mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True)
sess = tf.InteractiveSession()
# Create the model
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.nn.softmax(tf.matmul(x, W) + b)
```
### Ruby
``` ruby
require 'finity/event'
require 'finity/machine'
require 'finity/state'
require 'finity/transition'
require 'finity/version'
module Finity
class InvalidCallback < StandardError; end
class MissingCallback < StandardError; end
class InvalidState < StandardError; end
# Class methods to be injected into the including class upon inclusion.
module ClassMethods
# Instantiate a new state machine for the including class by accepting a
# block with state and event (and subsequent transition) definitions.
def finity options = {}, &block
@finity ||= Machine.new self, options, &block
end
# Return the names of all registered states.
def states
@finity.states.map { |name, _| name }
end
# Return the names of all registered events.
def events
@finity.events.map { |name, _| name }
end
end
# Inject methods into the including class upon inclusion.
def self.included base
base.extend ClassMethods
end
end
```
### XML
``` xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mainTag SYSTEM "some.dtd" [ENTITY % entity]>
<?oxygen RNGSchema="some.rng" type="xml"?>
<xs:main-Tag xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This is a sample comment -->
<childTag attribute="Quoted Value" another-attribute='Single quoted value'
a-third-attribute='123'>
<withTextContent>Some text content</withTextContent>
<withEntityContent>Some text content with &lt;entities&gt; and
mentioning uint8_t and int32_t</withEntityContent>
<otherTag attribute='Single quoted Value'/>
</childTag>
<![CDATA[ some CData ]]>
</main-Tag>
```
+84
View File
@@ -0,0 +1,84 @@
# Footnotes
[Footnotes][1] is another extension included in the standard Markdown library.
As the name says, it adds the ability to add footnotes to your documentation.
[1]: https://pythonhosted.org/Markdown/extensions/footnotes.html
## Installation
Add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- footnotes
```
## Usage
The markup for footnotes is similar to the standard Markdown markup for links.
A reference is inserted in the text, which can then be defined at any point in
the document.
### Inserting the reference
The footnote reference is enclosed in square brackets and starts with a caret,
followed by an arbitrary label which may contain numeric identifiers [1, 2, 3,
...] or names [Granovetter et al. 1998]. The rendered references are always
consecutive superscripted numbers.
Example:
``` markdown
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
```
Result:
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
### Inserting the content
The footnote content is also initiated with a label, which must match the label
used for the footnote reference. It can be inserted at an arbitrary position in
the document and is always rendered at the bottom of the page. Furthermore, a
backlink is automatically added to the footnote reference.
#### on a single line
Short statements can be written on the same line.
Example:
``` markdown
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
```
Result:
<a href="#fn:1">Jump to footnote at the bottom of the page</a>
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
#### on multiple lines
Paragraphs should be written on the next line. As with all Markdown blocks, the
content must be indented by four spaces.
Example:
``` markdown
[^2]:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
[^2]:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
<a href="#fn:2">Jump to footnote at the bottom of the page</a>
+1
View File
@@ -0,0 +1 @@
# Metadata
+31
View File
@@ -0,0 +1,31 @@
# Permalinks
Permalinks are a feature of the [Table of Contents][1] extension, which is part
of the standard Markdown library. The extension inserts an anchor at the end of
each headline, which makes it possible to directly link to a subpart of the
document.
[1]: https://pythonhosted.org/Markdown/extensions/toc.html
## Installation
To enable permalinks, add the following to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- toc(permalink=true)
```
This will add a link containing the paragraph symbol `` at the end of each
headline (exactly like on the page you're currently viewing), which the
Material theme will make appear on hover. In order to change the text of the
permalink, a string can be passed, e.g.:
``` markdown
markdown_extensions:
- toc(permalink=Link)
```
## Usage
When enabled, permalinks are inserted automatically.
+65
View File
@@ -0,0 +1,65 @@
# Arithmatex <small>MathJax</small>
[Arithmatex][1] integrates [MathJax][2] with Markdown and is included in the
[PyMdown Extensions][3] package. It parses block-style and inline equations
written in TeX markup and outputs them in mathematical notation.
[1]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
[2]: https://www.mathjax.org/
[3]: https://facelessuser.github.io/pymdown-extensions
## Installation
Make sure that the PyMdown Extensions package [is installed][4] and add the
following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- pymdownx.arithmatex
```
The MathJax runtime is automatically included if the extension is enabled, so
there is no need for extra JavaScript.
[4]: /extensions/pymdown/overview/#installation
## Usage
MathJax searches for `:::tex $$...$$` (blocks) and `:::tex $...$` (inline)
equations, parses their contents and renders them in mathematical notation.
See [this thread][5] on StackExchange for a short introduction and quick
reference on how to write equations in TeX syntax.
[5]: http://meta.math.stackexchange.com/questions/5020/
### Blocks
Blocks are enclosed in `:::tex $$...$$` which are placed on separate lines.
Example:
``` tex
$$
\frac{n!}{k!(n-k)!} = \binom{n}{k}
$$
```
Result:
$$
\frac{n!}{k!(n-k)!} = \binom{n}{k}
$$
### Inline
Inline equations need to be enclosed in `:::tex $...$`:
Example:
``` tex
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
```
Result:
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
+24
View File
@@ -0,0 +1,24 @@
# Inlinehilite
The [Inlinehilite][1] extension included in the [PyMdown Extensions][2] package
adds support for inline code highlighting. It's useful for short snippets
included with body copy.
[1]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/
[2]: https://facelessuser.github.io/pymdown-extensions
## Installation
Make sure that the PyMdown Extensions package [is installed][] and add the
following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- pymdownx.inlinehilite
```
## Usage
Syntax is similar to usual code highlighting, with the langauge shebang followed by one space. If you need to escape the highlight (like we're about to), add a space prior to the shebang.
For example, `#!js var test = 0;`, which was achieved using ` #!js var test = 0;`. Alternatively, you can use the triple colon, ` :::js var test = 0;` to produce the same result, `:::js var test = 0;`.
View File
+92
View File
@@ -0,0 +1,92 @@
# PyMdown Extensions
[PyMdown Extensions][] is a collection of Markdown extensions that add some
great features to the standard Markdown library. For this reason, the
**installation of this package is highly recommended** as it's well-integrated
with the Material theme.
## Installation
The PyMdown Extensions package can be installed with the following command:
``` sh
pip install pymdown-extensions
```
## Extensions
### GitHub Flavored Markdown
Most of the extensions included in the PyMdown Extensions package try to bring
the Markdown experience closer to GitHub Flavored Markdown (GFM):
- [BetterEm][] improves the handling of emphasis markup (**bold** and *italic*)
within Markdown by providing a more sophisticated parser for better detecting
start and end tokens. Read the documentation for usage notes.
- [MagicLink][] detects links in Markdown and auto-generates the necessary
markup, so no special syntax is required. It auto-links HTTP(S) and FTP
links, as well as references to email addresses.
- [GitHub Emoji][] adds the ability to insert emojis, which does not only
include the :octocat: emojis, but also a :shit:-load of emojis that we use in
our daily lives. See the [Emoji Cheat Sheet][] for a list of all available
emojis. Happy scrolling :tada:
- [SuperFences][] provides the ability to nest code blocks under blockquotes,
lists and other block elements, which the [Fenced Code Blocks][] extension
from the standard Markdown library doesn't parse correctly.
- [Tasklist][] adds support for styled checkbox lists. This is useful for
keeping track of tasks and showing what has been done and has yet to be done.
The usage of this extension is documented [here][].
- [Tilde][] provides an easy way to ~~strike through~~ cross out text.
The portion of text that should be erased must be enclosed in two tildes
`~~...~~`, and the extension will take care of the rest.
The PyMdown Extensions package adds a shorthand to enable all of the included
extensions that provide the GFM experience. However, usage of the shorthand is
discouraged, because some extensions are not supported, as the Material theme
uses the counterparts included in the standard Markdown library.
To enable all extensions add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- pymdownx.betterem
- pymdownx.githubemoji
- pymdownx.magiclink
- pymdownx.superfences
- pymdownx.tasklist(custom_checkbox=true)
- pymdownx.tilde
```
### Syntactic Sugar
There are three other extensions that add further syntactic sugar:
- [Caret][] is the sister extension of [Tilde][] and makes it possible to
highlight ^^inserted text^^. The portion of text that should be marked as
added must be enclosed in two carets `^^...^^`, the extension will do the
rest.
- [Mark][] add the ability to ==mark text==.
- SmartSymbols
- Inlinehilite --- own documentation file
- Critic --- own documentation file
[PyMdown Extensions]: http://facelessuser.github.io/pymdown-extensions/
[usage notes]: https://facelessuser.github.io/pymdown-extensions/usage_notes/
[BetterEm]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
[MagicLink]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
[GitHub Emoji]: https://facelessuser.github.io/pymdown-extensions/extensions/githubemoji/
[Emoji Cheat Sheet]: http://www.webpagefx.com/tools/emoji-cheat-sheet/
[SuperFences]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
[Fenced Code Blocks]: https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html
[Tasklist]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
[here]: /extensions/pymdown/tasklist
[Tilde]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
[Caret]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/
[Mark]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
+56
View File
@@ -0,0 +1,56 @@
# Tasklist
The [Tasklist][1] extension included in the [PyMdown Extensions][2] package
adds support for styled checkbox lists. This is useful for keeping track of
tasks and showing what has been done and has yet to be done.
[1]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
[2]: https://facelessuser.github.io/pymdown-extensions
## Installation
Make sure that the PyMdown Extensions package [is installed][3] and add the
following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- pymdownx.tasklist(custom_checkbox=true)
```
The `custom_checkbox` flag adds additional markup for better styling, so it is
highly recommended to add this flag, as the Material theme supports it.
[3]: /extensions/pymdown/overview/#installation
## Usage
Checkbox lists are like regular lists, but prefixed with `[ ]` empty or `[x]`
filled checkboxes.
Example:
``` markdown
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
* [x] Nulla lobortis egestas semper
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
* [ ] Vestibulum convallis sit amet nisi a tincidunt
* [x] In hac habitasse platea dictumst
* [x] In scelerisque nibh non dolor mollis congue sed et metus
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
* [ ] Praesent sed risus massa
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
```
Result:
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
* [x] Nulla lobortis egestas semper
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
* [ ] Vestibulum convallis sit amet nisi a tincidunt
* [x] In hac habitasse platea dictumst
* [x] In scelerisque nibh non dolor mollis congue sed et metus
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
* [ ] Praesent sed risus massa
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
+144 -31
View File
@@ -1,14 +1,22 @@
Title: My Document
Summary: A brief description of my document.
Authors: Waylan Limberg
John Doe
Date: October 2, 2007
blank-value:
base_url: http://example.com
# Getting started
## Installation
### Installing MkDocs
In order to install [MkDocs][], Python and `pip` - the Python package manager -
need to be up and running. Assuming you are a developer and have a basic
understanding of how things work and what StackOverflow is, we won't provide
guidelines on setting those up. You can verify if you're already good to go
with the following commands:
Before installing [MkDocs][], you need to make sure you have Python and `pip`
the Python package manager up and running. Assuming you are a developer and
have a basic understanding of how things work and what StackOverflow is, we
won't provide guidelines on setting those up. You can verify if you're already
good to go with the following commands:
``` sh
python --version
@@ -76,19 +84,6 @@ on and customize the theme through some options.
The Material theme adds some extra variables for configuration via your
project's `mkdocs.yml`. See the following section for all available options.
### Adding a logo
If your project has a logo, you can add it to the drawer/navigation by defining
the variable `extra.logo`. Ideally, the image of your logo should have
rectangular shape with a minimum resolution of 128x128. The logo will also be
used as a web application icon on iOS. Simply create the folder `docs/images`,
add your image and reference it via:
``` yaml
extra:
logo: 'images/logo.png'
```
### Adding a version
In order to add the current version next to the project banner inside the
@@ -99,6 +94,84 @@ extra:
version: '0.1.0'
```
This will also change the link behind the download button to point to the
archive with the respective version on GitHub, assuming a release tagged with
this exact version identifier.
### Adding a logo
If your project has a logo, you can add it to the drawer/navigation by defining
the variable `extra.logo`. Ideally, the image of your logo should have
rectangular shape with a minimum resolution of 128x128 and leave some room
towards the edges. The logo will also be used as a web application icon on iOS.
Simply create the folder `docs/images`, add your image and reference it via:
``` yaml
extra:
logo: 'images/logo.png'
```
### Changing the color palette
Material defines a default hue for every primary and accent color on Google's
material design [color palette][]. This makes it very easy to change the
overall look of the theme. Just set the variables `extra.palette.primary` and
`extra.palette.accent` to one of the colors defined in the palette:
``` yaml
extra:
palette:
primary: 'indigo'
accent: 'light blue'
```
Color names can be written upper- or lowercase but must match the names of the
material design [color palette][]. Valid values are: _red_, _pink_, _purple_,
_deep purple_, _indigo_, _blue_, _light blue_, _cyan_, _teal_, _green_, _light
green_, _lime_, _yellow_, _amber_, _orange_, _deep orange_, _brown_, _grey_ and
_blue grey_. The last three colors can only be used as a primary color.
If the color is set via this configuration, an additional CSS file called
`palettes.css` is included that defines the color palettes. If you want to
keep things lean, clone the repository and recompile the theme with your
custom colors set. See [this article](customization.md) for more information.
### Changing the font family
Material uses the [Ubuntu font family][] by default, specifically the regular
sans-serif type for text and the monospaced type for code. Both fonts are
loaded from [Google Fonts][] and can be easily changed to other fonts, like for
example Google's own [Roboto font][]:
``` yaml
extra:
font:
text: 'Roboto'
code: 'Roboto Mono'
```
The text font will be loaded in font-weights 400 and **700**, the monospaced
font in regular weight. If you want to load fonts from other destinations or
don't want to use the Google Fonts loading magic, just set `extra.font` to
`'none'`:
``` yaml
extra:
font: 'none'
```
### Localization
The **Previous** and **Next** labels in the footer can easily be changed by
defining the variables `extra.i18n.prev` and `extra.i18n.next`:
``` yaml
extra:
i18n:
prev: 'Previous'
next: 'Next'
```
### Adding a GitHub and Twitter account
If you have a GitHub and/or Twitter account, you can add links to your
@@ -112,12 +185,23 @@ extra:
twitter: 'my-twitter-handle'
```
### Google Analytics integration
Material makes it easy to integrate site tracking with Google Analytics.
Besides basic tracking, clicks on all outgoing links can be tracked, clicks on
the download and star button, as well as how site search is used. Tracking can
be activated in your project's `mkdocs.yml`:
``` yaml
google_analytics:
- 'UA-XXXXXXXX-X'
- 'auto'
```
### More advanced customization
If you want to change the fonts or colors - you are lucky. The Material theme
is built with a sophisticated asset pipeline. See
[this article](customization.md) for more information on advanced
customization.
If you want to change the general appearance of the Material theme, see
[this article](customization.md) for more information on advanced customization.
## Extensions
@@ -125,21 +209,21 @@ MkDocs supports several [Markdown extensions][]. The following extensions are
not enabled by default (see the link for which are enabled by default), so you
have to switch them on explicitly.
### CodeHilite (recommended)
### CodeHilite <small>recommended</small>
This extensions adds code highlighting to fenced code blocks. It might not be
the best code highlighter, but it works without JavaScript and on the server:
``` yaml
markdown_extensions:
- codehilite(css_class=code)
- codehilite
```
If you want more extensive highlighting, you can use a JavaScript library like
[highlight.js][], which is not included in Material. See [this link][extra] for
further instructions
### Permalinks
### Permalinks <small>recommended</small>
In order to add [permalinks][] to the headers of your article, set the
`markdown_extensions.toc.permalink` variable to a symbol, e.g. ``:
@@ -170,22 +254,33 @@ In order to add a note, use the following syntax inside your article:
Nothing to see here, move along.
```
This will print the following:
This will print the following block:
!!! note
Nothing to see here, move along.
The Material template adds a neutral color for the `note` class and a red color
for the `warning` class.
for the `warning` class. You can also add a custom title:
``` markdown
!!! warning
MkDocs supports several [Markdown extensions][]. The following extensions are
not enabled by default (see the link for which are enabled by default), so you
have to switch them on explicitly.
```
This will print:
!!! warning
You shall not pass.
MkDocs supports several [Markdown extensions][]. The following extensions are
not enabled by default (see the link for which are enabled by default), so you
have to switch them on explicitly.
More colors can be freely defined.
## Full example
Below is a full example configuration for a mkdocs.yml:
Below is a full example configuration for a `mkdocs.yml`:
``` yaml
# Project information
@@ -209,10 +304,24 @@ theme: 'material'
extra:
version: '0.1.0'
logo: 'images/logo.png'
palette:
primary: 'indigo'
accent: 'light blue'
font:
text: 'Roboto'
code: 'Roboto Mono'
i18n:
prev: 'Previous'
next: 'Next'
author:
github: 'my-github-handle'
twitter: 'my-twitter-handle'
# Google Analytics
google_analytics:
- 'UA-XXXXXXXX-X'
- 'auto'
# Extensions
markdown_extensions:
- codehilite(css_class=code)
@@ -222,8 +331,12 @@ markdown_extensions:
```
[MkDocs]: http://www.mkdocs.org
[color palette]: http://www.materialui.co/colors
[Ubuntu font family]: http://font.ubuntu.com
[Google Fonts]: https://www.google.com/fonts
[Roboto font]: https://www.google.com/fonts/specimen/Roboto
[Markdown extensions]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
[highlight.js]: https://highlightjs.org/
[highlight.js]: https://highlightjs.org
[extra]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme
[permalinks]: https://en.wikipedia.org/wiki/Permalink
[Admonition]: https://pythonhosted.org/Markdown/extensions/admonition.html
[Admonition]: https://pythonhosted.org/Markdown/extensions/admonition.html
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

+43 -26
View File
@@ -1,47 +1,64 @@
# Material for MkDocs
# Material <small>for MkDocs</small>
## Beautiful documentation
You're currently looking at a full responsive [MkDocs][] theme in the spirit of
Google's [material design][] guidelines. MkDocs is an excellent static site
documentation generator that is meant for building good looking project
documentation.
Material is a theme for [MkDocs][], an excellent static site generator geared
towards project documentation. It is built using Google's [material design][]
guidelines, full responsive, optimized for touch and pointer devices as well
as all sorts of screen sizes.
![Material Screenshot](images/screen.png)
This theme is **optimized for all sorts of devices** and is built from scratch
without any bloated Javascript or CSS Frameworks with **only 24kb of JS and
CSS** (minified, gzipped and excluding Google WebFonts and Analytics). Yet, it
is highly customizable in terms of fonts, colors and gracefully supports older
Material is very lightweight it is built from scratch using Javascript and
CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts
and Analytics). Yet, it is highly customizable and degrades gracefully in older
browsers.
## Quick start
Install with `pip`:
``` sh
pip install mkdocs-material
```
Add the following line to your `mkdocs.yml`:
``` yaml
theme: 'material'
```
## Features
- Beautiful, readable and very user-friendly design based on Google's
**material design** guidelines, packed in a **full responsive** template
with a well-defined color palette, great typography, as well as a beautiful
search interface and footer.
- Beautiful, readable and very user-friendly design based on Google's material
design guidelines, packed in a full responsive template with a well-defined
and [easily customizable color palette][], great typography, as well as a
beautiful search interface and footer.
- Well-tested and **optimized CSS and Javascript**, including a cross-browser
- Well-tested and optimized Javascript and CSS including a cross-browser
fixed/sticky header, a drawer that even works without Javascript using
the `:checked` hack with fallbacks, **responsive tables** that scroll when
the screen is too small and **well-defined print styles**.
the [checkbox hack][] with fallbacks, responsive tables that scroll when
the screen is too small and well-defined print styles.
- Extra configuration options like **project logo**, links to the authors
**GitHub and Twitter accounts** and display of the **amount of stars** the
project has on GitHub.
- Extra configuration options like a [project logo][], links to the authors
[GitHub and Twitter accounts][], display of the amount of stars the
project has on GitHub and [Google Analytics integration][].
- **Easily extendable and customizable** due to a well-designed asset pipeline
- Easily [extendable and customizable][] due to a well-designed asset pipeline
built on-top of [Gulp][] with `npm` and `bower` and modular and abstracted
style definitions built with [SASS][].
- **Web application capability** on iOS - when the page is saved to the
homescreen, it behaves and looks like a native application.
- Web application capability on iOS when the page is saved to the homescreen,
it behaves and looks like a native application.
See the [getting started guide](getting-started.md) for instructions how to get
it up and running.
[material design]: https://www.google.com/design/spec/material-design
[MkDocs]: http://www.mkdocs.org
[material design]: https://www.google.com/design/spec/material-design
[checkbox hack]: http://tutorialzine.com/2015/08/quick-tip-css-only-dropdowns-with-the-checkbox-hack/
[project logo]: getting-started.md#adding-a-logo
[easily customizable color palette]: getting-started.md#changing-the-color-palette
[GitHub and Twitter accounts]: getting-started.md#adding-a-github-and-twitter-account
[Google Analytics integration]: getting-started.md#google-analytics-integration
[extendable and customizable]: customization.md
[Gulp]: http://gulpjs.com
[SASS]: http://sass-lang.com/
[SASS]: http://sass-lang.com
+2 -1
View File
@@ -1,6 +1,7 @@
# License
**MIT License**
**MIT License**
Copyright (c) 2016 Martin Donath
Permission is hereby granted, free of charge, to any person obtaining a copy
+294
View File
@@ -0,0 +1,294 @@
# Specimen
## Typography
### Body copy
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras arcu libero,
mollis sed massa vel, *ornare viverra ex*. Mauris a ullamcorper lacus. Nullam
urna elit, malesuada eget finibus ut, ullamcorper ac tortor. Vestibulum sodales
pulvinar nisl, pharetra aliquet est. Quisque volutpat erat ac nisi accumsan
tempor.
**Sed suscipit**, orci non pretium pretium, quam mi gravida metus, vel
venenatis justo est condimentum diam. Maecenas non ornare justo. Nam a ipsum
eros. [Nulla aliquam](/) orci sit amet nisl posuere malesuada. Proin aliquet
nulla velit, quis ultricies orci feugiat et. `Ut tincidunt sollicitudin`
tincidunt. Aenean ullamcorper sit amet nulla at interdum.
### Headings
#### The 4th level
##### The 5th level
###### The 6th level
### Headings <small>with secondary text</small>
#### The 4th level <small>with secondary text</small>
##### The 5th level <small>with secondary text</small>
###### The 6th level <small>with secondary text</small>
### Blockquotes
> Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet rutrum.
Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Nam vehicula nunc
mauris, a ultricies libero efficitur sed. *Class aptent* taciti sociosqu ad
litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie
imperdiet consectetur.
#### Blockquote nesting
> **Sed aliquet**, neque at rutrum mollis, neque nisi tincidunt nibh, vitae
faucibus lacus nunc at lacus. Nunc scelerisque, quam id cursus sodales, lorem
[libero fermentum](/) urna, ut efficitur elit ligula et nunc.
> > Mauris dictum mi lacus, sit amet pellentesque urna vehicula fringilla.
Ut sit amet placerat ante. Proin sed elementum nulla. Nunc vitae sem odio.
Suspendisse ac eros arcu. Vivamus orci erat, volutpat a tempor et, rutrum.
eu odio.
> > > `Suspendisse rutrum facilisis risus`, eu posuere neque commodo a.
Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed nec leo
bibendum, sodales mauris ut, tincidunt massa.
#### Other content blocks
> Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,
sit amet laoreet nibh.
``` js hl_lines="8"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
```
> > Praesent at `:::js return target`, sodales nibh vel, tempor felis. Fusce
vel lacinia lacus. Suspendisse rhoncus nunc non nisi iaculis ultrices.
Donec consectetur mauris non neque imperdiet, eget volutpat libero.
### Lists
#### Unordered lists
* Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus tellus
non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor lobortis orci,
at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
* Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis.
* Nam vulputate tincidunt fringilla.
* Nullam dignissim ultrices urna non auctor.
* Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin ut
eros sed sapien ullamcorper consequat. Nunc ligula ante, fringilla at aliquam
ac, aliquet sed mauris.
* Nulla et rhoncus turpis. Mauris ultricies elementum leo. Duis efficitur
accumsan nibh eu mattis. Vivamus tempus velit eros, porttitor placerat nibh
lacinia sed. Aenean in finibus diam.
#### Ordered lists
1. Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
consectetur feugiat sodales.
2. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Aliquam ornare feugiat quam et egestas. Nunc id erat et quam
pellentesque lacinia eu vel odio.
1. Vivamus venenatis porttitor tortor sit amet rutrum. Pellentesque aliquet
quam enim, eu volutpat urna rutrum a. Nam vehicula nunc mauris, a
ultricies libero efficitur sed.
1. Mauris dictum mi lacus
2. Ut sit amet placerat ante
3. Suspendisse ac eros arcu
2. Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet
rutrum. Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Sed
aliquet, neque at rutrum mollis, neque nisi tincidunt nibh.
3. Pellentesque eget `:::js var _extends` ornare tellus, ut gravida mi.
``` js hl_lines="1"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
```
3. Vivamus id mi enim. Integer id turpis sapien. Ut condimentum lobortis
sagittis. Aliquam purus tellus, faucibus eget urna at, iaculis venenatis
nulla. Vivamus a pharetra leo.
### Code blocks
#### Inline
Morbi eget `dapibus felis`. Vivamus *`venenatis porttitor`* tortor sit amet
rutrum. Class aptent taciti sociosqu ad litora torquent per conubia nostra,
per inceptos himenaeos. [`Pellentesque aliquet quam enim`](/), eu volutpat urna
rutrum a.
Nam vehicula nunc `:::js return target` mauris, a ultricies libero efficitur
sed. Sed molestie imperdiet consectetur. Vivamus a pharetra leo. Pellentesque
eget ornare tellus, ut gravida mi. Fusce vel lacinia lacus.
#### Listing
#!js hl_lines="8"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
### Horizontal rules
Aenean in finibus diam. Duis mollis est eget nibh volutpat, fermentum aliquet
dui mollis. Nam vulputate tincidunt fringilla. Nullam dignissim ultrices urna
non auctor.
***
Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
consectetur feugiat sodales.
### Data tables
| Sollicitudo / Pellentesi | consectetur | adipiscing | elit | arcu | sed |
| ------------------------ | ----------- | ---------- | ------- | ---- | --- |
| Vivamus a pharetra | yes | yes | yes | yes | yes |
| Ornare viverra ex | yes | yes | yes | yes | yes |
| Mauris a ullamcorper | yes | yes | partial | yes | yes |
| Nullam urna elit | yes | yes | yes | yes | yes |
| Malesuada eget finibus | yes | yes | yes | yes | yes |
| Ullamcorper | yes | yes | yes | yes | yes |
| Vestibulum sodales | yes | - | yes | - | yes |
| Pulvinar nisl | yes | yes | yes | - | - |
| Pharetra aliquet est | yes | yes | yes | yes | yes |
| Sed suscipit | yes | yes | yes | yes | yes |
| Orci non pretium | yes | partial | - | - | - |
Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus tellus
non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor lobortis orci,
at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
| Left | Center | Right |
| :--------- | :------: | ------: |
| Lorem | *dolor* | `amet` |
| [ipsum](/) | **sit** | |
Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,
sit amet laoreet nibh.
<table>
<colgroup>
<col width="30%">
<col width="70%">
</colgroup>
<thead>
<tr class="header">
<th>Table</th>
<th>with colgroups (Pandoc)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lorem</td>
<td>ipsum dolor sit amet.</td>
</tr>
<tr>
<td>Sed sagittis</td>
<td>eleifend rutrum. Donec vitae suscipit est.</td>
</tr>
</tbody>
</table>
## Colors
### Primary colors
Click on a tile to change the primary color of the theme:
<button data-md-color-primary="red">Red</button>
<button data-md-color-primary="pink">Pink</button>
<button data-md-color-primary="purple">Purple</button>
<button data-md-color-primary="deep-purple">Deep Purple</button>
<button data-md-color-primary="indigo">Indigo</button>
<button data-md-color-primary="blue">Blue</button>
<button data-md-color-primary="light-blue">Light Blue</button>
<button data-md-color-primary="cyan">Cyan</button>
<button data-md-color-primary="teal">Teal</button>
<button data-md-color-primary="green">Green</button>
<button data-md-color-primary="light-green">Light Green</button>
<button data-md-color-primary="lime">Lime</button>
<button data-md-color-primary="yellow">Yellow</button>
<button data-md-color-primary="amber">Amber</button>
<button data-md-color-primary="orange">Orange</button>
<button data-md-color-primary="deep-orange">Deep Orange</button>
<button data-md-color-primary="brown">Brown</button>
<button data-md-color-primary="grey">Grey</button>
<button data-md-color-primary="blue-grey">Blue Grey</button>
<script>
var buttons = document.querySelectorAll("button[data-md-color-primary]");
Array.prototype.forEach.call(buttons, function(button) {
button.addEventListener("click", function() {
document.body.dataset.mdColorPrimary = this.dataset.mdColorPrimary;
})
})
</script>
### Accent colors
Click on a tile to change the accent color of the theme:
<button data-md-color-accent="red">Red</button>
<button data-md-color-accent="pink">Pink</button>
<button data-md-color-accent="purple">Purple</button>
<button data-md-color-accent="deep-purple">Deep Purple</button>
<button data-md-color-accent="indigo">Indigo</button>
<button data-md-color-accent="blue">Blue</button>
<button data-md-color-accent="light-blue">Light Blue</button>
<button data-md-color-accent="cyan">Cyan</button>
<button data-md-color-accent="teal">Teal</button>
<button data-md-color-accent="green">Green</button>
<button data-md-color-accent="light-green">Light Green</button>
<button data-md-color-accent="lime">Lime</button>
<button data-md-color-accent="yellow">Yellow</button>
<button data-md-color-accent="amber">Amber</button>
<button data-md-color-accent="orange">Orange</button>
<button data-md-color-accent="deep-orange">Deep Orange</button>
<button data-md-color-accent="brown">Brown</button>
<button data-md-color-accent="grey">Grey</button>
<button data-md-color-accent="blue-grey">Blue Grey</button>
<script>
var buttons = document.querySelectorAll("button[data-md-color-accent]");
Array.prototype.forEach.call(buttons, function(button) {
button.addEventListener("click", function() {
document.body.dataset.mdColorAccent = this.dataset.mdColorAccent;
})
})
</script>
@@ -21,57 +21,49 @@
*/
/* ----------------------------------------------------------------------------
* Print overrides
* Definition
* ------------------------------------------------------------------------- */
/*
* Print styles
*/
@media print {
export default /* JSX */ {
/*
* Hide non-relevant elements
/**
* Create a native DOM node from JSX's intermediate representation
*
* @param {string} tag - Tag name
* @param {object} properties - Properties
* @param {...(string|number|Array)} children - Child nodes
* @return {HTMLElement} Native DOM node
*/
.header, .drawer, .headerlink, .footer {
display: none;
}
createElement(tag, properties, ...children) {
const el = document.createElement(tag)
/*
* Article
*/
.article {
/* Set all properties */
if (properties)
for (const attr of Object.keys(properties))
el.setAttribute(attr, properties[attr])
/*
* Remove top spacing
*/
.wrapper {
padding-top: 0;
}
/* Iterate child nodes */
const iterateChildNodes = nodes => {
for (const node of nodes) {
/*
* Remove color in all code blocks
*/
pre, pre * {
color: $black !important;
}
/* Directly append text content */
if (typeof node === "string" ||
typeof node === "number") {
el.textContent += node
pre {
border: 1px solid $black-lightest;
}
/* Recurse, if we got an array */
} else if (Array.isArray(node)) {
iterateChildNodes(node)
/*
* Border-radius makes this table entirely black on paper, so scrap it
*/
table {
border-radius: none;
box-shadow: none;
/*
* Color header
*/
th {
color: $primary;
/* Append regular nodes */
} else {
el.appendChild(node)
}
}
}
/* Iterate child nodes and return element */
iterateChildNodes(children)
return el
}
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"rules": {
"no-invalid-this": 0
}
}
@@ -20,39 +20,16 @@
* IN THE SOFTWARE.
*/
import changed from "gulp-changed"
/* ----------------------------------------------------------------------------
* Article typography
* Task: clean images generated by build
* ------------------------------------------------------------------------- */
/*
* Article
*/
.article {
/*
* Third-level headlines should be bold
*/
h3 {
font-weight: 700;
}
/*
* Fourth-level headlines should be italic
*/
h4 {
font-weight: 400;
font-style: italic;
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/images/**/*.ico`)
.pipe(changed(`${config.assets.build}/images`))
.pipe(gulp.dest(`${config.assets.build}/images`))
}
}
/*
* Permalink support
*/
.article {
h2, h3, h4, h5, h6 {
a {
font-weight: 400;
font-style: normal;
}
}
}
+49
View File
@@ -0,0 +1,49 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import changed from "gulp-changed"
import gulpif from "gulp-if"
import minsvg from "gulp-svgmin"
import rev from "gulp-rev"
import version from "gulp-rev-replace"
/* ----------------------------------------------------------------------------
* Task: clean images generated by build
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
return gulp.src(`${config.assets.src}/images/**/*.svg`)
.pipe(changed(`${config.assets.build}/images`))
.pipe(gulpif(args.optimize, minsvg()))
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulp.dest(`${config.assets.build}/images`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
base: config.assets.build,
merge: true
})))
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
}
}
@@ -20,28 +20,16 @@
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Palette
* Task: clean images generated by build
* ------------------------------------------------------------------------- */
/*
* Primary and accent color
*/
$primary: $red-400 !default;
$accent: $teal-a700 !default;
/*
* Black opacities
*/
$black: rgba(black, 0.87);
$black-light: rgba(black, 0.54);
$black-lighter: rgba(black, 0.26);
$black-lightest: rgba(black, 0.12);
/*
* White opacities
*/
$white: rgba(white, 1.00);
$white-light: rgba(white, 0.70);
$white-lighter: rgba(white, 0.30);
$white-lightest: rgba(white, 0.12);
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.build}/images/*`)
.pipe(vinyl(clean))
}
}
@@ -0,0 +1,113 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import gulpif from "gulp-if"
import path from "path"
import rev from "gulp-rev"
import stream from "webpack-stream"
import version from "gulp-rev-replace"
import webpack from "webpack"
/* ----------------------------------------------------------------------------
* Task: build application logic
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
/* Build with webpack */
.pipe(
stream({
entry: [
"whatwg-fetch",
"application.js"
],
output: {
filename: "application.js",
library: "Application"
},
module: {
/* Transpile ES6 to ES5 with Babel */
loaders: [
{
loader: "babel-loader",
test: /\.jsx?$/
}
]
},
plugins: [
/* Don't emit assets that include errors */
new webpack.NoErrorsPlugin(),
/* Provide JSX helper */
new webpack.ProvidePlugin({
JSX: path.join(process.cwd(), `${config.lib}/providers/jsx.js`)
})
].concat(
/* Minify sources */
args.optimize ? [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
] : []),
/* Module resolver */
resolve: {
modulesDirectories: [
"src/assets/javascripts",
"node_modules"
],
extensions: [
"",
".js",
".jsx"
]
},
/* Webpack commandline output */
stats: {
colors: true
},
/* Sourcemap support */
devtool: args.sourcemaps ? "source-map" : ""
}))
/* Revisioning */
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulp.dest(`${config.assets.build}/javascripts`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
base: config.assets.build,
merge: true
})))
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
}
}
@@ -0,0 +1,63 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import concat from "gulp-concat"
import gulpif from "gulp-if"
import modernizr from "gulp-modernizr"
import uglify from "gulp-uglify"
import rev from "gulp-rev"
import version from "gulp-rev-replace"
/* ----------------------------------------------------------------------------
* Task: build custom modernizr
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
return gulp.src(`${config.assets.build}/stylesheets/*.css`)
/* Build custom modernizr */
.pipe(
modernizr({
options: [
"addTest", /* Add custom tests */
"setClasses" /* Add CSS classes to root tag */
]
}))
.pipe(concat("modernizr.js"))
/* Minify sources */
.pipe(gulpif(args.optimize, uglify()))
/* Revisioning */
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulp.dest(`${config.assets.build}/javascripts`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
base: config.assets.build,
merge: true
})))
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
}
}
@@ -20,55 +20,16 @@
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Code highlighter
* Task: clean JavaScript generated by build
* ------------------------------------------------------------------------- */
/*
* Code block
*/
pre {
background: rgba($black, 0.05);
/*
* Ensure correct color
*/
&, code {
color: $black;
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.build}/javascripts/*`)
.pipe(vinyl(clean))
}
}
/*
* Operators and comments
*/
.o, .c, .c1, .cm {
color: $black-light;
}
/*
* Keywords
*/
.k, .kn {
color: #A71D5D;
}
/*
* Types and functions
*/
.kt, .kd, .n.f {
color: #0086B3;
}
/*
* Strings
*/
.s, .s1 {
color: #183691;
}
/*
* Constants and numbers
*/
.mi, .bp {
color: #9575CD;
}
+107
View File
@@ -0,0 +1,107 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import path from "path"
import through from "through2"
import util from "gulp-util"
import { CLIEngine } from "eslint"
/* ----------------------------------------------------------------------------
* Locals
* ------------------------------------------------------------------------- */
const eslint = new CLIEngine
const format = eslint.getFormatter()
/* ----------------------------------------------------------------------------
* Task: lint SASS sources
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/javascripts/**/*.js`)
/* Linting */
.pipe(
through.obj(function(file, enc, done) {
if (file.isNull() || file.isStream())
return done()
/* Lint file using .eslintrc */
file.eslint = eslint.executeOnText(
file.contents.toString())
/* Correct file path */
file.eslint.results[0].filePath =
path.relative(process.cwd(), file.path)
/* Push file to next stage */
this.push(file)
done()
}))
/* Print errors */
.pipe(
through.obj(function(file, enc, done) {
if (file.eslint.errorCount || file.eslint.warningCount) {
// eslint-disable-next-line no-console
console.log(format(file.eslint.results))
}
/* Push file to next stage */
this.push(file)
done()
}))
/* Terminate on error */
.pipe(
(() => {
const errors = []
/* Gather errors */
return through.obj(function(file, enc, done) {
const results = file.eslint
/* Consider warnings as errors */
if (results.errorCount || results.warningCount)
errors.push(file)
/* Push file to next stage */
this.push(file)
done()
/* Format errors and terminate */
}, function(done) {
if (errors.length > 0) {
const message = errors.map(file => {
return file.relative
}).join(", ")
/* Emit error */
this.emit("error", new util.PluginError("eslint",
`Terminated with errors in files: ${message}`))
}
done()
})
})())
}
}
+75
View File
@@ -0,0 +1,75 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import autoprefixer from "autoprefixer"
import gulpif from "gulp-if"
import mincss from "gulp-cssnano"
import mqpacker from "css-mqpacker"
import postcss from "gulp-postcss"
import rev from "gulp-rev"
import sass from "gulp-sass"
import sourcemaps from "gulp-sourcemaps"
import version from "gulp-rev-replace"
/* ----------------------------------------------------------------------------
* Task: build stylesheets from SASS source
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
return gulp.src(`${config.assets.src}/stylesheets/*.scss`)
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
/* Compile SASS sources */
.pipe(
sass({
includePaths: [
"node_modules/modularscale-sass/stylesheets",
"node_modules/material-design-color",
"node_modules/material-shadows"
]
}))
/* Apply PostCSS plugins */
.pipe(
postcss([
autoprefixer(),
mqpacker
]))
/* Minify sources */
.pipe(gulpif(args.optimize, mincss()))
/* Revisioning */
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulpif(args.sourcemaps, sourcemaps.write(".")))
.pipe(gulp.dest(`${config.assets.build}/stylesheets`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
base: config.assets.build,
merge: true
})))
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
}
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Task: clean stylesheets generated by build
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.build}/stylesheets/*`)
.pipe(vinyl(clean))
}
}
+96
View File
@@ -0,0 +1,96 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import path from "path"
import sasslint from "sass-lint"
import through from "through2"
import util from "gulp-util"
/* ----------------------------------------------------------------------------
* Task: lint SASS sources
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/stylesheets/**/*.scss`)
/* Linting */
.pipe(
through.obj(function(file, enc, done) {
if (file.isNull() || file.isStream())
return done()
/* Lint file using .sass-lint.yml */
file.sasslint = sasslint.lintFileText({
text: file.contents,
format: path.extname(file.path).replace(".", ""),
filename: path.relative(process.cwd(), file.path)
})
/* Push file to next stage */
this.push(file)
done()
}))
/* Print errors */
.pipe(
through.obj(function(file, enc, done) {
sasslint.outputResults([file.sasslint])
/* Push file to next stage */
this.push(file)
done()
}))
/* Terminate on error */
.pipe(
(() => {
const errors = []
/* Gather errors */
return through.obj(function(file, enc, done) {
const results = file.sasslint
/* Consider warnings as errors during clean compilation */
if (results.errorCount || results.warningCount)
errors.push(file)
/* Push file to next stage */
this.push(file)
done()
/* Format errors and terminate */
}, function(done) {
if (errors.length > 0) {
const message = errors.map(file => {
return file.relative
}).join(", ")
/* Emit error */
this.emit("error", new util.PluginError("eslint",
`Terminated with errors in files: ${message}`))
}
done()
})
})())
}
}
@@ -20,26 +20,14 @@
* IN THE SOFTWARE.
*/
import child from "child_process"
/* ----------------------------------------------------------------------------
* Article animation
* Task: build documentation
* ------------------------------------------------------------------------- */
/*
* Fade color after highlighting
*/
pre span {
transition: color .25s;
}
/*
* Copyright and theme information
*/
.copyright {
/*
* Animate color on hover
*/
a {
transition: color .25s;
export default () => {
return () => {
return child.spawnSync("mkdocs", ["build"])
}
}
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Task: clean documentation build
* ------------------------------------------------------------------------- */
export default gulp => {
return () => {
return gulp.src("site")
.pipe(vinyl(clean))
}
}
@@ -20,49 +20,27 @@
* IN THE SOFTWARE.
*/
import child from "child_process"
/* ----------------------------------------------------------------------------
* Drawer typography
* Locals
* ------------------------------------------------------------------------- */
/*
* Drawer container
*/
.drawer {
/* MkDocs server */
let server = null
/*
* Links to articles
*/
.toc li a {
font-weight: 700;
}
/* ----------------------------------------------------------------------------
* Task: serve documentation
* ------------------------------------------------------------------------- */
/*
* Links to chapters inside the current article
*/
.toc li.anchor a {
font-weight: 400;
}
export default () => {
return () => {
if (server)
server.kill()
/*
* Main sections
*/
.section {
font-weight: 700;
/* Spawn MkDocs server */
server = child.spawn("mkdocs", ["serve", "-a", "0.0.0.0:8000"], {
stdio: "inherit"
})
}
}
/*
* Repository buttons
*/
.repo a {
text-transform: uppercase;
font-weight: 700;
/*
* Stars
*/
.count {
text-transform: none;
font-weight: 700;
}
}
+72
View File
@@ -0,0 +1,72 @@
import * as selenium from "./selenium"
import path from "path"
import Gemini from "gemini"
export default (gulp, config) => {
return done => {
selenium.start(() => {
// const file = require(
// path.resolve(process.cwd(),
// config.tests.regression.geminiConfigPath,
// ".gemini-local.json"
// ))
const configx = {
"rootUrl": "http://localhost:8000",
"gridUrl": "http://localhost:4444/wd/hub",
"screenshotsDir": "./tests/regression/baseline/local",
"browsers": {
"chrome": {
"desiredCapabilities": {
"browserName": "chrome"
}
}
},
"system": {
"projectRoot": "../../../",
"sourceRoot": "src/assets/stylesheets"
}
}
// https://www.npmjs.com/package/gemini-sauce
console.log("running gemini...")
const gemini = new Gemini(configx)
gemini.test("tests/regression/styleguide.js", {
reporters: ["html"]
})
.then(() => {
console.log("success")
selenium.stop()
done()
}, err => {
console.log("fail")
selenium.stop()
throw err
})
})
// selenium.start(() => {
// const geminiConfig = require(
// path.resolve(
// process.cwd(),
// config.tests.regression.geminiConfigPath,
// ".gemini-local.json"
// ))
// geminiConfig.rootUrl = `http://127.0.0.1:${config.patternlabServer.port}`
//
// const gemini = new Gemini(geminiConfig)
// gemini.test(config.tests.regression.patternlabToGeminiOutput, {
// reporters: ["html"]
// })
// .then(() => {
// selenium.stop()
// done()
// }, err => {
// selenium.stop()
// throw err
// })
// })
}
}
@@ -20,62 +20,53 @@
* IN THE SOFTWARE.
*/
import selenium from "selenium-standalone"
/* ----------------------------------------------------------------------------
* Drawer animation
* Locals
* ------------------------------------------------------------------------- */
/*
* Drawer container
*/
.drawer {
/* Selenium server */
let server = null
/* [tablet landscape-]: Hide menu */
@include break-to-device(tablet landscape) {
transform: translate3d(-262px, 0, 0);
transition: transform .25s cubic-bezier(.4, 0, .2, 1);
/* ----------------------------------------------------------------------------
* Definition
* ------------------------------------------------------------------------- */
/*
* Just hide drawer, if browser doesn't support 3D transforms
*/
.no-csstransforms3d & {
display: none;
export const start = done => {
selenium.start({}, (err, proc) => {
if (err) {
/* Install selenium, if not present */
if (/^Missing(.*)chromedriver$/.test(err.message)) {
selenium.install(done)
/* Start selenium again */
selenium.start({}, (err_, proc_) => {
server = proc_
})
/* Otherwise, throw error */
} else {
throw err
}
}
}
/*
* Expanded drawer
*/
#toggle-drawer:checked ~ .main &,
.toggle-drawer & {
transform: translate3d(0, 0, 0);
/*
* Just show drawer, if browser doesn't support 3D transforms
*/
.no-csstransforms3d & {
display: block;
}
}
/* Remember process handle */
server = server || proc
done()
})
}
/*
* No color transition for project link
*/
.project {
transition: none;
export const stop = () => {
if (server)
server.kill()
}
/*
* Project logo image
*/
.project .logo img {
transition: box-shadow .4s;
}
/* ----------------------------------------------------------------------------
* Signal handler
* ------------------------------------------------------------------------- */
/*
* Repository buttons
*/
.repo a {
transition: box-shadow .4s,
opacity .4s;
}
/* Register signal handler for all relevant events */
for (const signal of ["SIGTERM", "SIGINT", "exit"])
process.on(signal, stop)
+36
View File
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import path from "path"
import { Server } from "karma"
/* ----------------------------------------------------------------------------
* Task: start karma test runner
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return done => {
new Server({
configFile: path.join(process.cwd(), config.tests.unit)
}, done).start()
}
}
+49
View File
@@ -0,0 +1,49 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import path from "path"
import { Server, stopper } from "karma"
/* ----------------------------------------------------------------------------
* Task: start karma test runner
* ------------------------------------------------------------------------- */
export default () => {
return done => {
new Server({
configFile: path.join(process.cwd(), "tests/karma.conf.js")
}, done).start()
}
}
/* ----------------------------------------------------------------------------
* Signal handler
* ------------------------------------------------------------------------- */
/* Register signal handler for all relevant events */
for (const signal of ["SIGTERM", "SIGINT", "exit"])
process.on(signal, () => {
return stopper.stop({
port: 9876,
logLevel: "OFF"
})
})
+55
View File
@@ -0,0 +1,55 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import changed from "gulp-changed"
import compact from "gulp-remove-empty-lines"
import gulpif from "gulp-if"
import minhtml from "gulp-htmlmin"
import path from "path"
import replace from "gulp-replace"
import version from "gulp-rev-replace"
/* ----------------------------------------------------------------------------
* Task: minify views
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
const metadata = require(path.join(process.cwd(), "./package.json"))
return gulp.src(`${config.views.src}/**/*.html`)
.pipe(changed(config.views.build))
.pipe(
minhtml({
collapseBooleanAttributes: true,
removeComments: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
customAttrCollapse: /(content)/
}))
.pipe(replace("$theme-name$", metadata.name))
.pipe(replace("$theme-version$", metadata.version))
.pipe(compact())
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulp.dest(config.views.build))
}
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Task: clean views
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.views.build}/**/*.html`)
.pipe(vinyl(clean))
}
}
+4
View File
@@ -0,0 +1,4 @@
{% extends "main.html" %}
{% block content %}
<h1>404 - Not found</h1>
{% endblock %}
Binary file not shown.
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe600;" glyph-name="search" d="M661.333 341.334h-33.92l-11.733 11.733c41.813 48.427 66.987 111.36 66.987 180.267 0 153.173-124.16 277.333-277.333 277.333s-277.333-124.16-277.333-277.333 124.16-277.333 277.333-277.333c68.907 0 131.84 25.173 180.267 66.773l11.733-11.733v-33.707l213.333-212.907 63.573 63.573-212.907 213.333zM405.333 341.334c-106.027 0-192 85.973-192 192s85.973 192 192 192 192-85.973 192-192-85.973-192-192-192z" />
<glyph unicode="&#xe601;" glyph-name="arrow-back" d="M853.333 469.334h-519.253l238.293 238.293-60.373 60.373-341.333-341.333 341.333-341.333 60.373 60.373-238.293 238.293h519.253v85.333z" />
<glyph unicode="&#xe602;" glyph-name="chevron-right" d="M426.667 682.667l-60.373-60.373 195.627-195.627-195.627-195.627 60.373-60.373 256 256z" />
<glyph unicode="&#xe603;" glyph-name="close" d="M810.667 664.96l-60.373 60.373-238.293-238.293-238.293 238.293-60.373-60.373 238.293-238.293-238.293-238.293 60.373-60.373 238.293 238.293 238.293-238.293 60.373 60.373-238.293 238.293z" />
<glyph unicode="&#xe604;" glyph-name="menu" d="M128 170.667h768v85.333h-768v-85.333zM128 384h768v85.333h-768v-85.333zM128 682.667v-85.333h768v85.333h-768z" />
<glyph unicode="&#xe605;" glyph-name="arrow-forward" d="M512 768l-60.373-60.373 238.293-238.293h-519.253v-85.333h519.253l-238.293-238.293 60.373-60.373 341.333 341.333z" />
<glyph unicode="&#xe606;" glyph-name="twitter" d="M1024 744.249c-37.676-16.708-78.164-28.002-120.66-33.080 43.372 26 76.686 67.17 92.372 116.23-40.596-24.078-85.556-41.56-133.41-50.98-38.32 40.83-92.922 66.34-153.346 66.34-116.022 0-210.088-94.058-210.088-210.078 0-16.466 1.858-32.5 5.44-47.878-174.6 8.764-329.402 92.4-433.018 219.506-18.084-31.028-28.446-67.116-28.446-105.618 0-72.888 37.088-137.192 93.46-174.866-34.438 1.092-66.832 10.542-95.154 26.278-0.020-0.876-0.020-1.756-0.020-2.642 0-101.788 72.418-186.696 168.522-206-17.626-4.8-36.188-7.372-55.348-7.372-13.538 0-26.698 1.32-39.528 3.772 26.736-83.46 104.32-144.206 196.252-145.896-71.9-56.35-162.486-89.934-260.916-89.934-16.958 0-33.68 0.994-50.116 2.94 92.972-59.61 203.402-94.394 322.042-94.394 386.422 0 597.736 320.124 597.736 597.744 0 9.108-0.206 18.168-0.61 27.18 41.056 29.62 76.672 66.62 104.836 108.748z" />
<glyph unicode="&#xe607;" glyph-name="github" d="M512.008 926.025c-282.738 0-512.008-229.218-512.008-511.998 0-226.214 146.704-418.132 350.136-485.836 25.586-4.738 34.992 11.11 34.992 24.632 0 12.204-0.48 52.542-0.696 95.324-142.448-30.976-172.504 60.41-172.504 60.41-23.282 59.176-56.848 74.916-56.848 74.916-46.452 31.778 3.51 31.124 3.51 31.124 51.4-3.61 78.476-52.766 78.476-52.766 45.672-78.27 119.776-55.64 149.004-42.558 4.588 33.086 17.852 55.68 32.506 68.464-113.73 12.942-233.276 56.85-233.276 253.032 0 55.898 20.004 101.574 52.76 137.428-5.316 12.9-22.854 64.972 4.952 135.5 0 0 43.006 13.752 140.84-52.49 40.836 11.348 84.636 17.036 128.154 17.234 43.502-0.198 87.336-5.886 128.256-17.234 97.734 66.244 140.656 52.49 140.656 52.49 27.872-70.528 10.35-122.6 5.036-135.5 32.82-35.856 52.694-81.532 52.694-137.428 0-196.654-119.778-239.95-233.79-252.624 18.364-15.89 34.724-47.046 34.724-94.812 0-68.508-0.596-123.644-0.596-140.508 0-13.628 9.222-29.594 35.172-24.566 203.322 67.776 349.842 259.626 349.842 485.768 0 282.78-229.234 511.998-511.992 511.998z" />
<glyph unicode="&#xe608;" glyph-name="download" d="M810.667 554.667h-170.667v256h-256v-256h-170.667l298.667-298.667 298.667 298.667zM213.333 170.667v-85.333h597.333v85.333h-597.333z" />
<glyph unicode="&#xe609;" glyph-name="star" d="M512 201.814l263.68-159.147-69.973 299.947 232.96 201.813-306.773 26.027-119.893 282.88-119.893-282.88-306.773-26.027 232.96-201.813-69.973-299.947z" />
<glyph unicode="&#xe610;" glyph-name="warning" d="M554 340.667v172h-84v-172h84zM554 170.667v86h-84v-86h84zM42 42.667l470 810 470-810h-940z" />
<glyph unicode="&#xe611;" glyph-name="hint" d="M614 682.667h240v-426h-300l-16 84h-240v-298h-84v726h384z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
viewBox="0 0 352 448">
<path d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75
7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2
38-21t12.5-42zM291.25
74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75
1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875
2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5
332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5
12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4
4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2
9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875
10-13.625 7.75q-63 31.5-152.5
22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5
4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5
78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125
12.75t-1.375 13.5z" />
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
viewBox="0 0 352 448">
<path d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75
7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2
38-21t12.5-42zM291.25
74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75
1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875
2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5
332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5
12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4
4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2
9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875
10-13.625 7.75q-63 31.5-152.5
22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5
4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5
78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125
12.75t-1.375 13.5z" fill="white" />
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
viewBox="0 0 416 448">
<path d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
99.5z" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
viewBox="0 0 416 448">
<path d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
99.5z" fill="white" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,31 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
viewBox="0 0 500 500">
<g transform="translate(156.197863, 1.160267)">
<path d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,
473.347L93.667,473.347z" />
</g>
<g transform="translate(28.531199, 1.160800)" opacity="0.7">
<path d="M221.333,473.345L130.649,194.25H3.557L221.333,473.345L221.333,
473.345z" />
</g>
<g transform="translate(0.088533, 0.255867)" opacity="0.5">
<path d="M32,195.155L32,195.155L4.441,279.97c-2.513,7.735,0.24,16.21,6.821,
20.99l238.514,173.29 L32,195.155L32,195.155z" />
</g>
<g transform="translate(29.421866, 280.255593)">
<path d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856,
0L2.667-84.844 L2.667-84.844z" />
</g>
<g transform="translate(247.197860, 1.160800)" opacity="0.7">
<path d="M2.667,473.345L93.351,194.25h127.092L2.667,473.345L2.667,
473.345z" />
</g>
<g transform="translate(246.307061, 0.255867)" opacity="0.5">
<path d="M221.334,195.155L221.334,195.155l27.559,84.815c2.514,7.735-0.24,
16.21-6.821,20.99 L3.557,474.25L221.334,195.155L221.334,195.155z" />
</g>
<g transform="translate(336.973725, 280.255593)">
<path d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649,15.047-8.649,
17.856,0L130.667-84.844 L130.667-84.844z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1,32 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
viewBox="0 0 500 500">
<g transform="translate(156.197863, 1.160267)">
<path d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,
473.347L93.667,473.347z" fill="white" />
</g>
<g transform="translate(28.531199, 1.160800)" opacity="0.7">
<path d="M221.333,473.345L130.649,194.25H3.557L221.333,473.345L221.333,
473.345z" fill="white" />
</g>
<g transform="translate(0.088533, 0.255867)" opacity="0.5">
<path d="M32,195.155L32,195.155L4.441,279.97c-2.513,7.735,0.24,16.21,6.821,
20.99l238.514,173.29 L32,195.155L32,195.155z" fill="white" />
</g>
<g transform="translate(29.421866, 280.255593)">
<path d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856,
0L2.667-84.844 L2.667-84.844z" fill="white" />
</g>
<g transform="translate(247.197860, 1.160800)" opacity="0.7">
<path d="M2.667,473.345L93.351,194.25h127.092L2.667,473.345L2.667,
473.345z" fill="white" />
</g>
<g transform="translate(246.307061, 0.255867)" opacity="0.5">
<path d="M221.334,195.155L221.334,195.155l27.559,84.815c2.514,7.735-0.24,
16.21-6.821,20.99 L3.557,474.25L221.334,195.155L221.334,195.155z"
fill="white" />
</g>
<g transform="translate(336.973725, 280.255593)">
<path d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649,15.047-8.649,
17.856,0L130.667-84.844 L130.667-84.844z" fill="white" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,813 @@
button[data-md-color-primary],
button[data-md-color-accent] {
width: 10.0rem;
padding: 0.4rem 0.8rem;
-webkit-transition: background-color 0.25s, opacity 0.25s;
transition: background-color 0.25s, opacity 0.25s;
border-radius: 0.2rem;
color: white;
font-size: 1.28rem;
text-align: left;
cursor: pointer; }
button[data-md-color-primary]:hover,
button[data-md-color-accent]:hover {
opacity: 0.75; }
button[data-md-color-primary="red"] {
background-color: #ef5350; }
[data-md-color-primary="red"] .md-typeset a {
color: #ef5350; }
[data-md-color-primary="red"] .md-header {
background-color: #ef5350; }
[data-md-color-primary="red"] .md-nav__link:active,
[data-md-color-primary="red"] .md-nav__link--active {
color: #ef5350; }
button[data-md-color-primary="pink"] {
background-color: #e91e63; }
[data-md-color-primary="pink"] .md-typeset a {
color: #e91e63; }
[data-md-color-primary="pink"] .md-header {
background-color: #e91e63; }
[data-md-color-primary="pink"] .md-nav__link:active,
[data-md-color-primary="pink"] .md-nav__link--active {
color: #e91e63; }
button[data-md-color-primary="purple"] {
background-color: #ab47bc; }
[data-md-color-primary="purple"] .md-typeset a {
color: #ab47bc; }
[data-md-color-primary="purple"] .md-header {
background-color: #ab47bc; }
[data-md-color-primary="purple"] .md-nav__link:active,
[data-md-color-primary="purple"] .md-nav__link--active {
color: #ab47bc; }
button[data-md-color-primary="deep-purple"] {
background-color: #7e57c2; }
[data-md-color-primary="deep-purple"] .md-typeset a {
color: #7e57c2; }
[data-md-color-primary="deep-purple"] .md-header {
background-color: #7e57c2; }
[data-md-color-primary="deep-purple"] .md-nav__link:active,
[data-md-color-primary="deep-purple"] .md-nav__link--active {
color: #7e57c2; }
button[data-md-color-primary="indigo"] {
background-color: #3f51b5; }
[data-md-color-primary="indigo"] .md-typeset a {
color: #3f51b5; }
[data-md-color-primary="indigo"] .md-header {
background-color: #3f51b5; }
[data-md-color-primary="indigo"] .md-nav__link:active,
[data-md-color-primary="indigo"] .md-nav__link--active {
color: #3f51b5; }
button[data-md-color-primary="blue"] {
background-color: #2196f3; }
[data-md-color-primary="blue"] .md-typeset a {
color: #2196f3; }
[data-md-color-primary="blue"] .md-header {
background-color: #2196f3; }
[data-md-color-primary="blue"] .md-nav__link:active,
[data-md-color-primary="blue"] .md-nav__link--active {
color: #2196f3; }
button[data-md-color-primary="light-blue"] {
background-color: #03a9f4; }
[data-md-color-primary="light-blue"] .md-typeset a {
color: #03a9f4; }
[data-md-color-primary="light-blue"] .md-header {
background-color: #03a9f4; }
[data-md-color-primary="light-blue"] .md-nav__link:active,
[data-md-color-primary="light-blue"] .md-nav__link--active {
color: #03a9f4; }
button[data-md-color-primary="cyan"] {
background-color: #00bcd4; }
[data-md-color-primary="cyan"] .md-typeset a {
color: #00bcd4; }
[data-md-color-primary="cyan"] .md-header {
background-color: #00bcd4; }
[data-md-color-primary="cyan"] .md-nav__link:active,
[data-md-color-primary="cyan"] .md-nav__link--active {
color: #00bcd4; }
button[data-md-color-primary="teal"] {
background-color: #009688; }
[data-md-color-primary="teal"] .md-typeset a {
color: #009688; }
[data-md-color-primary="teal"] .md-header {
background-color: #009688; }
[data-md-color-primary="teal"] .md-nav__link:active,
[data-md-color-primary="teal"] .md-nav__link--active {
color: #009688; }
button[data-md-color-primary="green"] {
background-color: #4caf50; }
[data-md-color-primary="green"] .md-typeset a {
color: #4caf50; }
[data-md-color-primary="green"] .md-header {
background-color: #4caf50; }
[data-md-color-primary="green"] .md-nav__link:active,
[data-md-color-primary="green"] .md-nav__link--active {
color: #4caf50; }
button[data-md-color-primary="light-green"] {
background-color: #7cb342; }
[data-md-color-primary="light-green"] .md-typeset a {
color: #7cb342; }
[data-md-color-primary="light-green"] .md-header {
background-color: #7cb342; }
[data-md-color-primary="light-green"] .md-nav__link:active,
[data-md-color-primary="light-green"] .md-nav__link--active {
color: #7cb342; }
button[data-md-color-primary="lime"] {
background-color: #c0ca33; }
[data-md-color-primary="lime"] .md-typeset a {
color: #c0ca33; }
[data-md-color-primary="lime"] .md-header {
background-color: #c0ca33; }
[data-md-color-primary="lime"] .md-nav__link:active,
[data-md-color-primary="lime"] .md-nav__link--active {
color: #c0ca33; }
button[data-md-color-primary="yellow"] {
background-color: #f9a825; }
[data-md-color-primary="yellow"] .md-typeset a {
color: #f9a825; }
[data-md-color-primary="yellow"] .md-header {
background-color: #f9a825; }
[data-md-color-primary="yellow"] .md-nav__link:active,
[data-md-color-primary="yellow"] .md-nav__link--active {
color: #f9a825; }
button[data-md-color-primary="amber"] {
background-color: #ffb300; }
[data-md-color-primary="amber"] .md-typeset a {
color: #ffb300; }
[data-md-color-primary="amber"] .md-header {
background-color: #ffb300; }
[data-md-color-primary="amber"] .md-nav__link:active,
[data-md-color-primary="amber"] .md-nav__link--active {
color: #ffb300; }
button[data-md-color-primary="orange"] {
background-color: #fb8c00; }
[data-md-color-primary="orange"] .md-typeset a {
color: #fb8c00; }
[data-md-color-primary="orange"] .md-header {
background-color: #fb8c00; }
[data-md-color-primary="orange"] .md-nav__link:active,
[data-md-color-primary="orange"] .md-nav__link--active {
color: #fb8c00; }
button[data-md-color-primary="deep-orange"] {
background-color: #ff7043; }
[data-md-color-primary="deep-orange"] .md-typeset a {
color: #ff7043; }
[data-md-color-primary="deep-orange"] .md-header {
background-color: #ff7043; }
[data-md-color-primary="deep-orange"] .md-nav__link:active,
[data-md-color-primary="deep-orange"] .md-nav__link--active {
color: #ff7043; }
button[data-md-color-primary="brown"] {
background-color: #795548; }
[data-md-color-primary="brown"] .md-typeset a {
color: #795548; }
[data-md-color-primary="brown"] .md-header {
background-color: #795548; }
[data-md-color-primary="brown"] .md-nav__link:active,
[data-md-color-primary="brown"] .md-nav__link--active {
color: #795548; }
button[data-md-color-primary="grey"] {
background-color: #757575; }
[data-md-color-primary="grey"] .md-typeset a {
color: #757575; }
[data-md-color-primary="grey"] .md-header {
background-color: #757575; }
[data-md-color-primary="grey"] .md-nav__link:active,
[data-md-color-primary="grey"] .md-nav__link--active {
color: #757575; }
button[data-md-color-primary="blue-grey"] {
background-color: #546e7a; }
[data-md-color-primary="blue-grey"] .md-typeset a {
color: #546e7a; }
[data-md-color-primary="blue-grey"] .md-header {
background-color: #546e7a; }
[data-md-color-primary="blue-grey"] .md-nav__link:active,
[data-md-color-primary="blue-grey"] .md-nav__link--active {
color: #546e7a; }
button[data-md-color-accent="red"] {
background-color: #ff1744; }
[data-md-color-accent="red"] .md-typeset a:hover,
[data-md-color-accent="red"] .md-typeset a:active {
color: #ff1744; }
[data-md-color-accent="red"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="red"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #ff1744; }
[data-md-color-accent="red"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="red"] .md-typeset .footnote li:target .footnote-backref {
color: #ff1744; }
[data-md-color-accent="red"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="red"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="red"] .md-typeset [id] .headerlink:focus {
color: #ff1744; }
[data-md-color-accent="red"] .md-nav__link:hover {
color: #ff1744; }
[data-md-color-accent="red"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ff1744; }
[data-md-color-accent="red"] .md-search-result__link:hover {
background-color: rgba(255, 23, 68, 0.1); }
[data-md-color-accent="red"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ff1744; }
button[data-md-color-accent="pink"] {
background-color: #f50057; }
[data-md-color-accent="pink"] .md-typeset a:hover,
[data-md-color-accent="pink"] .md-typeset a:active {
color: #f50057; }
[data-md-color-accent="pink"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="pink"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #f50057; }
[data-md-color-accent="pink"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="pink"] .md-typeset .footnote li:target .footnote-backref {
color: #f50057; }
[data-md-color-accent="pink"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="pink"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="pink"] .md-typeset [id] .headerlink:focus {
color: #f50057; }
[data-md-color-accent="pink"] .md-nav__link:hover {
color: #f50057; }
[data-md-color-accent="pink"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #f50057; }
[data-md-color-accent="pink"] .md-search-result__link:hover {
background-color: rgba(245, 0, 87, 0.1); }
[data-md-color-accent="pink"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #f50057; }
button[data-md-color-accent="purple"] {
background-color: #e040fb; }
[data-md-color-accent="purple"] .md-typeset a:hover,
[data-md-color-accent="purple"] .md-typeset a:active {
color: #e040fb; }
[data-md-color-accent="purple"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="purple"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #e040fb; }
[data-md-color-accent="purple"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="purple"] .md-typeset .footnote li:target .footnote-backref {
color: #e040fb; }
[data-md-color-accent="purple"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="purple"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="purple"] .md-typeset [id] .headerlink:focus {
color: #e040fb; }
[data-md-color-accent="purple"] .md-nav__link:hover {
color: #e040fb; }
[data-md-color-accent="purple"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #e040fb; }
[data-md-color-accent="purple"] .md-search-result__link:hover {
background-color: rgba(224, 64, 251, 0.1); }
[data-md-color-accent="purple"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #e040fb; }
button[data-md-color-accent="deep-purple"] {
background-color: #7c4dff; }
[data-md-color-accent="deep-purple"] .md-typeset a:hover,
[data-md-color-accent="deep-purple"] .md-typeset a:active {
color: #7c4dff; }
[data-md-color-accent="deep-purple"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="deep-purple"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #7c4dff; }
[data-md-color-accent="deep-purple"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="deep-purple"] .md-typeset .footnote li:target .footnote-backref {
color: #7c4dff; }
[data-md-color-accent="deep-purple"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="deep-purple"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="deep-purple"] .md-typeset [id] .headerlink:focus {
color: #7c4dff; }
[data-md-color-accent="deep-purple"] .md-nav__link:hover {
color: #7c4dff; }
[data-md-color-accent="deep-purple"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #7c4dff; }
[data-md-color-accent="deep-purple"] .md-search-result__link:hover {
background-color: rgba(124, 77, 255, 0.1); }
[data-md-color-accent="deep-purple"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #7c4dff; }
button[data-md-color-accent="indigo"] {
background-color: #536dfe; }
[data-md-color-accent="indigo"] .md-typeset a:hover,
[data-md-color-accent="indigo"] .md-typeset a:active {
color: #536dfe; }
[data-md-color-accent="indigo"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="indigo"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #536dfe; }
[data-md-color-accent="indigo"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="indigo"] .md-typeset .footnote li:target .footnote-backref {
color: #536dfe; }
[data-md-color-accent="indigo"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="indigo"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="indigo"] .md-typeset [id] .headerlink:focus {
color: #536dfe; }
[data-md-color-accent="indigo"] .md-nav__link:hover {
color: #536dfe; }
[data-md-color-accent="indigo"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #536dfe; }
[data-md-color-accent="indigo"] .md-search-result__link:hover {
background-color: rgba(83, 109, 254, 0.1); }
[data-md-color-accent="indigo"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #536dfe; }
button[data-md-color-accent="blue"] {
background-color: #448aff; }
[data-md-color-accent="blue"] .md-typeset a:hover,
[data-md-color-accent="blue"] .md-typeset a:active {
color: #448aff; }
[data-md-color-accent="blue"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="blue"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #448aff; }
[data-md-color-accent="blue"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="blue"] .md-typeset .footnote li:target .footnote-backref {
color: #448aff; }
[data-md-color-accent="blue"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="blue"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="blue"] .md-typeset [id] .headerlink:focus {
color: #448aff; }
[data-md-color-accent="blue"] .md-nav__link:hover {
color: #448aff; }
[data-md-color-accent="blue"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #448aff; }
[data-md-color-accent="blue"] .md-search-result__link:hover {
background-color: rgba(68, 138, 255, 0.1); }
[data-md-color-accent="blue"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #448aff; }
button[data-md-color-accent="light-blue"] {
background-color: #0091ea; }
[data-md-color-accent="light-blue"] .md-typeset a:hover,
[data-md-color-accent="light-blue"] .md-typeset a:active {
color: #0091ea; }
[data-md-color-accent="light-blue"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="light-blue"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #0091ea; }
[data-md-color-accent="light-blue"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="light-blue"] .md-typeset .footnote li:target .footnote-backref {
color: #0091ea; }
[data-md-color-accent="light-blue"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="light-blue"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="light-blue"] .md-typeset [id] .headerlink:focus {
color: #0091ea; }
[data-md-color-accent="light-blue"] .md-nav__link:hover {
color: #0091ea; }
[data-md-color-accent="light-blue"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #0091ea; }
[data-md-color-accent="light-blue"] .md-search-result__link:hover {
background-color: rgba(0, 145, 234, 0.1); }
[data-md-color-accent="light-blue"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #0091ea; }
button[data-md-color-accent="cyan"] {
background-color: #00b8d4; }
[data-md-color-accent="cyan"] .md-typeset a:hover,
[data-md-color-accent="cyan"] .md-typeset a:active {
color: #00b8d4; }
[data-md-color-accent="cyan"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="cyan"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #00b8d4; }
[data-md-color-accent="cyan"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="cyan"] .md-typeset .footnote li:target .footnote-backref {
color: #00b8d4; }
[data-md-color-accent="cyan"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="cyan"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="cyan"] .md-typeset [id] .headerlink:focus {
color: #00b8d4; }
[data-md-color-accent="cyan"] .md-nav__link:hover {
color: #00b8d4; }
[data-md-color-accent="cyan"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #00b8d4; }
[data-md-color-accent="cyan"] .md-search-result__link:hover {
background-color: rgba(0, 184, 212, 0.1); }
[data-md-color-accent="cyan"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #00b8d4; }
button[data-md-color-accent="teal"] {
background-color: #00bfa5; }
[data-md-color-accent="teal"] .md-typeset a:hover,
[data-md-color-accent="teal"] .md-typeset a:active {
color: #00bfa5; }
[data-md-color-accent="teal"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="teal"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #00bfa5; }
[data-md-color-accent="teal"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="teal"] .md-typeset .footnote li:target .footnote-backref {
color: #00bfa5; }
[data-md-color-accent="teal"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="teal"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="teal"] .md-typeset [id] .headerlink:focus {
color: #00bfa5; }
[data-md-color-accent="teal"] .md-nav__link:hover {
color: #00bfa5; }
[data-md-color-accent="teal"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #00bfa5; }
[data-md-color-accent="teal"] .md-search-result__link:hover {
background-color: rgba(0, 191, 165, 0.1); }
[data-md-color-accent="teal"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #00bfa5; }
button[data-md-color-accent="green"] {
background-color: #00c853; }
[data-md-color-accent="green"] .md-typeset a:hover,
[data-md-color-accent="green"] .md-typeset a:active {
color: #00c853; }
[data-md-color-accent="green"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="green"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #00c853; }
[data-md-color-accent="green"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="green"] .md-typeset .footnote li:target .footnote-backref {
color: #00c853; }
[data-md-color-accent="green"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="green"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="green"] .md-typeset [id] .headerlink:focus {
color: #00c853; }
[data-md-color-accent="green"] .md-nav__link:hover {
color: #00c853; }
[data-md-color-accent="green"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #00c853; }
[data-md-color-accent="green"] .md-search-result__link:hover {
background-color: rgba(0, 200, 83, 0.1); }
[data-md-color-accent="green"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #00c853; }
button[data-md-color-accent="light-green"] {
background-color: #64dd17; }
[data-md-color-accent="light-green"] .md-typeset a:hover,
[data-md-color-accent="light-green"] .md-typeset a:active {
color: #64dd17; }
[data-md-color-accent="light-green"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="light-green"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #64dd17; }
[data-md-color-accent="light-green"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="light-green"] .md-typeset .footnote li:target .footnote-backref {
color: #64dd17; }
[data-md-color-accent="light-green"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="light-green"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="light-green"] .md-typeset [id] .headerlink:focus {
color: #64dd17; }
[data-md-color-accent="light-green"] .md-nav__link:hover {
color: #64dd17; }
[data-md-color-accent="light-green"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #64dd17; }
[data-md-color-accent="light-green"] .md-search-result__link:hover {
background-color: rgba(100, 221, 23, 0.1); }
[data-md-color-accent="light-green"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #64dd17; }
button[data-md-color-accent="lime"] {
background-color: #aeea00; }
[data-md-color-accent="lime"] .md-typeset a:hover,
[data-md-color-accent="lime"] .md-typeset a:active {
color: #aeea00; }
[data-md-color-accent="lime"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="lime"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #aeea00; }
[data-md-color-accent="lime"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="lime"] .md-typeset .footnote li:target .footnote-backref {
color: #aeea00; }
[data-md-color-accent="lime"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="lime"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="lime"] .md-typeset [id] .headerlink:focus {
color: #aeea00; }
[data-md-color-accent="lime"] .md-nav__link:hover {
color: #aeea00; }
[data-md-color-accent="lime"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #aeea00; }
[data-md-color-accent="lime"] .md-search-result__link:hover {
background-color: rgba(174, 234, 0, 0.1); }
[data-md-color-accent="lime"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #aeea00; }
button[data-md-color-accent="yellow"] {
background-color: #ffd600; }
[data-md-color-accent="yellow"] .md-typeset a:hover,
[data-md-color-accent="yellow"] .md-typeset a:active {
color: #ffd600; }
[data-md-color-accent="yellow"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="yellow"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #ffd600; }
[data-md-color-accent="yellow"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="yellow"] .md-typeset .footnote li:target .footnote-backref {
color: #ffd600; }
[data-md-color-accent="yellow"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="yellow"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="yellow"] .md-typeset [id] .headerlink:focus {
color: #ffd600; }
[data-md-color-accent="yellow"] .md-nav__link:hover {
color: #ffd600; }
[data-md-color-accent="yellow"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ffd600; }
[data-md-color-accent="yellow"] .md-search-result__link:hover {
background-color: rgba(255, 214, 0, 0.1); }
[data-md-color-accent="yellow"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ffd600; }
button[data-md-color-accent="amber"] {
background-color: #ffab00; }
[data-md-color-accent="amber"] .md-typeset a:hover,
[data-md-color-accent="amber"] .md-typeset a:active {
color: #ffab00; }
[data-md-color-accent="amber"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="amber"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #ffab00; }
[data-md-color-accent="amber"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="amber"] .md-typeset .footnote li:target .footnote-backref {
color: #ffab00; }
[data-md-color-accent="amber"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="amber"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="amber"] .md-typeset [id] .headerlink:focus {
color: #ffab00; }
[data-md-color-accent="amber"] .md-nav__link:hover {
color: #ffab00; }
[data-md-color-accent="amber"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ffab00; }
[data-md-color-accent="amber"] .md-search-result__link:hover {
background-color: rgba(255, 171, 0, 0.1); }
[data-md-color-accent="amber"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ffab00; }
button[data-md-color-accent="orange"] {
background-color: #ff9100; }
[data-md-color-accent="orange"] .md-typeset a:hover,
[data-md-color-accent="orange"] .md-typeset a:active {
color: #ff9100; }
[data-md-color-accent="orange"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="orange"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #ff9100; }
[data-md-color-accent="orange"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="orange"] .md-typeset .footnote li:target .footnote-backref {
color: #ff9100; }
[data-md-color-accent="orange"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="orange"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="orange"] .md-typeset [id] .headerlink:focus {
color: #ff9100; }
[data-md-color-accent="orange"] .md-nav__link:hover {
color: #ff9100; }
[data-md-color-accent="orange"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ff9100; }
[data-md-color-accent="orange"] .md-search-result__link:hover {
background-color: rgba(255, 145, 0, 0.1); }
[data-md-color-accent="orange"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ff9100; }
button[data-md-color-accent="deep-orange"] {
background-color: #ff6e40; }
[data-md-color-accent="deep-orange"] .md-typeset a:hover,
[data-md-color-accent="deep-orange"] .md-typeset a:active {
color: #ff6e40; }
[data-md-color-accent="deep-orange"] .md-typeset pre::-webkit-scrollbar-thumb:hover,
[data-md-color-accent="deep-orange"] .md-typeset .codehilite::-webkit-scrollbar-thumb:hover {
background-color: #ff6e40; }
[data-md-color-accent="deep-orange"] .md-typeset .footnote li:hover .footnote-backref:hover,
[data-md-color-accent="deep-orange"] .md-typeset .footnote li:target .footnote-backref {
color: #ff6e40; }
[data-md-color-accent="deep-orange"] .md-typeset [id]:hover .headerlink:hover,
[data-md-color-accent="deep-orange"] .md-typeset [id]:target .headerlink,
[data-md-color-accent="deep-orange"] .md-typeset [id] .headerlink:focus {
color: #ff6e40; }
[data-md-color-accent="deep-orange"] .md-nav__link:hover {
color: #ff6e40; }
[data-md-color-accent="deep-orange"] .md-search__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ff6e40; }
[data-md-color-accent="deep-orange"] .md-search-result__link:hover {
background-color: rgba(255, 110, 64, 0.1); }
[data-md-color-accent="deep-orange"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
background-color: #ff6e40; }
@media only screen and (min-width: 60em) {
[data-md-color-primary="red"] .md-nav--secondary {
border-left: 0.4rem solid #ef5350; }
[data-md-color-primary="pink"] .md-nav--secondary {
border-left: 0.4rem solid #e91e63; }
[data-md-color-primary="purple"] .md-nav--secondary {
border-left: 0.4rem solid #ab47bc; }
[data-md-color-primary="deep-purple"] .md-nav--secondary {
border-left: 0.4rem solid #7e57c2; }
[data-md-color-primary="indigo"] .md-nav--secondary {
border-left: 0.4rem solid #3f51b5; }
[data-md-color-primary="blue"] .md-nav--secondary {
border-left: 0.4rem solid #2196f3; }
[data-md-color-primary="light-blue"] .md-nav--secondary {
border-left: 0.4rem solid #03a9f4; }
[data-md-color-primary="cyan"] .md-nav--secondary {
border-left: 0.4rem solid #00bcd4; }
[data-md-color-primary="teal"] .md-nav--secondary {
border-left: 0.4rem solid #009688; }
[data-md-color-primary="green"] .md-nav--secondary {
border-left: 0.4rem solid #4caf50; }
[data-md-color-primary="light-green"] .md-nav--secondary {
border-left: 0.4rem solid #7cb342; }
[data-md-color-primary="lime"] .md-nav--secondary {
border-left: 0.4rem solid #c0ca33; }
[data-md-color-primary="yellow"] .md-nav--secondary {
border-left: 0.4rem solid #f9a825; }
[data-md-color-primary="amber"] .md-nav--secondary {
border-left: 0.4rem solid #ffb300; }
[data-md-color-primary="orange"] .md-nav--secondary {
border-left: 0.4rem solid #fb8c00; }
[data-md-color-primary="deep-orange"] .md-nav--secondary {
border-left: 0.4rem solid #ff7043; }
[data-md-color-primary="brown"] .md-nav--secondary {
border-left: 0.4rem solid #795548; }
[data-md-color-primary="grey"] .md-nav--secondary {
border-left: 0.4rem solid #757575; }
[data-md-color-primary="blue-grey"] .md-nav--secondary {
border-left: 0.4rem solid #546e7a; } }
+152 -148
View File
@@ -1,175 +1,179 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<html class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
{% block htmltitle %}
{% if page_title %}
<title>{{ page_title }} - {{ site_name }}</title>
{% elif page_description %}
<title>{{ site_name }} - {{ page_description }}</title>
{% block site_meta %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
{% if config.site_description %}
<meta name="description" content="{{ config.site_description }}">
{% endif %}
{% if page.canonical_url %}
<link rel="canonical" href="{{ page.canonical_url }}">
{% endif %}
{% if config.site_author %}
<meta name="author" content="{{ config.site_author }}">
{% endif %}
{% if config.site_favicon %}
<link rel="shortcut icon" href="{{ base_url }}/{{ config.site_favicon }}">
{% else %}
<title>{{ site_name }}</title>
<link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.ico">
{% endif %}
{% if page_description %}
<meta name="description" content="{{ page_description }}">
{% endif %}
{% if canonical_url %}
<link rel="canonical" href="{{ canonical_url }}">
{% endif %}
{% if site_author %}
<meta name="author" content="{{ site_author }}">
<meta name="generator" content="mkdocs+mkdocs-material#0.2.1">
{% endblock %}
{% block htmltitle %}
{% if page.title %}
<title>{{ page.title }} - {{ config.site_name }}</title>
{% elif config.site_description %}
<title>{{ config.site_name }} - {{ config.site_description }}</title>
{% else %}
<title>{{ config.site_name }}</title>
{% endif %}
{% endblock %}
<meta property="og:url" content="{{ canonical_url }}">
<meta property="og:title" content="{{ site_name }}">
<meta property="og:image" content="{{ canonical_url }}/{{ base_url }}/{{ config.extra.logo }}">
<meta name="apple-mobile-web-app-title" content="{{ site_name }}">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
{% if config.extra.logo %}
<link rel="apple-touch-icon" href="{{ base_url }}/{{ config.extra.logo }}">
{% endif %}
{% set icon = icon | default('assets/images/favicon-e565ddfa3b.ico') %}
<link rel="shortcut icon" type="image/x-icon" href="{{ base_url }}/{{ icon }}">
<link rel="icon" type="image/x-icon" href="{{ base_url }}/{{ icon }}">
<style>
@font-face {
font-family: 'Icon';
src: url('{{ base_url }}/assets/fonts/icon.eot?52m981');
src: url('{{ base_url }}/assets/fonts/icon.eot?#iefix52m981')
format('embedded-opentype'),
url('{{ base_url }}/assets/fonts/icon.woff?52m981')
format('woff'),
url('{{ base_url }}/assets/fonts/icon.ttf?52m981')
format('truetype'),
url('{{ base_url }}/assets/fonts/icon.svg?52m981#icon')
format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-f5ffeca01e.css">
{% if config.extra.font != 'none' %}
{% set text = 'Ubuntu' %}
{% if config.extra.font and config.extra.font.text %}
{% set text = config.extra.font.text %}
{% block libs %}
<script src="{{ base_url }}/assets/javascripts/modernizr.js"></script>
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application.css">
{% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application.palette.css">
{% endif %}
{% set code = 'Ubuntu Mono' %}
{% if config.extra.font and config.extra.font.code %}
{% set code = config.extra.font.code %}
{% endif %}
{% set font = text + ':400,700|' + code | replace('+', ' ') %}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}">
<style>
body, input {
font-family: '{{ text }}', Helvetica, Arial, sans-serif;
}
pre, code {
font-family: '{{ code }}', 'Courier New', 'Courier', monospace;
}
</style>
{% endif %}
{% for path in extra_css %}
<link rel="stylesheet" href="{{ path }}">
{% endfor %}
{% for path in extra_css %}
<link rel="stylesheet" href="{{ path }}">
{% endfor %}
{% endblock %}
{% block extrahead %}{% endblock %}
</head>
<body>
{% if repo_name == 'GitHub' %}
{% set repo_id = repo_url | replace('https://github.com/', '') %}
{% if repo_id[-1:] == '/' %}
{% set repo_id = repo_id[:-1] %}
{% endif %}
{% endif %}
<div class="backdrop">
<div class="backdrop-paper"></div>
</div>
<input class="toggle" type="checkbox" id="toggle-drawer">
<input class="toggle" type="checkbox" id="toggle-search">
<label class="toggle-button overlay" for="toggle-drawer"></label>
<header class="header">
{% include "header.html" %}
</header>
<main class="main">
{% set h1 = "\x3ch1 id=" in content %}
<div class="drawer">
{% include "drawer.html" %}
</div>
<article class="article">
<div class="wrapper">
{% if not h1 %}
{% if page_title %}
<h1>{{ page_title }}</h1>
{% else %}
<h1>{{ site_name }}</h1>
{% set palette = config.extra.get("palette", {}) %}
{% set primary = palette.primary | replace(" ", "-") | lower %}
{% set accent = palette.accent | replace(" ", "-") | lower %}
{% if primary or accent %}
<body data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}">
{% else %}
<body>
{% endif %}
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="drawer">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="search">
<label class="md-overlay" data-md-overlay for="drawer"></label>
{% include "partials/header.html" %}
<div class="md-container">
<main class="md-main">
<div class="md-main__inner md-grid">
{% block site_nav %}
{% if nav %}
<div class="md-sidebar md-sidebar--primary" data-md-sidebar="primary">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/nav.html" %}
</div>
</div>
</div>
{% endif %}
{% endif %}
{{ content }}
<aside class="copyright" role="note">
{% if copyright %}
{{ copyright }} &ndash;
{% if page.toc %}
<div class="md-sidebar md-sidebar--secondary" data-md-sidebar="secondary">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/toc.html" %}
</div>
</div>
</div>
{% endif %}
Documentation built with
<a href="http://www.mkdocs.org" target="_blank">MkDocs</a>
using the
<a href="http://squidfunk.github.io/mkdocs-material/" target="_blank">
Material
</a>
theme.
</aside>
{% block footer %}
<footer class="footer">
{% include "footer.html" %}
</footer>
{% endblock %}
</div></article>
<div class="results" role="status" aria-live="polite">
<div class="scrollable">
<div class="wrapper">
<div class="meta"></div>
<div class="list"></div>
<div class="md-content">
<article class="md-content__inner md-typeset">
{% block content %}
{% if not "\x3ch1 id=" in page.content %}
<h1>{{ page.title | default(config.site_name, true)}}</h1>
{% endif %}
{{ page.content }}
{% endblock %}
<hr>
<small class="md-content__copyright">
{% if config.copyright %}
{{ config.copyright }} &ndash;
{% endif %}
This document was created with
<a href="http://www.mkdocs.org">MkDocs</a>
and the
<a href="http://squidfunk.github.io/mkdocs-material/">
Material
</a>
theme.
{% if config.edit_uri %}
<a href="{{ page.edit_url }}">
Edit this page
</a>
{% endif %}
</small>
</article>
</div>
</div>
</div>
</main>
<script src="{{ base_url }}/assets/javascripts/modernizr-4ab42b99fd.js"></script>
<script>
var base_url = '{{ base_url }}';
var repo_id = '{{ repo_id }}';
</script>
<script src="{{ base_url }}/assets/javascripts/application-c6d2e828bd.js"></script>
{% for path in extra_javascript %}
<script src="{{ path }}"></script>
{% endfor %}
{% if google_analytics %}
</main>
{% block footer %}
{% include "partials/footer.html" %}
{% endblock %}
</div>
{% block scripts %}
{% for extension in config.markdown_extensions %}
{% if extension == "pymdownx.arithmatex" %}
{% set path = "mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML" %}
<script src="https://cdn.mathjax.org/{{ path }}"></script>
{% endif %}
{% endfor %}
<script src="{{ base_url }}/assets/javascripts/application.js"></script>
<script>
/* Configuration for application */
var config = {
url: {
base: "{{ base_url }}",
}
};
/* Initialize application */
var app = new Application(config);
app.initialize();
</script>
{% for path in extra_javascript %}
<script src="{{ path }}"></script>
{% endfor %}
{% endblock %}
{% block analytics %}
{% if config.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){
i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
m.parentNode.insertBefore(a,m)
})(window, document,
'script', '//www.google-analytics.com/analytics.js', 'ga');
"script", "https://www.google-analytics.com/analytics.js", "ga");
/* General initialization */
ga('create', '{{ google_analytics[0] }}', '{{ google_analytics[1] }}');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
ga("create",
"{{ config.google_analytics[0] }}",
"{{ config.google_analytics[1] }}");
ga("set", "anonymizeIp", true);
ga("send", "pageview");
/* Track outbound links */
var buttons = document.querySelectorAll('a');
Array.prototype.map.call(buttons, function(item) {
if (item.host != window.location.host) {
item.addEventListener('click', function() {
var action = item.getAttribute('data-action') || 'follow';
ga('send', 'event', 'outbound', action, item.href);
var links = document.getElementsByTagName("a");
Array.prototype.map.call(links, function(item) {
if (item.host != document.location.host) {
item.addEventListener("click", function() {
var action = item.getAttribute("data-action") || "follow";
ga("send", "event", "outbound", action, item.href);
});
}
});
/* Register handler to log search on blur */
var query = document.forms.search.query;
query.addEventListener("blur", function() {
if (this.value) {
var path = document.location.pathname;
ga("send", "pageview", path + "?q=" + this.value);
}
});
</script>
{% endif %}
{% endif %}
{% endblock %}
</body>
</html>
</body></html>
-68
View File
@@ -1,68 +0,0 @@
<nav aria-label="Navigation">
<a href="{{ repo_url }}" class="project">
<div class="banner">
{% if config.extra.logo %}
<div class="logo">
<img src="{{ base_url }}/{{ config.extra.logo }}">
</div>
{% endif %}
<div class="name">
<strong>{{ site_name }} {{ config.extra.version }}</strong>
{% if repo_id %}
<br>
{{ repo_id }}
{% endif %}
</div>
</div>
</a>
<div class="scrollable">
<div class="wrapper">
{% if repo_name == 'GitHub' %}
<ul class="repo">
<li class="repo-download">
{% set version = config.extra.version | default('master') %}
<a href="{{ repo_url }}/archive/{{ version }}.zip" target="_blank" title="Download {{ site_name }} from GitHub" data-action="download">
<i class="icon icon-download"></i> Download
</a>
</li>
<li class="repo-stars">
<a href="{{ repo_url }}" target="_blank" title="Star {{ site_name }} on GitHub" data-action="star">
<i class="icon icon-star"></i> Star
<span class="count">&ndash;</span>
</a>
</li>
</ul>
<hr>
{% endif %}
<div class="toc">
<ul>
{% for nav_item in nav %}
{% include "nav.html" %}
{% endfor %}
</ul>
{% if config.extra.author %}
<hr>
<span class="section">The author</span>
<ul>
{% if config.extra.author.twitter %}
{% set author = config.extra.author.twitter %}
<li>
<a href="https://twitter.com/{{ author }}" target="_blank" title="@{{ author }} on Twitter">
@{{ author }} on Twitter
</a>
</li>
{% endif %}
{% if config.extra.author.github %}
{% set author = config.extra.author.github %}
<li>
<a href="https://github.com/{{ author }}" target="_blank" title="@{{ author }} on GitHub">
@{{ author }} on GitHub
</a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
</div>
</div>
</nav>
-38
View File
@@ -1,38 +0,0 @@
{% if include_next_prev %}
<nav class="pagination" aria-label="Footer">
<div class="previous">
{% if previous_page %}
<a href="{{ previous_page.url }}" title="{{ previous_page.title }}">
<span class="direction">Previous</span>
<div class="page">
<div class="button button-previous" role="button" aria-label="Previous">
<i class="icon icon-back"></i>
</div>
<div class="stretch">
<div class="title">
{{ previous_page.title }}
</div>
</div>
</div>
</a>
{% endif %}
</div>
<div class="next">
{% if next_page %}
<a href="{{ next_page.url }}" title="{{ next_page.title }}">
<span class="direction">Next</span>
<div class="page">
<div class="stretch">
<div class="title">
{{ next_page.title }}
</div>
</div>
<div class="button button-next" role="button" aria-label="Next">
<i class="icon icon-forward"></i>
</div>
</div>
</a>
{% endif %}
</div>
</nav>
{% endif %}
-56
View File
@@ -1,56 +0,0 @@
<nav aria-label="Header">
<div class="bar default">
<div class="button button-menu" role="button" aria-label="Menu">
<label class="toggle-button icon icon-menu" for="toggle-drawer">
<span></span>
</label>
</div>
<div class="stretch">
<div class="title">
{% if current_page %}
<span class="path">
{% for doc in current_page.ancestors %}
{% if doc.link %}
<a href="{{ doc.link | e }}">{{ doc.title }}</a>
<i class="icon icon-link"></i>
{% else %}
{{ doc.title }} <i class="icon icon-link"></i>
{% endif %}
{% endfor %}
</span>
{% endif %}
{% if page_title %}
{{ page_title }}
{% else %}
{{ site_name }}
{% endif %}
</div>
</div>
{% if config.extra.author and config.extra.author.twitter %}
<div class="button button-twitter" role="button" aria-label="Twitter">
<a href="https://twitter.com/{{ config.extra.author.twitter }}" title="@{{ config.extra.author.twitter }} on Twitter" target="_blank" class="toggle-button icon icon-twitter"></a>
</div>
{% endif %}
{% if config.extra.author and config.extra.author.github %}
<div class="button button-github" role="button" aria-label="GitHub">
<a href="https://github.com/{{ config.extra.author.github }}" title="@{{ config.extra.author.github }} on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
</div>
{% endif %}
<div class="button button-search" role="button" aria-label="Search">
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
</div>
</div>
<div class="bar search">
<div class="button button-close" role="button" aria-label="Close">
<label class="toggle-button icon icon-back" for="toggle-search"></label>
</div>
<div class="stretch">
<div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
</div>
</div>
<div class="button button-reset" role="button" aria-label="Search">
<button class="toggle-button icon icon-close" id="reset-search"></button>
</div>
</div>
</nav>
+1
View File
@@ -0,0 +1 @@
{% extends "base.html" %}
-6
View File
@@ -1,6 +0,0 @@
{
"assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico",
"assets/javascripts/application.js": "assets/javascripts/application-c6d2e828bd.js",
"assets/javascripts/modernizr.js": "assets/javascripts/modernizr-4ab42b99fd.js",
"assets/stylesheets/application.css": "assets/stylesheets/application-f5ffeca01e.css"
}
-37
View File
@@ -1,37 +0,0 @@
{% if nav_item.children %}
<li>
<span class="section">{{ nav_item.title }}</span>
<ul>
{% for nav_item in nav_item.children %}
{% include 'nav.html' %}
{% endfor %}
</ul>
</li>
{% else %}
<li>
<a class="{% if nav_item.active %}current{% endif %}" title="{{ nav_item.title }}" href="{{ nav_item.url }}">
{{ nav_item.title }}
</a>
{% if nav_item == current_page %}
<ul>
{% for toc_item in toc %}
{% if h1 %}
{% for toc_item in toc_item.children %}
<li class="anchor">
<a title="{{ toc_item.title }}" href="{{ toc_item.url }}">
{{ toc_item.title }}
</a>
</li>
{% endfor %}
{% else %}
<li class="anchor">
<a title="{{ toc_item.title }}" href="{{ toc_item.url }}">
{{ toc_item.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}
+38
View File
@@ -0,0 +1,38 @@
<footer class="md-footer">
<div class="md-footer__inner">
{% if page.previous_page or page.next_page %}
<nav class="md-footer-nav md-grid">
{% if page.previous_page %}
<a href="{{ page.previous_page.url }}" title="{{ page.previous_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--back md-footer-nav__icon"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
{{ page.previous_page.title }}
</span>
</div>
</a>
{% endif %}
{% if page.next_page %}
<a href="{{ page.next_page.url }}" title="{{ page.next_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
{{ page.next_page.title }}
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--forward md-footer-nav__icon"></i>
</div>
</a>
{% endif %}
</nav>
{% endif %}
</div>
</footer>
+47
View File
@@ -0,0 +1,47 @@
<header class="md-header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}" class="md-icon md-header-nav__icon md-header-nav__icon--home">
layers
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-header-nav__icon md-header-nav__icon--menu" for="drawer">
menu
</label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<span class="md-flex__ellipsis md-header-nav__title">
{% block site_name %}
{% if page %}
{% for parent in page.ancestors %}
<span class="md-header-nav__parent">
{{ parent.title }}
</span>
{% endfor %}
{% endif %}
{{ page.title | default(config.site_name, true) }}
{% endblock %}
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
{% block search_box %}
<label class="md-icon md-header-nav__icon md-header-nav__icon--search" for="search">
search
</label>
{% include "partials/search.html" %}
{% endblock %}
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
{% block repo %}
{% if config.repo_url %}
{% include "partials/source.html" %}
{% endif %}
{% endblock %}
</div>
</div>
</div>
</nav>
</header>
+48
View File
@@ -0,0 +1,48 @@
{% if nav_item.children %}
<li class="md-nav__item md-nav__item--nested">
{% if nav_item.active %}
<input class="md-toggle md-nav__toggle" data-md-toggle="{{ path }}" type="checkbox" id="{{ path }}" checked>
{% else %}
<input class="md-toggle md-nav__toggle" data-md-toggle="{{ path }}" type="checkbox" id="{{ path }}">
{% endif %}
<label class="md-nav__link" for="{{ path }}">
{{ nav_item.title }}
</label>
<nav class="md-nav" data-md-collapse>
<label class="md-nav__title" for="{{ path }}">
{{ nav_item.title }}
</label>
<ul class="md-nav__list">
{% for nav_item in nav_item.children %}
{% set temp = path %}
{% set path = path + "-" + loop.index | string %}
{% include "partials/nav-item.html" %}
{% set path = temp %}
{% endfor %}
</ul>
</nav>
</li>
{% elif nav_item == page %}
<li class="md-nav__item">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc">
<label class="md-nav__link md-nav__link--active" for="toc">
{{ nav_item.title }}
</label>
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
{{ nav_item.title }}
</a>
{% include "partials/toc.html" %}
</li>
{% else %}
<li class="md-nav__item">
{% if nav_item.active %}
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
{{ nav_item.title }}
</a>
{% else %}
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link">
{{ nav_item.title }}
</a>
{% endif %}
</li>
{% endif %}
+14
View File
@@ -0,0 +1,14 @@
<nav class="md-nav md-nav--primary">
<label class="md-nav__title" for="drawer">{{ config.site_name }}</label>
<ul class="md-nav__list">
{% for nav_item in nav %}
{% set path = "nav-" + loop.index | string %}
{% include "partials/nav-item.html" %}
{% endfor %}
</ul>
{% if config.repo_url %}
<div class="md-nav__source">
{% include "partials/source.html" %}
</div>
{% endif %}
</nav>
+14
View File
@@ -0,0 +1,14 @@
<div class="md-search" data-md-search>
<div class="md-search__overlay"></div>
<div class="md-search__inner">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false">
<label class="md-icon md-search__icon" for="search"></label>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap">
<div class="md-search-result" data-md-search-result></div>
</div>
</div>
</div>
</div>
+19
View File
@@ -0,0 +1,19 @@
{% set platform = config.extra.repo_icon or config.repo_url %}
{% if "github" in platform %}
{% set repo_type = "github" %}
{% set repo_icon = "md-source--github" %}
{% elif "gitlab" in platform %}
{% set repo_type = "gitlab" %}
{% set repo_icon = "md-source--gitlab" %}
{% elif "bitbucket" in platform %}
{% set repo_type = "bitbucket" %}
{% set repo_icon = "md-source--bitbucket" %}
{% else %}
{% set repo_type = "" %}
{% set repo_icon = "" %}
{% endif %}
<a href="{{ config.repo_url }}" title="Go to repository" class="md-source {{ repo_icon }}" data-md-source="{{ repo_type }}">
<div class="md-source__repository">
{{ config.repo_name }}
</div>
</a>
+14
View File
@@ -0,0 +1,14 @@
<li class="md-nav__item">
<a href="{{ toc_item.url }}" title="{{ toc_item.title }}" class="md-nav__link">
{{ toc_item.title }}
</a>
{% if toc_item.children %}
<nav class="md-nav">
<ul class="md-nav__list">
{% for toc_item in toc_item.children %}
{% include "partials/toc-item.html" %}
{% endfor %}
</ul>
</nav>
{% endif %}
</li>
+14
View File
@@ -0,0 +1,14 @@
<nav class="md-nav md-nav--secondary">
{% set toc = page.toc %}
{% if "\x3ch1 id=" in page.content %}
{% set toc = (toc | first).children %}
{% endif %}
{% if toc and (toc | first) %}
<label class="md-nav__title" for="toc">Table of contents</label>
<ul class="md-nav__list">
{% for toc_item in toc %}
{% include "partials/toc-item.html" %}
{% endfor %}
</ul>
{% endif %}
</nav>
+39 -9
View File
@@ -25,36 +25,66 @@ site_author: Martin Donath
site_url: http://squidfunk.github.io/mkdocs-material/
# Repository
repo_name: GitHub
repo_name: squidfunk/mkdocs-material
repo_url: https://github.com/squidfunk/mkdocs-material
edit_uri: edit/rework/docs/
# Copyright
copyright: Copyright (c) 2016 Martin Donath
copyright: 'Copyright &copy 2016 Martin Donath'
# Documentation and theme
theme_dir: material
# Options
extra:
version: 0.1.2
version: 0.2.4
logo: images/logo.png
font:
text: Ubuntu
code: Ubuntu Mono
mono: Ubuntu Mono
author:
github: squidfunk
twitter: squidfunk
palette:
primary: indigo
accent: indigo
# Extensions
markdown_extensions:
- codehilite(css_class=code)
- admonition
- toc:
permalink:
- markdown.extensions.admonition
- markdown.extensions.codehilite(guess_lang=false)
- markdown.extensions.footnotes
- markdown.extensions.meta
- markdown.extensions.toc(permalink=true)
- pymdownx.arithmatex
- pymdownx.betterem(smart_enable=all)
- pymdownx.caret
- pymdownx.critic
- pymdownx.githubemoji
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist(custom_checkbox=true)
- pymdownx.tilde
# Page tree
pages:
- Material: index.md
- Getting started: getting-started.md
- Extensions:
- Admonition: extensions/admonition.md
- Codehilite: extensions/codehilite.md
- Footnotes: extensions/footnotes.md
- Metadata: extensions/metadata.md
- Permalinks: extensions/permalinks.md
- PyMdown:
- Overview: extensions/pymdown/overview.md
- Inline Hilite: extensions/pymdown/inlinehilite.md
- Arithmatex: extensions/pymdown/arithmatex.md
- Tasklist: extensions/pymdown/tasklist.md
- Specimen: specimen.md
- Customization: customization.md
- License: license.md
- License: license.md
+66 -13
View File
@@ -1,45 +1,98 @@
{
"name": "mkdocs-material",
"version": "0.1.2",
"version": "1.0.0",
"description": "A material design theme for MkDocs",
"homepage": "http://squidfunk.github.io/mkdocs-material/",
"authors": [
"squidfunk <martin.donath@squidfunk.com>"
"keywords": [
"mkdocs",
"documentation",
"theme"
],
"license": "MIT",
"main": "Gulpfile.js",
"scripts": {
"start": "gulp watch"
"homepage": "http://squidfunk.github.io/mkdocs-material/",
"bugs": {
"url": "https://github.com/squidfunk/mkdocs-material/issues",
"email": "martin.donath@squidfunk.com"
},
"license": "MIT",
"author": {
"name": "Martin Donath",
"email": "martin.donath@squidfunk.com"
},
"contributors": [],
"repository": {
"type": "git",
"url": "https://github.com/squidfunk/mkdocs-material.git"
},
"private": true,
"scripts": {
"build": "scripts/build",
"clean": "scripts/clean",
"lint": "scripts/lint",
"start": "scripts/start",
"test": "scripts/test"
},
"dependencies": {
"fastclick": "^1.0.6",
"js-cookie": "^2.1.3",
"lunr": "^0.7.1",
"material-design-color": "^2.3.1",
"material-shadows": "^3.0.0",
"modularscale-sass": "^2.1.1",
"whatwg-fetch": "^1.0.0"
},
"devDependencies": {
"autoprefixer": "^6.3.2",
"babel-eslint": "^6.1.2",
"babel-loader": "^6.2.4",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-react-jsx": "^6.8.0",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.13.2",
"babel-register": "^6.16.3",
"babel-root-import": "^4.1.3",
"chai": "^3.5.0",
"css-mqpacker": "^4.0.0",
"del": "^2.2.0",
"eslint": "^3.6.1",
"eslint-plugin-mocha": "^4.6.0",
"git-hooks": "^1.1.6",
"gulp": "^3.9.1",
"gulp-add-src": "^0.2.0",
"gulp-changed": "^1.3.2",
"gulp-concat": "^2.6.0",
"gulp-cssnano": "^2.1.1",
"gulp-htmlmin": "^1.3.0",
"gulp-if": "^2.0.0",
"gulp-ignore": "^2.0.1",
"gulp-image-optimization": "^0.1.3",
"gulp-modernizr": "0.0.0",
"gulp-plumber": "^1.1.0",
"gulp-postcss": "^6.1.0",
"gulp-remove-empty-lines": "0.0.2",
"gulp-replace": "^0.5.4",
"gulp-rev": "^7.0.0",
"gulp-rev-collector": "^1.0.2",
"gulp-rev-replace": "^0.4.3",
"gulp-sass": "^2.2.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-svgmin": "^1.2.2",
"gulp-uglify": "^1.5.2",
"gulp-util": "^3.0.7",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.2.0",
"karma-notify-reporter": "^1.0.1",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.26",
"karma-webpack": "^1.8.0",
"mocha": "^3.1.0",
"node-notifier": "^4.5.0",
"sass-lint": "^1.9.1",
"selenium-standalone": "^5.7.2",
"through2": "^2.0.1",
"vinyl-paths": "^2.1.0",
"webpack": "^1.13.1",
"webpack-stream": "^3.2.0",
"yargs": "^3.32.0"
}
},
"engines": {
"node": ">= 4.5.0"
},
"private": true
}
+23
View File
@@ -0,0 +1,23 @@
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
mkdocs
pygments
pymdown-extensions
Executable
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Check if "npm install" was executed
if [[ ! -d `npm bin` ]]; then
echo "\"node_modules\" not found:"
echo "npm install"
exit 1
fi
# Run command
`npm bin`/gulp build --clean --optimize --revision
Executable
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Check if "npm install" was executed
if [[ ! -d `npm bin` ]]; then
echo "\"node_modules\" not found:"
echo "npm install"
exit 1
fi
# Run command
`npm bin`/gulp clean
Executable
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Check if "npm install" was executed
if [[ ! -d `npm bin` ]]; then
echo "\"node_modules\" not found:"
echo "npm install"
exit 1
fi
# Run ESLint
`npm bin`/eslint .
ESLINT=$?
# Run Sass-Lint
`npm bin`/sass-lint -c .sass-lint.yml -vq
SASSLINT=$?
# If one command failed, exit with error
if [ $ESLINT == 1 ] || [ $SASSLINT == 1 ]; then
exit 1
fi;
# Otherwise return with success
exit 0
Executable
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Check if "npm install" was executed
if [[ ! -d `npm bin` ]]; then
echo "\"node_modules\" not found:"
echo "npm install"
exit 1
fi
# Run command
`npm bin`/gulp watch --no-lint
Executable
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Check if "npm install" was executed
if [[ ! -d `npm bin` ]]; then
echo "\"node_modules\" not found:"
echo "npm install"
exit 1
fi
# Run command
`npm bin`/gulp test
+2 -2
View File
@@ -23,7 +23,7 @@ from setuptools import setup, find_packages
# Package description
setup(
name = 'mkdocs-material',
version = '0.1.2',
version = '1.0.0',
url = 'http://squidfunk.github.io/mkdocs-material/',
license = 'MIT',
description = 'A material design theme for MkDocs',
@@ -38,4 +38,4 @@ setup(
]
},
zip_safe = False
)
)
+28
View File
@@ -0,0 +1,28 @@
<!--
Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
{% extends "main.html" %}
<!-- Content block -->
{% block content %}
<h1>404 - Not found</h1>
{% endblock %}
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More