├── Gemfile
├── .gitignore
├── _layouts
├── page.html
└── default.html
├── _includes
├── search-results.html
├── styles.html
├── search.html
├── scripts.html
├── sidebar.html
├── navigation.html
└── head.html
├── .github
└── FUNDING.yml
├── 404.html
├── makefile
├── assets
├── images
│ ├── menu.svg
│ └── close.svg
├── js
│ ├── mobile-navigation.js
│ ├── database.js
│ ├── search.js
│ ├── prism.min.js
│ ├── lunar.min.js
│ └── zepto.min.js
└── css
│ └── docs.scss
├── _sass
├── variables.scss
├── prism.scss
└── milligram.scss
├── _config.yml
├── navigation.md
├── millidocs.gemspec
├── github-pages.md
├── LICENSE.md
├── index.md
└── README.md
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 | gemspec
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.gem
2 | .bundle
3 | .sass-cache
4 | _site
5 | Gemfile.lock
6 |
--------------------------------------------------------------------------------
/_layouts/page.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 | {{ content }}
6 |
--------------------------------------------------------------------------------
/_includes/search-results.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/_includes/styles.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: alexanderheimbuch
2 | custom: https://www.amazon.de/hz/wishlist/ls/237T6KS5438PE
3 |
--------------------------------------------------------------------------------
/_includes/search.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/404.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 | 404
6 |
7 | Page not found :(
8 | The requested page could not be found.
9 |
--------------------------------------------------------------------------------
/makefile:
--------------------------------------------------------------------------------
1 | install:
2 | bundle install
3 |
4 | dev:
5 | bundle exec jekyll serve
6 |
7 | publish:
8 | gem push $(shell gem build millidocs.gemspec | grep 'millidocs-' | sed 's/File: / /g')
9 |
--------------------------------------------------------------------------------
/assets/images/menu.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/images/close.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/_layouts/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% include head.html %}
4 |
5 |
6 | {% include sidebar.html %}
7 |
8 |
9 | {{ content }}
10 |
11 |
12 |
13 | {% include scripts.html %}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/_sass/variables.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * VARIABLES
3 | */
4 |
5 | $base-height: 1em;
6 | $content-width: 800px;
7 | $sidebar-width: 300px;
8 | $mobile-width: 745px;
9 | $min-width: 360px;
10 | $header-height: 50px;
11 |
12 | $link-color: #008cff;
13 |
14 | $sidebar-border: 1px solid rgba(0,0,0,0.07);
15 | $sidebar-color: #364149;
16 |
17 | $navigation-background: #fafafa;
18 | $navigation-link-color: #008cff;
19 |
20 | $content-color: #333;
21 |
22 |
--------------------------------------------------------------------------------
/assets/js/mobile-navigation.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | (function ($) {
3 | var menuIcon = $('#menu')
4 | var closeIcon = $('#close')
5 | var sidebar = $('#sidebar')
6 |
7 | menuIcon.on('click', function () {
8 | sidebar.addClass('opened')
9 | menuIcon.hide()
10 | closeIcon.show()
11 | })
12 |
13 | closeIcon.on('click', function () {
14 | sidebar.removeClass('opened')
15 | menuIcon.show()
16 | closeIcon.hide()
17 | })
18 | })(Zepto)
19 |
--------------------------------------------------------------------------------
/_includes/scripts.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/_includes/sidebar.html:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | title: Millidocs Theme
2 | description: Documentation for small projects
3 | url: "https://github.com/alexander-heimbuch/millidocs" # the base hostname & protocol for your site, e.g. http://example.com
4 |
5 | # Build settings
6 | markdown: kramdown
7 | kramdown:
8 | syntax_highlighter_opts:
9 | disable : true
10 |
11 | exclude:
12 | - Gemfile
13 | - Gemfile.lock
14 | - README.md
15 |
16 | sass:
17 | sass_dir: _sass
18 | style: compressed
19 |
--------------------------------------------------------------------------------
/_includes/navigation.html:
--------------------------------------------------------------------------------
1 | {% capture html %}
2 |
3 | {% assign entries = site.pages | sort: "navigation" %}
4 | {% for entry in entries %}
5 | {% if entry.navigation %}
6 | -
7 |
8 | {{ entry.title }}
9 |
10 |
11 | {% endif %}
12 | {% endfor %}
13 |
14 | {% endcapture %}{{ html | strip_newlines | replace:' ','' | replace:' ','' | replace:' ',' ' }}
15 |
--------------------------------------------------------------------------------
/assets/js/database.js:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
4 | window.database = {
5 | {% for page in site.pages %}
6 | {% if page.layout != 'page' %}
7 | {% continue %}
8 | {% endif %}
9 | "{{ page.url | slugify }}": {
10 | "title": "{{ page.title | xml_escape }}",
11 | "category": "{{ page.category | xml_escape }}",
12 | "content": {{ page.content | strip_html | strip_newlines | jsonify }},
13 | "url": "{{ page.url | xml_escape }}",
14 | "href": "{{ site.baseurl }}{{ page.url | xml_escape }}"
15 | }
16 | {% unless forloop.last %},{% endunless %}
17 | {% endfor %}
18 | };
19 |
--------------------------------------------------------------------------------
/_includes/head.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}
7 |
8 |
9 |
10 |
11 |
12 | {% include styles.html %}
13 |
14 |
--------------------------------------------------------------------------------
/navigation.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Navigation
4 | navigation: 2
5 | ---
6 |
7 | # Navigation
8 |
9 | The navigation supports especially only one level. If you need deep nested structures you propably should use a larger documentation system like [GitBook](https://www.gitbook.com/).
10 |
11 | ## Adding a Page to Navigation
12 |
13 | Not every page by default is part of the navigation. If you want to add a page to the navigation you have to add the `navigation` attribute with a desired `index`:
14 |
15 | ```
16 | ---
17 | layout: page
18 | title: Navigation
19 | navigation: 2
20 | ---
21 | ```
22 |
23 | The navigation `index` is starting with 1 representing the first item.
24 |
--------------------------------------------------------------------------------
/millidocs.gemspec:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 |
3 | Gem::Specification.new do |spec|
4 | spec.name = "millidocs"
5 | spec.version = "0.2.5"
6 | spec.authors = ["Alexander Heimbuch"]
7 | spec.email = ["github@heimbu.ch"]
8 |
9 | spec.summary = %q{Minimal Jekyll documentation theme based on Milligram and Prism}
10 | spec.homepage = "https://github.com/alexander-heimbuch/millidocs"
11 | spec.license = "MIT"
12 |
13 | spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|_layouts|_includes|_sass|LICENSE|README)}i) }
14 |
15 | spec.add_runtime_dependency "jekyll"
16 |
17 | spec.add_development_dependency "rake"
18 | end
19 |
--------------------------------------------------------------------------------
/github-pages.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Github Pages
4 | navigation: 3
5 | ---
6 |
7 | # Github Pages
8 |
9 | You can use the millidocs theme with github pages by adding it as a `remote_theme`.
10 |
11 | ```
12 | ---
13 | title: Millidocs Theme
14 | description: Documentation for small projects
15 | url: "https://my-url"
16 |
17 | remote_theme: alexander-heimbuch/millidocs
18 |
19 | markdown: kramdown
20 | kramdown:
21 | syntax_highlighter_opts:
22 | disable : true
23 |
24 | exclude:
25 | - Gemfile
26 | - Gemfile.lock
27 | - README.md
28 |
29 | ---
30 | ```
31 |
32 | For more details visit the [Github Blog Post](https://blog.github.com/2017-11-29-use-any-theme-with-github-pages/).
33 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2017 Alexander Heimbuch
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
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 NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Overview
4 | navigation: 1
5 | ---
6 |
7 | # Millidocs Theme
8 |
9 | Simple documentation theme for Jekyll featuring [Milligram CSS framework](http://milligram.io/), [PrismJS syntax highlighter](http://prismjs.com/) and [LunrJS search](https://lunrjs.com/).
10 |
11 | One of the core features is a full text client side search and full responsiveness. It has zero dependencies with other gems and should be easily build with Github.
12 |
13 | ## Installation
14 |
15 | Add this line to your Jekyll site's `Gemfile`:
16 |
17 | ```ruby
18 | gem "millidocs"
19 | ```
20 |
21 | Adapt your Jekyll site config `_config.yml`:
22 |
23 | ```yaml
24 | title: My Docs Page Title
25 | description: MY description
26 | url: "https://base/url/site"
27 | theme: millidocs
28 |
29 | markdown: kramdown
30 | kramdown:
31 | syntax_highlighter_opts:
32 | disable : true
33 |
34 | exclude:
35 | - Gemfile
36 | - Gemfile.lock
37 | - README.md
38 | ```
39 |
40 | And then execute:
41 |
42 | $ bundle
43 |
44 | Or install it yourself as:
45 |
46 | $ gem install millidocs
47 |
48 | ## Available Layouts
49 |
50 | This theme is made for _pages_ only and doesn't support _posts_ by default. So the only available layouts are `default` and `page`.
51 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Millidocs Theme
2 |
3 | Simple documentation theme for Jekyll featuring [Milligram CSS framework](http://milligram.io/), [PrismJS syntax highlighter](http://prismjs.com/) and [LunrJS search](https://lunrjs.com/).
4 |
5 | One of the core features is a full text client side search and full responsiveness. It has zero dependencies with other gems and should be easily build with Github.
6 |
7 | ## Installation
8 |
9 | Add this line to your Jekyll site's `Gemfile`:
10 |
11 | ```ruby
12 | gem "millidocs"
13 | ```
14 |
15 | Adapt your Jekyll site config `_config.yml`:
16 |
17 | ```yaml
18 | title: My Docs Page Title
19 | description: MY description
20 | url: "https://base/url/site"
21 | theme: millidocs
22 |
23 | markdown: kramdown
24 | kramdown:
25 | syntax_highlighter_opts:
26 | disable : true
27 |
28 | exclude:
29 | - Gemfile
30 | - Gemfile.lock
31 | - README.md
32 | ```
33 |
34 | And then execute:
35 |
36 | $ bundle
37 |
38 | Or install it yourself as:
39 |
40 | $ gem install millidocs
41 |
42 |
43 | ## Usage
44 |
45 | ### Github Pages
46 |
47 | You can use this theme by simply adding `remote_theme: alexander-heimbuch/millidocs` to your `_config.yml` (Thanks to @kogli for the hint).
48 |
49 | ### Available Themes
50 |
51 | This theme is made for _pages_ only and doesn't support _posts_ by default. So the only available layouts are `default` and `page`.
52 |
53 | ### Navigation
54 |
55 | The navigation supports especially only one level. If you need deep nested structures you propably should use a larger documentation system like [GitBook](https://www.gitbook.com/).
56 |
57 | Not every page by default is part of the navigation. If you want to add a page to the navigation you have to add the `navigation` attribute with a desired `index`:
58 |
59 | ```
60 | ---
61 | layout: page
62 | title: Navigation
63 | navigation: 2
64 | ---
65 | ```
66 |
67 | The navigation `index` is starting with 1 representing the first item.
68 |
69 |
70 | ## Development
71 |
72 | To set up your environment to develop this theme, run `bundle install`.
73 |
74 | Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
75 |
76 | When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
77 |
78 | ## License
79 |
80 | The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
81 |
82 |
--------------------------------------------------------------------------------
/_sass/prism.scss:
--------------------------------------------------------------------------------
1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
2 | /**
3 | * prism.js default theme for JavaScript, CSS and HTML
4 | * Based on dabblet (http://dabblet.com)
5 | * @author Lea Verou
6 | */
7 |
8 | code[class*="language-"],
9 | pre[class*="language-"] {
10 | color: black;
11 | background: none;
12 | text-shadow: 0 1px white;
13 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
14 | text-align: left;
15 | white-space: pre;
16 | word-spacing: normal;
17 | word-break: normal;
18 | word-wrap: normal;
19 | line-height: 1.5;
20 |
21 | -moz-tab-size: 4;
22 | -o-tab-size: 4;
23 | tab-size: 4;
24 |
25 | -webkit-hyphens: none;
26 | -moz-hyphens: none;
27 | -ms-hyphens: none;
28 | hyphens: none;
29 | }
30 |
31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
33 | text-shadow: none;
34 | background: #b3d4fc;
35 | }
36 |
37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
38 | code[class*="language-"]::selection, code[class*="language-"] ::selection {
39 | text-shadow: none;
40 | background: #b3d4fc;
41 | }
42 |
43 | @media print {
44 | code[class*="language-"],
45 | pre[class*="language-"] {
46 | text-shadow: none;
47 | }
48 | }
49 |
50 | /* Code blocks */
51 | pre[class*="language-"] {
52 | padding: 1em;
53 | margin: .5em 0;
54 | overflow: auto;
55 | }
56 |
57 | :not(pre) > code[class*="language-"],
58 | pre[class*="language-"] {
59 | background: #f5f2f0;
60 | }
61 |
62 | /* Inline code */
63 | :not(pre) > code[class*="language-"] {
64 | padding: .1em;
65 | border-radius: .3em;
66 | white-space: normal;
67 | }
68 |
69 | .token.comment,
70 | .token.prolog,
71 | .token.doctype,
72 | .token.cdata {
73 | color: slategray;
74 | }
75 |
76 | .token.punctuation {
77 | color: #999;
78 | }
79 |
80 | .namespace {
81 | opacity: .7;
82 | }
83 |
84 | .token.property,
85 | .token.tag,
86 | .token.boolean,
87 | .token.number,
88 | .token.constant,
89 | .token.symbol,
90 | .token.deleted {
91 | color: #905;
92 | }
93 |
94 | .token.selector,
95 | .token.attr-name,
96 | .token.string,
97 | .token.char,
98 | .token.builtin,
99 | .token.inserted {
100 | color: #690;
101 | }
102 |
103 | .token.operator,
104 | .token.entity,
105 | .token.url,
106 | .language-css .token.string,
107 | .style .token.string {
108 | color: #a67f59;
109 | background: hsla(0, 0%, 100%, .5);
110 | }
111 |
112 | .token.atrule,
113 | .token.attr-value,
114 | .token.keyword {
115 | color: #07a;
116 | }
117 |
118 | .token.function {
119 | color: #DD4A68;
120 | }
121 |
122 | .token.regex,
123 | .token.important,
124 | .token.variable {
125 | color: #e90;
126 | }
127 |
128 | .token.important,
129 | .token.bold {
130 | font-weight: bold;
131 | }
132 | .token.italic {
133 | font-style: italic;
134 | }
135 |
136 | .token.entity {
137 | cursor: help;
138 | }
139 |
140 |
--------------------------------------------------------------------------------
/assets/js/search.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | (function ($, lunr, database) {
4 | var resultsContainer = $('#search-results')
5 | var navigationContainer = $('#navigation')
6 | var nothingFound = $('Nothing found.')
7 | var searchQuery = $('#search-input')
8 | database = database || {}
9 |
10 | function createSearchStore(data) {
11 | var searchStore = lunr(function () {
12 | var self = this
13 |
14 | self.field('id');
15 | self.field('title', { boost: 10 });
16 | self.field('category');
17 | self.field('content');
18 |
19 | Object.keys(data).forEach(function (key) {
20 | self.add({
21 | id: key,
22 | title: data[key].title,
23 | category: data[key].category,
24 | content: data[key].content
25 | });
26 | })
27 |
28 | });
29 |
30 | return searchStore
31 | }
32 |
33 | function resultEntry(result) {
34 | var searchEntry = $('')
35 | var searchLink = $('')
36 |
37 | var categoryPath = result.url.split('/')
38 | categoryPath.shift()
39 | categoryPath.pop()
40 |
41 | searchEntry
42 | .append(searchLink)
43 |
44 | searchLink.attr('href', result.href)
45 |
46 | searchLink.text(result.title)
47 |
48 | return searchEntry
49 | }
50 |
51 | function displayResults(results) {
52 | resultsContainer.empty()
53 |
54 | if (results.length > 0) {
55 | results.map(function(entry) {
56 | resultsContainer.append(resultEntry(entry))
57 | })
58 | } else {
59 | resultsContainer.append(nothingFound)
60 | }
61 |
62 | navigationContainer.hide()
63 | resultsContainer.show()
64 | }
65 |
66 | function hideResults() {
67 | resultsContainer.hide()
68 | navigationContainer.show()
69 | }
70 |
71 | function searchStore(store, data) {
72 | return function (term) {
73 | var results = store.search(term)
74 |
75 | return results.map(function (result) {
76 | return data[result.ref]
77 | })
78 | }
79 | }
80 |
81 | function queryChange(display, hide, search) {
82 | return function (event) {
83 | var value = event.srcElement.value
84 |
85 | if (value.length === 0) {
86 | hide()
87 | }
88 |
89 | if (value.length > 2) {
90 | display(search(value))
91 | }
92 | }
93 | }
94 |
95 | function keyboardControls(hide) {
96 | return function (event) {
97 | switch (event.keyCode) {
98 | case 27:
99 | hide()
100 | break
101 | }
102 | }
103 | }
104 |
105 | function getQueryVariable(variable) {
106 | var query = window.location.search.substring(1);
107 | var vars = query.split('&')
108 |
109 | for (var i = 0; i < vars.length; i++) {
110 | var pair = vars[i].split('=')
111 |
112 | if (pair[0] === variable) {
113 | return decodeURIComponent(pair[1].replace(/\+/g, '%20'))
114 | }
115 | }
116 | }
117 |
118 | var search = searchStore(createSearchStore(database), database)
119 | var searchTerm = getQueryVariable('query')
120 |
121 | if (searchTerm) {
122 | displayResults(search(searchTerm))
123 | searchQuery.attr('value', searchTerm)
124 | }
125 |
126 | searchQuery.on('input', queryChange(displayResults, hideResults, search))
127 | $(document).on('keyup', keyboardControls(hideResults))
128 |
129 | })(Zepto, lunr, window.database)
130 |
--------------------------------------------------------------------------------
/assets/css/docs.scss:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
4 | @import "variables";
5 |
6 | @import "milligram";
7 | @import "prism";
8 |
9 | html,
10 | body {
11 | margin: 0;
12 | height: 100%;
13 | max-height: 100%;
14 | overflow: hidden;
15 | min-width: $min-width;
16 | }
17 |
18 | * {
19 | box-sizing: border-box;
20 | }
21 |
22 | pre {
23 | margin-bottom: ($base-height * 2) !important;
24 | }
25 |
26 | a {
27 | text-decoration: none;
28 | color: inherit;
29 |
30 | &:hover {
31 | color: $link-color;
32 | text-decoration: none;
33 | }
34 | }
35 |
36 | .wrapper {
37 | height: 100%;
38 | width: 100%;
39 | max-height: 100%;
40 | min-height: 100%;
41 | display: flex;
42 | overflow: hidden;
43 | }
44 |
45 | // Sidebar
46 | .sidebar {
47 | display: block;
48 | width: 20%;
49 | max-width: $sidebar-width;
50 | padding: 0;
51 | border-right: $sidebar-border;
52 | height: 100%;
53 | overflow: hidden;
54 | color: $sidebar-color;
55 |
56 | .sidebar-main {
57 | height: 100%;
58 | background: $navigation-background;
59 | padding: $base-height;
60 | }
61 |
62 | .sidebar-mobile {
63 | display: none;
64 | height: $header-height;
65 | padding: $base-height;
66 | text-align: right;
67 |
68 | .close-icon,
69 | .menu-icon {
70 | width: 18px;
71 | cursor: pointer;
72 | height: auto;
73 | display: none;
74 | }
75 | }
76 | }
77 |
78 | .search {
79 | height: $header-height;
80 | border-bottom: $sidebar-border;
81 | padding: 0 $base-height;
82 |
83 | .search-input {
84 | border: none;
85 | font-size: 0.9em;
86 | font-weight: 300;
87 | width: 100%;
88 | height: 100%;
89 | }
90 | }
91 |
92 | .navigation {
93 | display: block;
94 | width: 100%;
95 | margin: 0;
96 | padding: 0;
97 | list-style: none;
98 |
99 | li {
100 | margin: 0;
101 | padding: 10px 15px;
102 | }
103 |
104 | a {
105 | display: block;
106 | white-space: nowrap;
107 | overflow: hidden;
108 | text-overflow: ellipsis;
109 |
110 | &.active {
111 | color: $navigation-link-color;
112 | }
113 | }
114 | }
115 |
116 | // Content
117 | .content {
118 | display: flex;
119 | justify-content: center;
120 | min-height: 100%;
121 | height: 100%;
122 | width: 100%;
123 | overflow-y: auto;
124 | color: $content-color;
125 | line-height: 1.7;
126 | word-wrap: break-word;
127 | }
128 |
129 | .inner {
130 | width: 100%;
131 | max-width: $content-width;
132 | padding: $base-height ($base-height * 2) ($base-height * 3) $base-height;
133 |
134 | &::after {
135 | content: "";
136 | display: block;
137 | height: $base-height * 2;
138 | }
139 | }
140 |
141 | .section {
142 | margin-bottom: $base-height;
143 | }
144 |
145 | /**
146 | * Mobile
147 | */
148 | @media (max-width: $mobile-width) {
149 | .wrapper {
150 | flex-direction: column;
151 | }
152 |
153 | .sidebar {
154 | width: 100%;
155 | max-width: 100%;
156 | border-right: none;
157 | height: $header-height;
158 |
159 | .sidebar-mobile {
160 | display: block;
161 |
162 | .menu-icon {
163 | display: inline;
164 | }
165 | }
166 |
167 | &.opened {
168 | overflow: visible;
169 | height: auto;
170 | border-bottom: $sidebar-border;
171 |
172 | .sidebar-mobile {
173 | background: $navigation-background;
174 | }
175 | }
176 | }
177 |
178 | .content {
179 | width: 100%;
180 | margin-top: 0;
181 | height: calc(100% - #{$header-height});
182 | min-height: calc(100% - #{$header-height});
183 | }
184 |
185 | .inner {
186 | padding: $base-height;
187 | }
188 | }
189 |
--------------------------------------------------------------------------------
/assets/js/prism.min.js:
--------------------------------------------------------------------------------
1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
2 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){h.lastIndex=0;var _=h.exec(w),P=1;if(!_&&m&&b!=t.length-1){if(h.lastIndex=k,_=h.exec(e),!_)break;for(var A=_.index+(d?_[1].length:0),j=_.index+_[0].length,x=b,O=k,S=t.length;S>x&&(j>O||!t[x].type&&!t[x-1].greedy);++x)O+=t[x].length,A>=O&&(++b,k=O);if(t[b]instanceof s||t[x-1].greedy)continue;P=x-b,w=e.slice(k,O),_.index-=k}if(_){d&&(p=_[1].length);var A=_.index+p,_=_[0].slice(p),j=A+_.length,N=w.slice(0,A),C=w.slice(j),E=[b,P];N&&(++b,k+=N.length,E.push(N));var L=new s(u,f?n.tokenize(_,f):_,y,_,m);if(E.push(L),C&&E.push(C),Array.prototype.splice.apply(t,E),1!=P&&n.matchGrammar(e,t,a,b,k,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var i in r)t[i]=r[i];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var i={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var l="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}n.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""+i.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,i=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),i&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,!document.addEventListener||n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
3 | Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\s\S]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;
4 | Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(