24 |
25 | {% endblock %}
26 |
--------------------------------------------------------------------------------
/material/assets/images/icons/github.a4034fb1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/extensions/permalinks.md:
--------------------------------------------------------------------------------
1 | # Permalinks
2 |
3 | Permalinks are a feature of the [Table of Contents][1] extension, which is part
4 | of the standard Markdown library. The extension inserts an anchor at the end of
5 | each headline, which makes it possible to directly link to a subpart of the
6 | document.
7 |
8 | [1]: https://pythonhosted.org/Markdown/extensions/toc.html
9 |
10 | ## Installation
11 |
12 | To enable permalinks, add the following to your `mkdocs.yml`:
13 |
14 | ``` yaml
15 | markdown_extensions:
16 | - toc:
17 | permalink: true
18 | ```
19 |
20 | This will add a link containing the paragraph symbol `¶` at the end of each
21 | headline (exactly like on the page you're currently viewing), which the
22 | Material theme will make appear on hover. In order to change the text of the
23 | permalink, a string can be passed, e.g.:
24 |
25 | ``` markdown
26 | markdown_extensions:
27 | - toc:
28 | permalink: Link
29 | ```
30 |
31 | ## Usage
32 |
33 | When enabled, permalinks are inserted automatically.
34 |
--------------------------------------------------------------------------------
/material/assets/images/icons/gitlab.d80e5efc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016-2017 Martin Donath
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to
5 | deal in the Software without restriction, including without limitation the
6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 | sell copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 | IN THE SOFTWARE.
--------------------------------------------------------------------------------
/material/partials/search.html:
--------------------------------------------------------------------------------
1 | {% import "partials/language.html" as lang with context %}
2 |
28 | {% endblock %}
29 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # Material for MkDocs
2 |
3 | ## Beautiful project documentation
4 |
5 | Material is a theme for [MkDocs][1], an excellent static site generator geared
6 | towards project documentation. It is built using Google's [Material Design][2]
7 | guidelines.
8 |
9 | [](assets/images/material.png)
10 |
11 | [1]: http://www.mkdocs.org
12 | [2]: https://material.io/guidelines/material-design/
13 |
14 | ## Quick start
15 |
16 | Install the latest version of Material with `pip`:
17 |
18 | ``` sh
19 | pip install mkdocs-material
20 | ```
21 |
22 | Append the following line to your project's `mkdocs.yml`:
23 |
24 | ``` yaml
25 | theme:
26 | name: 'material'
27 | ```
28 |
29 | ## What to expect
30 |
31 | * Responsive design and fluid layout for all kinds of screens and devices,
32 | designed to serve your project documentation in a user-friendly way with
33 | optimal readability.
34 |
35 | * Easily customizable primary and accent color, fonts, favicon and logo;
36 | straight forward localization through theme extension; integrated with Google
37 | Analytics, Disqus and GitHub.
38 |
39 | * Well-designed search interface accessible through hotkeys (F or
40 | S), intelligent grouping of search results, search term
41 | highlighting and lazy loading.
42 |
43 | For detailed instructions see the [getting started guide][3].
44 |
45 | [3]: getting-started.md
46 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/_shame.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Nothing to see here, move along
25 | // ----------------------------------------------------------------------------
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2017 Martin Donath
2 |
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to
5 | # deal in the Software without restriction, including without limitation the
6 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 | # sell copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 |
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 |
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 | # IN THE SOFTWARE.
20 |
21 | # macOS internals
22 | .DS_Store
23 |
24 | # NPM-related
25 | /node_modules
26 | /npm-debug.log*
27 | /yarn-error.log
28 |
29 | # Files generated by build
30 | /build
31 | /material/manifest.json
32 | /MANIFEST
33 | /site
34 |
35 | # Distribution files
36 | /dist
37 | /mkdocs_material.egg-info
38 |
--------------------------------------------------------------------------------
/src/assets/images/icons/bitbucket.svg:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2017 Martin Donath
2 |
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to
5 | # deal in the Software without restriction, including without limitation the
6 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 | # sell copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 |
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 |
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 | # IN THE SOFTWARE.
20 |
21 | # Top-level config
22 | root = true
23 |
24 | # All files
25 | [*]
26 | charset = utf-8
27 | indent_style = space
28 | indent_size = 2
29 | end_of_line = lf
30 | insert_final_newline = true
31 | trim_trailing_whitespace = true
32 |
33 | # Makefiles
34 | [Makefile]
35 | indent_style = tab
36 | indent_size = 8
37 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Tabs.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import Toggle from "./Tabs/Toggle"
24 |
25 | /* ----------------------------------------------------------------------------
26 | * Module
27 | * ------------------------------------------------------------------------- */
28 |
29 | export default {
30 | Toggle
31 | }
32 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Sidebar.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import Position from "./Sidebar/Position"
24 |
25 | /* ----------------------------------------------------------------------------
26 | * Module
27 | * ------------------------------------------------------------------------- */
28 |
29 | export default {
30 | Position
31 | }
32 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Source/Adapter.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import GitHub from "./Adapter/GitHub"
24 |
25 | /* ----------------------------------------------------------------------------
26 | * Module
27 | * ------------------------------------------------------------------------- */
28 |
29 | export default {
30 | GitHub
31 | }
32 |
--------------------------------------------------------------------------------
/.githooks/post-merge/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright (c) 2016-2017 Martin Donath
4 |
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to
7 | # deal in the Software without restriction, including without limitation the
8 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 | # sell copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 |
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 |
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 | # IN THE SOFTWARE.
22 |
23 | # Check, if all changes are added to the index
24 | CHANGED="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
25 |
26 | # Perform install and prune of NPM dependencies if package.json changed
27 | if $(echo "$CHANGED" | grep --quiet package.json); then
28 | echo -e "\x1B[33m!\x1B[0m Updating dependencies"
29 | yarn install
30 | fi
31 |
--------------------------------------------------------------------------------
/src/partials/hero.html:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 | {% set class = "md-hero" %}
25 | {% if not feature.tabs %}
26 | {% set class = "md-hero md-hero--expand" %}
27 | {% endif %}
28 |
29 |
30 |
31 |
32 | {{ page.meta.hero }}
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Search.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import Lock from "./Search/Lock"
24 | import Result from "./Search/Result"
25 |
26 | /* ----------------------------------------------------------------------------
27 | * Module
28 | * ------------------------------------------------------------------------- */
29 |
30 | export default {
31 | Lock,
32 | Result
33 | }
34 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Header.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import Shadow from "./Header/Shadow"
24 | import Title from "./Header/Title"
25 |
26 | /* ----------------------------------------------------------------------------
27 | * Module
28 | * ------------------------------------------------------------------------- */
29 |
30 | export default {
31 | Shadow,
32 | Title
33 | }
34 |
--------------------------------------------------------------------------------
/material/assets/javascripts/lunr/lunr.jp.js:
--------------------------------------------------------------------------------
1 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||void 0==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(e){return e},e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Za-zA-Z0-90-9",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Event.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import Listener from "./Event/Listener"
24 | import MatchMedia from "./Event/MatchMedia"
25 |
26 | /* ----------------------------------------------------------------------------
27 | * Module
28 | * ------------------------------------------------------------------------- */
29 |
30 | export default {
31 | Listener,
32 | MatchMedia
33 | }
34 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Source.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import Adapter from "./Source/Adapter"
24 | import Repository from "./Source/Repository"
25 |
26 | /* ----------------------------------------------------------------------------
27 | * Module
28 | * ------------------------------------------------------------------------- */
29 |
30 | export default {
31 | Adapter,
32 | Repository
33 | }
34 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Nav.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import Blur from "./Nav/Blur"
24 | import Collapse from "./Nav/Collapse"
25 | import Scrolling from "./Nav/Scrolling"
26 |
27 | /* ----------------------------------------------------------------------------
28 | * Module
29 | * ------------------------------------------------------------------------- */
30 |
31 | export default {
32 | Blur,
33 | Collapse,
34 | Scrolling
35 | }
36 |
--------------------------------------------------------------------------------
/.githooks/pre-commit/branch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright (c) 2016-2017 Martin Donath
4 |
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to
7 | # deal in the Software without restriction, including without limitation the
8 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 | # sell copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 |
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 |
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 | # IN THE SOFTWARE.
22 |
23 | # Determine current branch
24 | BRANCH=$(git rev-parse --abbrev-ref HEAD)
25 | MESSAGE="Commits on master are only allowed via Pull Requests. Aborting."
26 |
27 | # If we're on master, abort commit
28 | if [[ "$BRANCH" == "master" ]]; then
29 | echo -e "\x1B[31m✗\x1B[0m Branch: $BRANCH - \x1B[31m$MESSAGE\x1B[0m"
30 | exit 1
31 | else
32 | echo -e "\x1B[32m✓\x1B[0m Branch: $BRANCH"
33 | fi
34 |
35 | # We're good
36 | exit 0
37 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/extensions/pymdown/_emoji.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Rules
25 | // ----------------------------------------------------------------------------
26 |
27 | // Scoped in typesetted content to match specificity of regular content
28 | .md-typeset {
29 |
30 | // Correct alignment of emojis
31 | .emojione {
32 | width: 2rem;
33 | vertical-align: text-top;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/partials/language.html:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 | {% import "partials/language/" + config.theme.language + ".html" as lang %}
25 |
26 |
27 | {% macro t(key) %}{{ {
28 | "search.language": (
29 | config.extra.search | default({})
30 | ).language | default(config.theme.language, true),
31 | "search.tokenizer": (
32 | config.extra.search | default({})
33 | ).tokenizer | default("", true),
34 | }[key] or lang.t(key) }}{% endmacro %}
35 |
--------------------------------------------------------------------------------
/src/partials/social.html:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 | {% if config.extra.social %}
25 |
34 | {% endif %}
35 |
--------------------------------------------------------------------------------
/src/partials/tabs.html:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 | {% set class = "md-tabs" %}
25 | {% if page.ancestors | length > 0 %}
26 | {% set class = "md-tabs md-tabs--active" %}
27 | {% endif %}
28 |
29 |
30 |
39 |
--------------------------------------------------------------------------------
/src/partials/toc-item.html:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 |
54 | {% endif %}
55 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2017 Martin Donath
2 |
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to
5 | # deal in the Software without restriction, including without limitation the
6 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 | # sell copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 |
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 |
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 | # IN THE SOFTWARE.
20 |
21 | import json
22 | from setuptools import setup, find_packages
23 |
24 | # Load package.json contents
25 | with open("package.json") as data:
26 | package = json.load(data)
27 |
28 | # Load list of dependencies
29 | with open("requirements.txt") as data:
30 | install_requires = [
31 | line for line in data.read().split("\n")
32 | if line and not line.startswith("#")
33 | ]
34 |
35 | # Package description
36 | setup(
37 | name = package["name"],
38 | version = package["version"],
39 | url = package["homepage"],
40 | license = package["license"],
41 | description = package["description"],
42 | author = package["author"]["name"],
43 | author_email = package["author"]["email"],
44 | keywords = package["keywords"],
45 | packages = find_packages(),
46 | include_package_data = True,
47 | install_requires = install_requires,
48 | entry_points = {
49 | "mkdocs.themes": [
50 | "material = material",
51 | ]
52 | },
53 | zip_safe = False
54 | )
55 |
--------------------------------------------------------------------------------
/src/partials/nav.html:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 |
55 |
--------------------------------------------------------------------------------
/.githooks/pre-commit/check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright (c) 2016-2017 Martin Donath
4 |
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to
7 | # deal in the Software without restriction, including without limitation the
8 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 | # sell copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 |
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 |
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 | # IN THE SOFTWARE.
22 |
23 | # Patch file to store unindexed changes
24 | PATCH_FILE=".working-tree.patch"
25 | MESSAGE="Terminated with errors"
26 |
27 | # Revert changes that have been registered in the patch file
28 | function cleanup {
29 | EXIT_CODE=$?
30 | if [ -f "$PATCH_FILE" ]; then
31 | git apply "$PATCH_FILE" 2> /dev/null
32 | rm "$PATCH_FILE"
33 | fi
34 | exit $EXIT_CODE
35 | }
36 |
37 | # Register signal handlers
38 | trap cleanup EXIT SIGINT SIGHUP
39 |
40 | # Cancel any changes to the working tree that are not going to be committed
41 | git diff > "$PATCH_FILE"
42 | git checkout -- .
43 |
44 | # Filter relevant files for linting
45 | FILES=$(git diff --cached --name-only --diff-filter=ACMR | \
46 | grep "\.\(js\|jsx\|scss\)$")
47 |
48 | # Run check and print indicator
49 | if [ "$FILES" ]; then
50 |
51 | # If linter terminated with errors, abort commit
52 | if [ $? -gt 0 ]; then
53 | echo -e "\x1B[31m✗\x1B[0m Linter - \x1B[31m$MESSAGE\x1B[0m"
54 | exit 1
55 | else
56 | echo -e "\x1B[32m✓\x1B[0m Linter"
57 | fi
58 | fi
59 |
60 | # We're good
61 | exit 0
62 |
--------------------------------------------------------------------------------
/src/partials/source.html:
--------------------------------------------------------------------------------
1 |
22 |
23 | {% import "partials/language.html" as lang with context %}
24 |
25 |
29 | {% set platform = config.extra.repo_icon or config.repo_url %}
30 | {% if "github" in platform %}
31 | {% set repo_type = "github" %}
32 | {% elif "gitlab" in platform %}
33 | {% set repo_type = "gitlab" %}
34 | {% elif "bitbucket" in platform %}
35 | {% set repo_type = "bitbucket" %}
36 | {% else %}
37 | {% set repo_type = "" %}
38 | {% endif %}
39 |
40 |
41 | {% block repo %}
42 |
44 | {% if repo_type %}
45 |
54 |
55 | {% endblock %}
56 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Event/MatchMedia.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | import Listener from "./Listener" // eslint-disable-line no-unused-vars
24 |
25 | /* ----------------------------------------------------------------------------
26 | * Class
27 | * ------------------------------------------------------------------------- */
28 |
29 | export default class MatchMedia {
30 |
31 | /**
32 | * Media query listener
33 | *
34 | * This class listens for state changes of media queries and automatically
35 | * switches the given listeners on or off.
36 | *
37 | * @constructor
38 | *
39 | * @property {Function} handler_ - Media query event handler
40 | *
41 | * @param {string} query - Media query to test for
42 | * @param {Listener} listener - Event listener
43 | */
44 | constructor(query, listener) {
45 | this.handler_ = mq => {
46 | if (mq.matches)
47 | listener.listen()
48 | else
49 | listener.unlisten()
50 | }
51 |
52 | /* Initialize media query listener */
53 | const media = window.matchMedia(query)
54 | media.addListener(this.handler_)
55 |
56 | /* Always check at initialization */
57 | this.handler_(media)
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/partials/search.html:
--------------------------------------------------------------------------------
1 |
22 |
23 | {% import "partials/language.html" as lang with context %}
24 |
25 |
26 |
50 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/base/_icons.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // stylelint-disable font-family-no-missing-generic-family-keyword
24 |
25 | // ----------------------------------------------------------------------------
26 | // Rules
27 | // ----------------------------------------------------------------------------
28 |
29 | // Icon placeholders
30 | %md-icon {
31 | font-family: "Material Icons";
32 | font-style: normal;
33 | font-variant: normal;
34 | font-weight: normal;
35 | line-height: 1;
36 | text-transform: none;
37 | white-space: nowrap;
38 | speak: none;
39 | word-wrap: normal;
40 | direction: ltr;
41 |
42 | // Icon rendered as button
43 | &__button {
44 | display: inline-block;
45 | margin: $md-icon-margin;
46 | padding: $md-icon-padding;
47 | font-size: $md-icon-size;
48 | cursor: pointer;
49 | }
50 | }
51 |
52 | // Representational classes
53 | .md-icon {
54 | @extend %md-icon;
55 |
56 | // Build representational classes
57 | @each $ligature, $name in (
58 | "\E5C4": "arrow-back", // arrow_back
59 | "\E5C8": "arrow-forward", // arrow_forward
60 | "\E5D2": "menu", // menu
61 | "\E8B6": "search" // search
62 | ) {
63 | &--#{$name}::before {
64 | content: $ligature;
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/layout/_hero.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Rules
25 | // ----------------------------------------------------------------------------
26 |
27 | // Hero teaser
28 | .md-hero {
29 | transition: background 0.25s;
30 | background-color: $md-color-primary;
31 | color: $md-color-white;
32 | font-size: ms(1);
33 | overflow: hidden;
34 |
35 | // Inner wrapper
36 | &__inner {
37 | margin-top: 2rem;
38 | padding: 1.6rem 1.6rem 0.8rem;
39 | transition:
40 | transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1),
41 | opacity 0.25s;
42 | transition-delay: 0.1s;
43 |
44 | // [tablet -]: Compensate for missing tabs
45 | @include break-to-device(tablet) {
46 | margin-top: 4.8rem;
47 | margin-bottom: 2.4rem;
48 | }
49 |
50 | // Fade-out tabs background upon scrolling
51 | [data-md-state="hidden"] & {
52 | pointer-events: none;
53 | transform: translateY(1.25rem);
54 | transition:
55 | transform 0s 0.4s,
56 | opacity 0.1s 0s;
57 | opacity: 0;
58 | }
59 |
60 | // Adjust bottom spacing if there are no tabs
61 | .md-hero--expand & {
62 | margin-bottom: 2.4rem;
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Source/Repository.jsx:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | /* ----------------------------------------------------------------------------
24 | * Class
25 | * ------------------------------------------------------------------------- */
26 |
27 | export default class Repository {
28 |
29 | /**
30 | * Render repository information
31 | *
32 | * @constructor
33 | *
34 | * @property {HTMLElement} el_ - Repository information
35 | *
36 | * @param {(string|HTMLElement)} el - Selector or HTML element
37 | */
38 | constructor(el) {
39 | const ref = (typeof el === "string")
40 | ? document.querySelector(el)
41 | : el
42 | if (!(ref instanceof HTMLElement))
43 | throw new ReferenceError
44 | this.el_ = ref
45 | }
46 |
47 | /**
48 | * Initialize the repository
49 | *
50 | * @param {Array} facts - Facts to be rendered
51 | */
52 | initialize(facts) {
53 | if (facts.length && this.el_.children.length)
54 | this.el_.children[this.el_.children.length - 1].appendChild(
55 |
56 | {facts.map(fact =>
{fact}
)}
57 |
58 | )
59 |
60 | /* Finish rendering with animation */
61 | this.el_.dataset.mdState = "done"
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/material/partials/footer.html:
--------------------------------------------------------------------------------
1 | {% import "partials/language.html" as lang with context %}
2 |
59 |
--------------------------------------------------------------------------------
/src/partials/integrations/analytics.html:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 |
60 |
--------------------------------------------------------------------------------
/docs/extensions/footnotes.md:
--------------------------------------------------------------------------------
1 | # Footnotes
2 |
3 | [Footnotes][1] is another extension included in the standard Markdown library.
4 | As the name says, it adds the ability to add footnotes to your documentation.
5 |
6 | [1]: https://pythonhosted.org/Markdown/extensions/footnotes.html
7 |
8 | ## Installation
9 |
10 | Add the following lines to your `mkdocs.yml`:
11 |
12 | ``` yaml
13 | markdown_extensions:
14 | - footnotes
15 | ```
16 |
17 | ## Usage
18 |
19 | The markup for footnotes is similar to the standard Markdown markup for links.
20 | A reference is inserted in the text, which can then be defined at any point in
21 | the document.
22 |
23 | ### Inserting the reference
24 |
25 | The footnote reference is enclosed in square brackets and starts with a caret,
26 | followed by an arbitrary label which may contain numeric identifiers [1, 2, 3,
27 | ...] or names [Granovetter et al. 1998]. The rendered references are always
28 | consecutive superscripted numbers.
29 |
30 | Example:
31 |
32 | ``` markdown
33 | Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
34 | ```
35 |
36 | Result:
37 |
38 | Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
39 |
40 | ### Inserting the content
41 |
42 | The footnote content is also declared with a label, which must match the label
43 | used for the footnote reference. It can be inserted at an arbitrary position in
44 | the document and is always rendered at the bottom of the page. Furthermore, a
45 | backlink is automatically added to the footnote reference.
46 |
47 | #### on a single line
48 |
49 | Short statements can be written on the same line.
50 |
51 | Example:
52 |
53 | ``` markdown
54 | [^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
55 | ```
56 |
57 | Result:
58 |
59 | Jump to footnote at the bottom of the page
60 |
61 | [^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
62 |
63 | #### on multiple lines
64 |
65 | Paragraphs should be written on the next line. As with all Markdown blocks, the
66 | content must be indented by four spaces.
67 |
68 | Example:
69 |
70 | ``` markdown
71 | [^2]:
72 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
73 | nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
74 | massa, nec semper lorem quam in massa.
75 | ```
76 |
77 | Result:
78 |
79 | [^2]:
80 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
81 | nulla. Curabitur feugiat, tortor non consequat finibus, justo purus
82 | auctor massa, nec semper lorem quam in massa.
83 |
84 | Jump to footnote at the bottom of the page
85 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/application.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Dependencies
25 | // ----------------------------------------------------------------------------
26 |
27 | @import "modularscale";
28 | @import "material-color";
29 | @import "material-shadows";
30 |
31 | // ----------------------------------------------------------------------------
32 | // Local imports
33 | // ----------------------------------------------------------------------------
34 |
35 | @import "helpers/break";
36 | @import "helpers/px2em";
37 |
38 | @import "config";
39 |
40 | @import "base/reset";
41 | @import "base/icons";
42 | @import "base/typeset";
43 |
44 | @import "layout/base";
45 | @import "layout/clipboard";
46 | @import "layout/content";
47 | @import "layout/header";
48 | @import "layout/hero";
49 | @import "layout/footer";
50 | @import "layout/nav";
51 | @import "layout/search";
52 | @import "layout/sidebar";
53 | @import "layout/source";
54 | @import "layout/tabs";
55 |
56 | @import "extensions/admonition";
57 | @import "extensions/codehilite";
58 | @import "extensions/footnotes";
59 | @import "extensions/permalinks";
60 |
61 | @import "extensions/pymdown/arithmatex";
62 | @import "extensions/pymdown/critic";
63 | @import "extensions/pymdown/details";
64 | @import "extensions/pymdown/emoji";
65 | @import "extensions/pymdown/inlinehilite";
66 | @import "extensions/pymdown/tasklist";
67 |
68 | @import "shame";
69 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mkdocs-material",
3 | "version": "2.2.3",
4 | "description": "A Material Design theme for MkDocs",
5 | "keywords": [
6 | "mkdocs",
7 | "documentation",
8 | "theme"
9 | ],
10 | "homepage": "https://squidfunk.github.io/mkdocs-material/",
11 | "bugs": {
12 | "url": "https://github.com/squidfunk/mkdocs-material/issues",
13 | "email": "martin.donath@squidfunk.com"
14 | },
15 | "license": "MIT",
16 | "author": {
17 | "name": "Martin Donath",
18 | "email": "martin.donath@squidfunk.com"
19 | },
20 | "contributors": [],
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/squidfunk/mkdocs-material.git"
24 | },
25 | "scripts": {
26 | "build": "make clean build",
27 | "clean": "make clean",
28 | "lint": "make lint",
29 | "start": "make -j watch",
30 | "watch": "make -j watch"
31 | },
32 | "dependencies": {},
33 | "devDependencies": {
34 | "autoprefixer": "^7.1.2",
35 | "babel-cli": "^6.26.0",
36 | "babel-core": "^6.25.0",
37 | "babel-eslint": "^8.0.0",
38 | "babel-loader": "^7.1.1",
39 | "babel-plugin-add-module-exports": "^0.2.1",
40 | "babel-plugin-transform-react-jsx": "^6.24.1",
41 | "babel-preset-env": "^1.6.1",
42 | "chalk": "^2.0.1",
43 | "clipboard": "^1.7.1",
44 | "copy-webpack-plugin": "^4.2.1",
45 | "css-loader": "^0.28.7",
46 | "css-mqpacker": "^6.0.1",
47 | "custom-event-polyfill": "^0.3.0",
48 | "customizr": "^1.0.0-alpha",
49 | "escape-string-regexp": "^1.0.5",
50 | "eslint": "^4.3.0",
51 | "event-hooks-webpack-plugin": "^1.0.0",
52 | "expose-loader": "^0.7.4",
53 | "extract-text-webpack-plugin": "^3.0.2",
54 | "fastclick": "^1.0.6",
55 | "file-loader": "^1.1.5",
56 | "git-hooks": "^1.1.8",
57 | "html-minifier": "^3.5.6",
58 | "imagemin-webpack-plugin": "^1.5.2",
59 | "js-cookie": "^2.1.4",
60 | "lunr": "^2.1.2",
61 | "lunr-languages": "^1.0.0",
62 | "material-design-color": "^2.3.2",
63 | "material-shadows": "^3.0.1",
64 | "modernizr-auto-loader": "^0.1.0",
65 | "modularscale-sass": "^3.0.3",
66 | "node-sass": "^4.7.2",
67 | "postcss-loader": "^2.0.8",
68 | "promise-polyfill": "^6.0.2",
69 | "sass-loader": "^6.0.6",
70 | "style-loader": "^0.19.0",
71 | "stylelint": "^8.3.0",
72 | "stylelint-config-standard": "^18.0.0",
73 | "stylelint-order": "^0.8.0",
74 | "stylelint-scss": "^2.0.0",
75 | "uglify-js": "^3.1.10",
76 | "unfetch": "^3.0.0",
77 | "webpack": "^3.4.1",
78 | "webpack-manifest-plugin": "^1.3.2"
79 | },
80 | "engines": {
81 | "node": ">= 8"
82 | },
83 | "private": true
84 | }
85 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Tabs/Toggle.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | /* ----------------------------------------------------------------------------
24 | * Class
25 | * ------------------------------------------------------------------------- */
26 |
27 | export default class Toggle {
28 |
29 | /**
30 | * Toggle tabs visibility depending on page y-offset
31 | *
32 | * @constructor
33 | *
34 | * @property {HTMLElement} el_ - Content container
35 | * @property {number} offset_ - Toggle page-y offset
36 | * @property {boolean} active_ - Tabs visibility
37 | *
38 | * @param {(string|HTMLElement)} el - Selector or HTML element
39 | */
40 | constructor(el) {
41 | const ref = (typeof el === "string")
42 | ? document.querySelector(el)
43 | : el
44 | if (!(ref instanceof Node))
45 | throw new ReferenceError
46 | this.el_ = ref
47 |
48 | /* Initialize offset and state */
49 | this.active_ = false
50 | }
51 |
52 | /**
53 | * Update visibility
54 | */
55 | update() {
56 | const active = window.pageYOffset >=
57 | this.el_.children[0].offsetTop + (5 - 48) // TODO: quick hack to enable same handling for hero
58 | if (active !== this.active_)
59 | this.el_.dataset.mdState = (this.active_ = active) ? "hidden" : ""
60 | }
61 |
62 | /**
63 | * Reset visibility
64 | */
65 | reset() {
66 | this.el_.dataset.mdState = ""
67 | this.active_ = false
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/src/partials/tabs-item.html:
--------------------------------------------------------------------------------
1 |
22 |
23 |
24 | {% if nav_item.is_homepage %}
25 |
63 | {% endif %}
64 | {% endif %}
65 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/extensions/pymdown/_tasklist.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Rules
25 | // ----------------------------------------------------------------------------
26 |
27 | // Scoped in typesetted content to match specificity of regular content
28 | .md-typeset {
29 |
30 | // Remove list icon on task items
31 | .task-list-item {
32 | position: relative;
33 | list-style-type: none;
34 |
35 | // Make checkbox items align with normal list items, but position
36 | // everything in ems for correct layout at smaller font sizes
37 | [type="checkbox"] {
38 | position: absolute;
39 | top: 0.45em;
40 | left: -2em;
41 | }
42 | }
43 |
44 | // Wrapper for list controls, in case custom checkboxes are enabled
45 | .task-list-control {
46 |
47 | // Checkbox icon in unchecked state
48 | .task-list-indicator::before {
49 | @extend %md-icon;
50 |
51 | position: absolute;
52 | top: 0.15em;
53 | left: -1.25em;
54 | color: $md-color-black--lighter;
55 | font-size: 1.25em;
56 | content: "\E835"; // check_box_outline_blank
57 | vertical-align: -0.25em;
58 | }
59 |
60 | // Checkbox icon in checked state
61 | [type="checkbox"]:checked + .task-list-indicator::before {
62 | content: "\E834"; // check_box
63 | }
64 |
65 | // Hide original checkbox behind icon
66 | [type="checkbox"] {
67 | opacity: 0;
68 | z-index: -1;
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/.travis.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright (c) 2016-2017 Martin Donath
4 |
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to
7 | # deal in the Software without restriction, including without limitation the
8 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 | # sell copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 |
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 |
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 | # IN THE SOFTWARE.
22 |
23 | # Exit, if one command fails
24 | set -e
25 |
26 | # Deploy documentation to GitHub pages
27 | if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then
28 | REMOTE="https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material"
29 |
30 | # Set configuration for repository and deploy documentation
31 | git config --global user.name "${GH_NAME}"
32 | git config --global user.email "${GH_EMAIL}"
33 | git remote set-url origin $REMOTE
34 | mkdocs gh-deploy --force
35 | fi
36 |
37 | # Terminate if we're not on a release branch
38 | echo "$TRAVIS_BRANCH" | grep -qvE "^[0-9.]+$" && exit 0; :;
39 |
40 | # Install dependencies for release build
41 | pip install --user wheel twine
42 |
43 | # Fix SSL warnings for Python > 2.7.9
44 | # https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2
45 | pip install --user urllib3[secure]
46 |
47 | # Build and install theme and Docker image
48 | python setup.py build sdist bdist_wheel --universal
49 | docker build -t $TRAVIS_REPO_SLUG .
50 |
51 | # Prepare build regression test
52 | pushd /tmp
53 | mkdocs new test && cd test
54 |
55 | # Test Docker image build
56 | docker run --rm -it -v `pwd`:/docs $TRAVIS_REPO_SLUG build --theme material
57 |
58 | # Return to original directory
59 | popd
60 |
61 | # Push release to PyPI
62 | twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*
63 |
64 | # Push image to Docker Hub
65 | docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
66 | docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:$TRAVIS_BRANCH
67 | docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:latest
68 | docker push $TRAVIS_REPO_SLUG
69 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2017 Martin Donath
2 |
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to
5 | # deal in the Software without restriction, including without limitation the
6 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 | # sell copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 |
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 |
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 | # IN THE SOFTWARE.
20 |
21 | all: clean lint | build
22 |
23 | # -----------------------------------------------------------------------------
24 | # Prerequisites
25 | # -----------------------------------------------------------------------------
26 |
27 | # Install dependencies
28 | node_modules:
29 | yarn install
30 |
31 | # -----------------------------------------------------------------------------
32 | # Targets
33 | # -----------------------------------------------------------------------------
34 |
35 | # Build theme for distribution with Webpack
36 | material: $(shell find src) .babelrc webpack.config.js
37 | $(shell yarn bin)/webpack --env.prod
38 |
39 | # -----------------------------------------------------------------------------
40 | # Rules
41 | # -----------------------------------------------------------------------------
42 |
43 | # Build distribution files
44 | build: node_modules material
45 |
46 | # Clean distribution files
47 | clean:
48 | rm -rf material
49 |
50 | # Lint source files
51 | lint: node_modules
52 | $(shell yarn bin)/eslint --max-warnings 0 .
53 | $(shell yarn bin)/stylelint `find src/assets -name *.scss`
54 |
55 | # Rebuild theme on changes with Webpack
56 | watch-webpack: node_modules clean
57 | $(shell yarn bin)/webpack --watch
58 |
59 | # Serve documentation with MkDocs
60 | watch-mkdocs: clean
61 | while [ ! -d "./material" ]; do sleep 1; done
62 | mkdocs serve
63 |
64 | # Run Webpack and MkDocs in watch mode
65 | watch: node_modules watch-webpack watch-mkdocs
66 |
67 | # -----------------------------------------------------------------------------
68 |
69 | # Special targets
70 | .PHONY: .FORCE build clean lint watch watch-mkdocs watch-webpack
71 | .FORCE:
72 |
--------------------------------------------------------------------------------
/src/mkdocs_theme.yml:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2017 Martin Donath
2 |
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to
5 | # deal in the Software without restriction, including without limitation the
6 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 | # sell copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 |
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 |
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 | # IN THE SOFTWARE.
20 |
21 | # Language for theme localization
22 | language: en
23 |
24 | # Feature flags for functionality that alters behavior significantly, and thus
25 | # may be a matter of taste
26 | feature:
27 |
28 | # Another layer on top of the main navigation for larger screens in the form
29 | # of tabs, especially useful for larger documentation projects
30 | tabs: false
31 |
32 | # Sets the primary and accent color palettes as defined in the Material Design
33 | # documentation - possible values can be looked up in the getting started guide
34 | palette:
35 |
36 | # Primary color used for header, sidebar and links, default: indigo
37 | primary:
38 |
39 | # Accent color for highlighting user interaction, default: indigo
40 | accent:
41 |
42 | # Fonts used by Material, automatically loaded from Google Fonts - see the site
43 | # for a list of available fonts
44 | font:
45 |
46 | # Default font for text
47 | text: Roboto
48 |
49 | # Fixed-width font for code listings
50 | code: Roboto Mono
51 |
52 | # Favicon to be rendered
53 | favicon: assets/images/favicon.png
54 |
55 | # The logo of the documentation shown in the header and navigation can either
56 | # be a Material Icon ligature (see https://material.io/icons/) or an image URL
57 | logo:
58 | icon: "\uE80C"
59 |
60 | # Material includes the search in the header as a partial, not as a separate
61 | # template, so it's correct that search.html is missing
62 | include_search_page: false
63 |
64 | # Material doesn't use MkDocs search functionality but provides its own. For
65 | # this reason, only the search index needs to be built
66 | search_index_only: true
67 |
68 | # Static pages to build
69 | static_templates:
70 | - 404.html
71 |
--------------------------------------------------------------------------------
/material/mkdocs_theme.yml:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2017 Martin Donath
2 |
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to
5 | # deal in the Software without restriction, including without limitation the
6 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 | # sell copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 |
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 |
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 | # IN THE SOFTWARE.
20 |
21 | # Language for theme localization
22 | language: en
23 |
24 | # Feature flags for functionality that alters behavior significantly, and thus
25 | # may be a matter of taste
26 | feature:
27 |
28 | # Another layer on top of the main navigation for larger screens in the form
29 | # of tabs, especially useful for larger documentation projects
30 | tabs: false
31 |
32 | # Sets the primary and accent color palettes as defined in the Material Design
33 | # documentation - possible values can be looked up in the getting started guide
34 | palette:
35 |
36 | # Primary color used for header, sidebar and links, default: indigo
37 | primary:
38 |
39 | # Accent color for highlighting user interaction, default: indigo
40 | accent:
41 |
42 | # Fonts used by Material, automatically loaded from Google Fonts - see the site
43 | # for a list of available fonts
44 | font:
45 |
46 | # Default font for text
47 | text: Roboto
48 |
49 | # Fixed-width font for code listings
50 | code: Roboto Mono
51 |
52 | # Favicon to be rendered
53 | favicon: assets/images/favicon.png
54 |
55 | # The logo of the documentation shown in the header and navigation can either
56 | # be a Material Icon ligature (see https://material.io/icons/) or an image URL
57 | logo:
58 | icon: "\uE80C"
59 |
60 | # Material includes the search in the header as a partial, not as a separate
61 | # template, so it's correct that search.html is missing
62 | include_search_page: false
63 |
64 | # Material doesn't use MkDocs search functionality but provides its own. For
65 | # this reason, only the search index needs to be built
66 | search_index_only: true
67 |
68 | # Static pages to build
69 | static_templates:
70 | - 404.html
71 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/layout/_content.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Rules
25 | // ----------------------------------------------------------------------------
26 |
27 | // Content container
28 | .md-content {
29 |
30 | // [tablet landscape +]: Add space for table of contents
31 | @include break-from-device(tablet landscape) {
32 | margin-right: 24.2rem;
33 | }
34 |
35 | // [screen +]: Add space for table of contents
36 | @include break-from-device(screen) {
37 | margin-left: 24.2rem;
38 | }
39 |
40 | // Define spacing
41 | &__inner {
42 | margin: 0 1.6rem 2.4rem;
43 | padding-top: 1.2rem;
44 |
45 | // [screen +]: Increase horizontal spacing
46 | @include break-from-device(screen) {
47 | margin-right: 2.4rem;
48 | margin-left: 2.4rem;
49 | }
50 |
51 | // Hack: add pseudo element for spacing, as the overflow of the content
52 | // container may not be hidden due to an imminent offset error on targets
53 | &::before {
54 | display: block;
55 | height: 0.8rem;
56 | content: "";
57 | }
58 |
59 | // Hack: remove bottom spacing of last element, due to margin collapse
60 | > :last-child {
61 | margin-bottom: 0;
62 | }
63 | }
64 |
65 | // Icons
66 | &__icon {
67 | @extend %md-icon__button;
68 |
69 | position: relative;
70 | margin: 0.8rem 0;
71 | padding: 0;
72 | float: right;
73 |
74 | // Override default link color for icons
75 | .md-typeset & {
76 | color: $md-color-black--lighter;
77 | }
78 |
79 | // Hide for print
80 | @media print {
81 | display: none;
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/docs/extensions/metadata.md:
--------------------------------------------------------------------------------
1 | hero: Yes, this is set via Metadata
2 | path: tree/master/docs/extensions
3 | source: metadata.md
4 |
5 | # Metadata
6 |
7 | The [Metadata][1] extension makes it possible to add metadata to a document
8 | which gives more control over the theme in a page-specific context.
9 |
10 | [1]: https://pythonhosted.org/Markdown/extensions/meta_data.html
11 |
12 | ## Installation
13 |
14 | Add the following lines to your `mkdocs.yml`:
15 |
16 | ``` yaml
17 | markdown_extensions:
18 | - meta
19 | ```
20 |
21 | ## Usage
22 |
23 | Metadata is written as a series of key-value pairs at the beginning of the
24 | Markdown document, delimited by a blank line which ends the metadata context.
25 | Naturally, the metadata is stripped from the document before rendering the
26 | actual page content and made available to the theme.
27 |
28 | Example:
29 |
30 | ``` markdown
31 | title: Lorem ipsum dolor sit amet
32 | description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
33 | path: path/to/file
34 | source: file.js
35 |
36 | # Headline
37 |
38 | ...
39 | ```
40 |
41 | See the next section which covers the metadata that is supported by Material.
42 |
43 | ### Setting a hero text
44 |
45 | Material exposes a simple text-only page-local hero via Metadata, as you can
46 | see on the current page when you scroll to the top. It's as simple as:
47 |
48 | ``` markdown
49 | hero: Yes, this is set via Metadata
50 | ```
51 |
52 | ### Overriding the title
53 |
54 | The page title can be overridden on a per-document level:
55 |
56 | ``` markdown
57 | title: Lorem ipsum dolor sit amet
58 | ```
59 |
60 | This will set the `title` tag inside the document `head` for the current page
61 | to the provided value. It will also override the default behavior of Material
62 | for MkDocs which appends the site title using a dash as a separator to the page
63 | title.
64 |
65 | ### Overriding the description
66 |
67 | The page description can also be overridden on a per-document level:
68 |
69 | ``` yaml
70 | description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
71 | ```
72 |
73 | This will set the `meta` tag containing the site description inside the
74 | document `head` for the current page to the provided value.
75 |
76 | ### Linking sources
77 |
78 | When a document is related to a specific set of source files and the `repo_url`
79 | is defined inside the project's `mkdocs.yml`, the files can be linked using the
80 | `source` key:
81 |
82 | ``` markdown
83 | source: file.js
84 | ```
85 |
86 | The filename is appended to the `repo_url` set in your `mkdocs.yml`, but can
87 | be prefixed with a `path` to ensure correct path resolving:
88 |
89 | Example:
90 |
91 | ``` markdown
92 | path: tree/master/docs/extensions
93 | source: metadata.md
94 | ```
95 |
96 | Result:
97 |
98 | See the [source][2] section for the resulting output.
99 |
100 | [2]: #__source
101 |
--------------------------------------------------------------------------------
/src/partials/toc.html:
--------------------------------------------------------------------------------
1 |
22 |
23 | {% import "partials/language.html" as lang with context %}
24 |
25 |
26 |
69 |
--------------------------------------------------------------------------------
/src/assets/javascripts/providers/jsx.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | /* ----------------------------------------------------------------------------
24 | * Module
25 | * ------------------------------------------------------------------------- */
26 |
27 | /* eslint-disable no-underscore-dangle */
28 | export default /* JSX */ {
29 |
30 | /**
31 | * Create a native DOM node from JSX's intermediate representation
32 | *
33 | * @param {string} tag - Tag name
34 | * @param {?Object} properties - Properties
35 | * @param {Array>}
36 | * children - Child nodes
37 | * @return {HTMLElement} Native DOM node
38 | */
39 | createElement(tag, properties, ...children) {
40 | const el = document.createElement(tag)
41 |
42 | /* Set all properties */
43 | if (properties)
44 | Array.prototype.forEach.call(Object.keys(properties), attr => {
45 | el.setAttribute(attr, properties[attr])
46 | })
47 |
48 | /* Iterate child nodes */
49 | const iterateChildNodes = nodes => {
50 | Array.prototype.forEach.call(nodes, node => {
51 |
52 | /* Directly append text content */
53 | if (typeof node === "string" ||
54 | typeof node === "number") {
55 | el.textContent += node
56 |
57 | /* Recurse, if we got an array */
58 | } else if (Array.isArray(node)) {
59 | iterateChildNodes(node)
60 |
61 | /* Append raw HTML */
62 | } else if (typeof node.__html !== "undefined") {
63 | el.innerHTML += node.__html
64 |
65 | /* Append regular nodes */
66 | } else if (node instanceof Node) {
67 | el.appendChild(node)
68 | }
69 | })
70 | }
71 |
72 | /* Iterate child nodes and return element */
73 | iterateChildNodes(children)
74 | return el
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/extensions/pymdown/_details.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Rules
25 | // ----------------------------------------------------------------------------
26 |
27 | // Scoped in typesetted content to match specificity of regular content
28 | .md-typeset {
29 |
30 | // Details extension
31 | details {
32 | @extend .admonition;
33 |
34 | padding-top: 0;
35 |
36 | // Rotate title icon
37 | &[open] > summary::after {
38 | transform: rotate(180deg);
39 | }
40 |
41 | // Remove bottom spacing
42 | &:not([open]) {
43 | padding-bottom: 0;
44 |
45 | // Remove bottom border if block is closed
46 | > summary {
47 | border-bottom: none;
48 | }
49 | }
50 |
51 | // Increase spacing to the right - scoped here for higher specificity
52 | summary {
53 | padding-right: 4rem;
54 | }
55 |
56 | // Manually hide and show, if browser doesn't support details
57 | .no-details &:not([open]) {
58 |
59 | // Hide all nested tags ...
60 | > * {
61 | display: none;
62 | }
63 |
64 | // ... but show title
65 | summary {
66 | display: block;
67 | }
68 | }
69 | }
70 |
71 | // Title
72 | summary {
73 | @extend .admonition-title;
74 |
75 | // Hack: set to block, so Firefox doesn't render marker
76 | display: block;
77 | outline: none;
78 | cursor: pointer;
79 |
80 | // Remove default details marker
81 | &::-webkit-details-marker {
82 | display: none;
83 | }
84 |
85 | // Icon
86 | &::after {
87 | @extend %md-icon;
88 |
89 | position: absolute;
90 | top: 0.8rem;
91 | right: 1.2rem;
92 | color: $md-color-black--lighter;
93 | font-size: 2rem;
94 | content: "\E313"; // keyboard_arrow_down
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/extensions/_permalinks.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Rules
25 | // ----------------------------------------------------------------------------
26 |
27 | // Scoped in typesetted content to match specificity of regular content
28 | .md-typeset {
29 |
30 | // Permalinks extension
31 | .headerlink {
32 | display: inline-block;
33 | margin-left: 1rem;
34 | transform: translate(0, 0.5rem);
35 | transition:
36 | transform 0.25s 0.25s,
37 | color 0.25s,
38 | opacity 0.125s 0.25s;
39 | opacity: 0;
40 |
41 | // Higher specificity for color due to palettes integration
42 | html body & {
43 | color: $md-color-black--lighter;
44 | }
45 |
46 | // Hide for print
47 | @media print {
48 | display: none;
49 | }
50 | }
51 |
52 | // Hide anchor for top-level heading, as it makes no sense
53 | h1[id] .headerlink {
54 | display: none;
55 | }
56 |
57 | // Correct anchor offset for link blurring
58 | @each $level, $delta in (
59 | h2: 0.8rem,
60 | h3: 0.9rem,
61 | h4: 0.9rem,
62 | h5: 1.1rem,
63 | h6: 1.1rem
64 | ) {
65 | #{$level}[id] {
66 |
67 | // Un-targeted anchor
68 | &::before {
69 | display: block;
70 | margin-top: -$delta;
71 | padding-top: $delta;
72 | content: "";
73 | }
74 |
75 | // Targeted anchor (48px from header, 12px from sidebar offset)
76 | &:target::before {
77 | margin-top: -(4.8rem + 1.2rem + $delta);
78 | padding-top: (4.8rem + 1.2rem + $delta);
79 | }
80 |
81 | // Make permalink visible on hover
82 | &:hover .headerlink,
83 | &:target .headerlink,
84 | & .headerlink:focus {
85 | transform: translate(0, 0);
86 | opacity: 1;
87 | }
88 |
89 | // Active or targeted permalink
90 | &:hover .headerlink:hover,
91 | &:target .headerlink,
92 | & .headerlink:focus {
93 | color: $md-color-accent;
94 | }
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/src/assets/stylesheets/extensions/pymdown/_critic.scss:
--------------------------------------------------------------------------------
1 | ////
2 | /// Copyright (c) 2016-2017 Martin Donath
3 | ///
4 | /// Permission is hereby granted, free of charge, to any person obtaining a
5 | /// copy of this software and associated documentation files (the "Software"),
6 | /// to deal in the Software without restriction, including without limitation
7 | /// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 | /// and/or sell copies of the Software, and to permit persons to whom the
9 | /// Software is furnished to do so, subject to the following conditions:
10 | ///
11 | /// The above copyright notice and this permission notice shall be included in
12 | /// all copies or substantial portions of the Software.
13 | ///
14 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | /// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 | /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 | /// DEALINGS
21 | ////
22 |
23 | // ----------------------------------------------------------------------------
24 | // Rules
25 | // ----------------------------------------------------------------------------
26 |
27 | // Scoped in typesetted content to match specificity of regular content
28 | .md-typeset {
29 |
30 | // Deletions, additions and comments
31 | del.critic,
32 | ins.critic,
33 | .critic.comment {
34 | margin: 0 0.25em;
35 | padding: 0.0625em 0;
36 | border-radius: 0.2rem;
37 | box-decoration-break: clone;
38 | }
39 |
40 | // Deletion
41 | del.critic {
42 | background-color: $codehilite-diff-deleted; // TODO: dependent on order of inclusion
43 | box-shadow:
44 | +0.25em 0 0 $codehilite-diff-deleted,
45 | -0.25em 0 0 $codehilite-diff-deleted;
46 | }
47 |
48 | // Addition
49 | ins.critic {
50 | background-color: $codehilite-diff-inserted; // TODO: dependent on order of inclusion
51 | box-shadow:
52 | +0.25em 0 0 $codehilite-diff-inserted,
53 | -0.25em 0 0 $codehilite-diff-inserted;
54 | }
55 |
56 | // Comment
57 | .critic.comment {
58 | background-color: $md-code-background; // TODO: rename, centralize somehow
59 | color: $md-code-color;
60 | box-shadow:
61 | +0.25em 0 0 $md-code-background,
62 | -0.25em 0 0 $md-code-background;
63 |
64 | // Icon
65 | &::before {
66 | @extend %md-icon;
67 |
68 | padding-right: 0.125em;
69 | color: $md-color-black--lighter;
70 | content: "\E0B7"; // chat
71 | vertical-align: -0.125em;
72 | }
73 | }
74 |
75 | // Block
76 | .critic.block {
77 | display: block;
78 | margin: 1em 0;
79 | padding-right: 1.6rem;
80 | padding-left: 1.6rem;
81 | box-shadow: none;
82 |
83 | // Decrease spacing on first element
84 | :first-child {
85 | margin-top: 0.5em;
86 | }
87 |
88 | // Decrease spacing on last element
89 | :last-child {
90 | margin-bottom: 0.5em;
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at https://gitter.im/squidfunk/mkdocs-material. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/src/assets/javascripts/components/Material/Event/Listener.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-2017 Martin Donath
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to
6 | * deal in the Software without restriction, including without limitation the
7 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 | * sell copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in
12 | * all copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 | * IN THE SOFTWARE.
21 | */
22 |
23 | /* ----------------------------------------------------------------------------
24 | * Class
25 | * ------------------------------------------------------------------------- */
26 |
27 | export default class Listener {
28 |
29 | /**
30 | * Generic event listener
31 | *
32 | * @constructor
33 | *
34 | * @property {(Array)} els_ - Event targets
35 | * @property {Object} handler_- Event handlers
36 | * @property {Array} events_ - Event names
37 | * @property {Function} update_ - Update handler
38 | *
39 | * @param {?(string|EventTarget|NodeList)} els -
40 | * Selector or Event targets
41 | * @param {(string|Array)} events - Event names
42 | * @param {(Object|Function)} handler - Handler to be invoked
43 | */
44 | constructor(els, events, handler) {
45 | this.els_ = Array.prototype.slice.call(
46 | (typeof els === "string")
47 | ? document.querySelectorAll(els)
48 | : [].concat(els))
49 |
50 | /* Set handler as function or directly as object */
51 | this.handler_ = typeof handler === "function"
52 | ? { update: handler }
53 | : handler
54 |
55 | /* Initialize event names and update handler */
56 | this.events_ = [].concat(events)
57 | this.update_ = ev => this.handler_.update(ev)
58 | }
59 |
60 | /**
61 | * Register listener for all relevant events
62 | */
63 | listen() {
64 | this.els_.forEach(el => {
65 | this.events_.forEach(event => {
66 | el.addEventListener(event, this.update_, false)
67 | })
68 | })
69 |
70 | /* Execute setup handler, if implemented */
71 | if (typeof this.handler_.setup === "function")
72 | this.handler_.setup()
73 | }
74 |
75 | /**
76 | * Unregister listener for all relevant events
77 | */
78 | unlisten() {
79 | this.els_.forEach(el => {
80 | this.events_.forEach(event => {
81 | el.removeEventListener(event, this.update_)
82 | })
83 | })
84 |
85 | /* Execute reset handler, if implemented */
86 | if (typeof this.handler_.reset === "function")
87 | this.handler_.reset()
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [![Travis][travis-image]][travis-link]
2 | [![Gitter][gitter-image]][gitter-link]
3 | [![Codacy][codacy-image]][codacy-link]
4 | [![Docker][docker-image]][docker-link]
5 | [![PyPI][pypi-image]][pypi-link]
6 |
7 | [travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg?branch=master
8 | [travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
9 | [gitter-image]: https://img.shields.io/gitter/room/squidfunk/mkdocs-material.svg
10 | [gitter-link]: https://gitter.im/squidfunk/mkdocs-material
11 | [codacy-image]: https://api.codacy.com/project/badge/Grade/fe07aa1fa91d453cb69711d3885c5d7e
12 | [codacy-link]: https://www.codacy.com/app/squidfunk/mkdocs-material?utm_source=github.com&utm_medium=referral&utm_content=squidfunk/mkdocs-material&utm_campaign=Badge_Grade
13 | [docker-image]: https://img.shields.io/docker/pulls/squidfunk/mkdocs-material.svg
14 | [docker-link]: https://hub.docker.com/r/squidfunk/mkdocs-material/
15 | [pypi-image]: https://img.shields.io/pypi/v/mkdocs-material.svg
16 | [pypi-link]: https://pypi.python.org/pypi/mkdocs-material
17 |
18 | # Material for MkDocs
19 |
20 | A Material Design theme for [MkDocs][1].
21 |
22 | [][2]
23 |
24 | [1]: http://www.mkdocs.org
25 | [2]: https://squidfunk.github.io/mkdocs-material/
26 |
27 | ## Quick start
28 |
29 | Install the latest version of Material with `pip`:
30 |
31 | ``` sh
32 | pip install mkdocs-material
33 | ```
34 |
35 | Append the following line to your project's `mkdocs.yml`:
36 |
37 | ``` yaml
38 | theme:
39 | name: 'material'
40 | ```
41 |
42 | ## What to expect
43 |
44 | * Responsive design and fluid layout for all kinds of screens and devices,
45 | designed to serve your project documentation in a user-friendly way with
46 | optimal readability.
47 |
48 | * Easily customizable primary and accent color, fonts, favicon and logo;
49 | straight forward localization through theme extension; integrated with Google
50 | Analytics, Disqus and GitHub.
51 |
52 | * Well-designed search interface accessible through hotkeys (F or
53 | S), intelligent grouping of search results, search term
54 | highlighting and lazy loading.
55 |
56 | For detailed installation instructions and a demo, visit
57 | https://squidfunk.github.io/mkdocs-material/
58 |
59 | ## License
60 |
61 | **MIT License**
62 |
63 | Copyright (c) 2016-2017 Martin Donath
64 |
65 | Permission is hereby granted, free of charge, to any person obtaining a copy
66 | of this software and associated documentation files (the "Software"), to
67 | deal in the Software without restriction, including without limitation the
68 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
69 | sell copies of the Software, and to permit persons to whom the Software is
70 | furnished to do so, subject to the following conditions:
71 |
72 | The above copyright notice and this permission notice shall be included in
73 | all copies or substantial portions of the Software.
74 |
75 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77 | FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
78 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
80 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
81 | IN THE SOFTWARE.
82 |
--------------------------------------------------------------------------------