programming-pages 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/CODE_OF_CONDUCT.md +46 -0
  3. data/CONTRIBUTING.md +15 -0
  4. data/LICENSE +21 -0
  5. data/README.md +157 -0
  6. data/_config.yml +40 -0
  7. data/_data/icons/theme.yml +73 -0
  8. data/_includes/elements/attribution.html +28 -0
  9. data/_includes/elements/help.html +24 -0
  10. data/_includes/elements/indices.html +225 -0
  11. data/_includes/elements/search.html +7 -0
  12. data/_includes/elements/title.html +8 -0
  13. data/_includes/icon.liquid +22 -0
  14. data/_includes/ordered_child_list.liquid +48 -0
  15. data/_includes/package_shortener.liquid +29 -0
  16. data/_includes/scripts/example.js +7 -0
  17. data/_includes/scripts/help.js +10 -0
  18. data/_includes/scripts/indices.js +17 -0
  19. data/_includes/scripts/jquery/jquery-3.3.1.custom.min.js +2 -0
  20. data/_includes/scripts/jquery-address/jquery-address-1.6.semantic-ui.min.js +3 -0
  21. data/_includes/scripts/loadcss/loadcss-2.0.1.min.js +2 -0
  22. data/_includes/scripts/mousetrap/mousetrap-1.6.1.min.js +11 -0
  23. data/_includes/scripts/page.js +37 -0
  24. data/_includes/scripts/search.js +30 -0
  25. data/_includes/scripts/semantic-ui/_version.js +5 -0
  26. data/_includes/scripts/semantic-ui/dimmer.min.js +1 -0
  27. data/_includes/scripts/semantic-ui/modal.min.js +1 -0
  28. data/_includes/scripts/semantic-ui/search.min.js +1 -0
  29. data/_includes/scripts/semantic-ui/sidebar.min.js +1 -0
  30. data/_includes/scripts/semantic-ui/site.min.js +1 -0
  31. data/_includes/scripts/semantic-ui/state.min.js +1 -0
  32. data/_includes/scripts/semantic-ui/sticky.min.js +1 -0
  33. data/_includes/scripts/semantic-ui/tab.min.js +1 -0
  34. data/_includes/scripts/semantic-ui/transition.min.js +1 -0
  35. data/_includes/styles/semantic-ui/_version.css +5 -0
  36. data/_includes/styles/semantic-ui/breadcrumb.min.css +1 -0
  37. data/_includes/styles/semantic-ui/container.min.css +1 -0
  38. data/_includes/styles/semantic-ui/dimmer.min.css +1 -0
  39. data/_includes/styles/semantic-ui/divider.min.css +1 -0
  40. data/_includes/styles/semantic-ui/grid.min.css +1 -0
  41. data/_includes/styles/semantic-ui/header.min.css +1 -0
  42. data/_includes/styles/semantic-ui/image.min.css +1 -0
  43. data/_includes/styles/semantic-ui/input.min.css +1 -0
  44. data/_includes/styles/semantic-ui/item.min.css +1 -0
  45. data/_includes/styles/semantic-ui/label.min.css +1 -0
  46. data/_includes/styles/semantic-ui/list.min.css +1 -0
  47. data/_includes/styles/semantic-ui/menu.min.css +1 -0
  48. data/_includes/styles/semantic-ui/message.min.css +1 -0
  49. data/_includes/styles/semantic-ui/modal.min.css +1 -0
  50. data/_includes/styles/semantic-ui/rail.min.css +1 -0
  51. data/_includes/styles/semantic-ui/reset.min.css +1 -0
  52. data/_includes/styles/semantic-ui/search.min.css +1 -0
  53. data/_includes/styles/semantic-ui/segment.min.css +1 -0
  54. data/_includes/styles/semantic-ui/sidebar.min.css +1 -0
  55. data/_includes/styles/semantic-ui/site.min.css +1 -0
  56. data/_includes/styles/semantic-ui/sticky.min.css +1 -0
  57. data/_includes/styles/semantic-ui/tab.min.css +1 -0
  58. data/_includes/styles/semantic-ui/table.min.css +1 -0
  59. data/_includes/styles/semantic-ui/transition.min.css +1 -0
  60. data/_includes/styles/svg-icons.css +520 -0
  61. data/_includes/styles/tweaks.css +195 -0
  62. data/_includes/themes/syntax.css +84 -0
  63. data/_layouts/base.html +26 -0
  64. data/_layouts/compress.html +51 -0
  65. data/_layouts/example.html +43 -0
  66. data/_layouts/guide-index.html +14 -0
  67. data/_layouts/layout.html +70 -0
  68. data/_layouts/page.html +56 -0
  69. data/assets/site.css +36 -0
  70. data/assets/site.js +20 -0
  71. data/favicon.png +0 -0
  72. data/index.md +16 -0
  73. data/screenshot.png +0 -0
  74. metadata +161 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 53ea0240bc5e5b3a1caa23ed74819a1a8b37e4639998dfbd221069ef354a9bb9
4
+ data.tar.gz: b8360256c3ea74187010e43a7c67aba03a1c1c4843c5436e319d239c2a6920b0
5
+ SHA512:
6
+ metadata.gz: ff88662942961e008018692c2e26ac18a9f7502f6d311ccca3ecbf1e3bdfca5cea3f6fb22481f0b6cecd04edefba59dff34c6b1c383b2955cff87d91cc913302
7
+ data.tar.gz: 5d73587a5ce8c7edd1809c18bfdbe615a181a6eadaa9a4804575b26d2f6af66684e99c713aec96452a77dc54ddec133e581ea6ac273adfd872f2464bd8a6e87a
@@ -0,0 +1,46 @@
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 pixeldroid.com@gmail.com. The project team will review and investigate 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/
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,15 @@
1
+ # Contributing to programming-pages
2
+
3
+ ## How to Help
4
+
5
+ Contributions are welcome in the form of useful [pull requests](https://help.github.com/articles/creating-a-pull-request/) that do one of the following:
6
+
7
+ 1. Correct a typo or provide clearer wording
8
+ 1. Add missing information that will make things easier to understand
9
+ 1. Identify a bug and the steps to reproduce it
10
+ 1. Produce a bug fix or performance improvement
11
+ 1. Implement a useful new feature
12
+
13
+ ## Code of Conduct
14
+
15
+ This project and its participants are governed by the project's [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 pixeldroid
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,157 @@
1
+ # programming-pages
2
+
3
+ a Jekyll theme for publishing code documentation to GitHub pages
4
+
5
+ > See **programming pages** used to document itself here: https://pixeldroid.github.io/programming-pages/
6
+
7
+ [![screenshot][screenshot]][programming-pages-docs]
8
+
9
+ <br/>
10
+
11
+
12
+ [installation](#installation) | [usage](#usage) | [building](#building) | [contributing](#contributing)
13
+
14
+
15
+ ## installation
16
+
17
+ ### as a remote theme
18
+
19
+ Specify `pixeldroid/programming-pages` as your remote theme in `_config.yml`:
20
+
21
+ ```yml
22
+ plugins:
23
+ - jekyll-remote-theme
24
+
25
+ remote_theme: pixeldroid/programming-pages
26
+ ```
27
+
28
+ ### as a gem
29
+
30
+ Follow the Jekyll directions for [installing a gem-based theme][jekyll-theme]
31
+
32
+ `Gemfile`:
33
+
34
+ ```ruby
35
+ gem 'programming-pages'
36
+ ```
37
+
38
+ `_config.yml`:
39
+
40
+ ```yml
41
+ theme: programming-pages
42
+ ```
43
+
44
+ ### as a local copy of the files
45
+
46
+ 1. Download the latest [release][releases]
47
+ 1. Extract it into your project under a folder of your choice (e.g. `docs/`)
48
+
49
+
50
+ ## usage
51
+
52
+ > first: <br>
53
+ > 1. [Configure a publishing source for GitHub Pages][ghpages-howto] so GitHub knows where to find your documentation.
54
+
55
+ 1. [Author documentation][author-documentation]
56
+ 1. [Push to GitHub][push-to-github]
57
+ 1. Visit your documentation site at https://&lt;`username`&gt;.github.io/&lt;`project`&gt;
58
+ 1. _repeat_
59
+
60
+
61
+ ## building
62
+
63
+ **programming pages** depends on [Jekyll][jekyll], [Semantic UI][semantic], and [jQuery][jquery].
64
+ The dependencies are all captured and coordinated in the source of this project,
65
+ but if you want to update a dependency or change its configuration,
66
+ you'll need to be able to build them from source.
67
+
68
+ ### building the static site locally
69
+
70
+ > first: <br>
71
+ > 1. [install jekyll][jekyll-install] and the [github-pages gem][ghpages-install]: `bundle install`
72
+
73
+ ```console
74
+ rake docs
75
+ open http://localhost:4000/
76
+ ```
77
+
78
+ ### generating the semantic ui files
79
+
80
+ > first: <br>
81
+ > 1. ensure you can [build semantic ui][semantic-build] (requires nodejs, npm, gulp): `gulp build`
82
+ > 1. check out the [programming-pages branch of the pixeldroid fork][semantic-custom] of semantic ui
83
+
84
+ ```console
85
+ rake semantic['/path/to/programming-pages-semantic']
86
+ ```
87
+
88
+ #### semantic ui modules
89
+
90
+ The Semantic UI modules required by this project are declared in `build/semantic/semantic.json`.
91
+
92
+ ### generating the jQuery file
93
+
94
+ > first <br>
95
+ > 1. ensure you can [build jQuery][jquery-build] (requires nodejs, grunt): `grunt default`
96
+
97
+ ```console
98
+ grunt custom:-ajax,-wrap remove_map_comment
99
+ cp /path/to/jquery/dist/jquery.min.js /path/to/programming-pages/_includes/scripts/jquery/jquery-<version>.custom.min.js
100
+ ```
101
+
102
+ Don't forget to update `assets/site.js` with the new filename.
103
+
104
+ #### jQuery modules
105
+
106
+ > Smaller custom subsets of the jQuery library can be built by excluding unwanted modules.
107
+ > (see https://github.com/jquery/jquery#modules)
108
+
109
+ This project excludes the following unused modules to reduce file size:
110
+
111
+ ##### excluded
112
+ - `ajax`
113
+ - `wrap`
114
+
115
+ ##### required
116
+ - `attr`
117
+ - `classes`
118
+ - `core`
119
+ - `css`
120
+ - `data`
121
+ - `deferred` (required for `effects`)
122
+ - `deprecated` (for jQuery Address's use of `bind`)
123
+ - `dimensions`
124
+ - `effects`
125
+ - `events`
126
+ - `filtering`
127
+ - `init`
128
+ - `manipulation`
129
+ - `offsets`
130
+ - `parseHTML`
131
+ - `prop`
132
+ - `ready`
133
+ - `traversing`
134
+ - `val`
135
+
136
+ ## contributing
137
+
138
+ [Pull requests][pull-requests] for improved documentation, bug fixes and useful features are all welcome. :gift_heart:
139
+
140
+
141
+
142
+ [author-documentation]: https://pixeldroid.github.io/programming-pages/guides/Authoring-Documentation/#/guides/ "Authoring documentation using the programming pages site template"
143
+ [ghpages-howto]: https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/ "How to Configure a publishing source for GitHub Pages"
144
+ [ghpages-install]: https://github.com/github/pages-gem "GitHub Pages Ruby Gem"
145
+ [jekyll]: https://jekyllrb.com/ "Simple, blog-aware, static sites"
146
+ [jekyll-install]: https://jekyllrb.com/docs/installation/ "How to install Jekyll"
147
+ [jekyll-theme]: https://jekyllrb.com/docs/themes/#installing-a-theme "Installing a gem-based theme"
148
+ [jquery]: https://github.com/jquery/jquery#how-to-build-your-own-jquery "jQuery is a fast, small, and feature-rich JavaScript library"
149
+ [jquery-build]: https://github.com/jquery/jquery#how-to-build-your-own-jquery "How to build your own jQuery"
150
+ [programming-pages-docs]: https://pixeldroid.github.io/programming-pages/ "a Jekyll theme for publishing code documentation to GitHub pages"
151
+ [pull-requests]: https://github.com/pixeldroid/programming-pages/pulls "Pull requests for the Programming Pages template project"
152
+ [push-to-github]: https://help.github.com/articles/pushing-to-a-remote/ "Pushing to a remote"
153
+ [releases]: https://github.com/pixeldroid/programming-pages/releases "Packaged releases of the Programming Pages template"
154
+ [screenshot]: screenshot.png "screenshot of a programming pages generated site"
155
+ [semantic]: https://semantic-ui.com/ "Semantic is a UI component framework based around useful principles from natural language"
156
+ [semantic-build]: https://semantic-ui.com/introduction/build-tools.html "Semantic UI build tools"
157
+ [semantic-custom]: https://github.com/pixeldroid/Semantic-UI/tree/programming-pages "programming-pages branch of Semantic UI"
data/_config.yml ADDED
@@ -0,0 +1,40 @@
1
+ ---
2
+ # default site settings
3
+ # configure these values for your project
4
+ project:
5
+ name: "{project_name}"
6
+ owner: "{project_owner}"
7
+ repo: "{project_repo}"
8
+ version: "{project_version}"
9
+
10
+ collections:
11
+ api:
12
+ output: true
13
+ permalink: "/:collection/:path/"
14
+ title: API
15
+ tab-order: 1
16
+ examples:
17
+ output: true
18
+ permalink: "/:collection/:path/"
19
+ title: Examples
20
+ tab-order: 2
21
+ guides:
22
+ output: true
23
+ permalink: "/:collection/:path/"
24
+ title: Guides
25
+ tab-order: 3
26
+
27
+ module_root: "/api"
28
+ example_root: "/examples"
29
+ guide_root: "/guides"
30
+
31
+ code_indent: " "
32
+ highlighter: rouge
33
+ permalink: pretty
34
+ sass:
35
+ style: compressed
36
+
37
+ plugins:
38
+ - jemoji
39
+ - jekyll-remote-theme
40
+ remote_theme: pixeldroid/programming-pages
@@ -0,0 +1,73 @@
1
+ ##
2
+ ## SVG icon data file for the programming pages theme
3
+ ##
4
+ ## each icon has the following properties:
5
+ ## - viewbox
6
+ ## - path
7
+ ##
8
+ ## to embed via the icon macro: {% include icon.liquid id='<id>' %}
9
+ ## to retrieve this data directly via liquid: {% site.data.icons.theme[<id>] %}
10
+
11
+
12
+ # Glyphicon Halflings in Bootstrap by Jan Kovařík - http://getbootstrap.com/components/#glyphicons
13
+ # License - https://github.com/twbs/bootstrap/blob/master/LICENSE (MIT)
14
+ # http://glyphicons.com/license/
15
+ #
16
+ # SVG processing from svg-icon - https://leungwensen.github.io/svg-icon/#bootstrap
17
+ chevron-right:
18
+ viewbox: '0 0 749 1102'
19
+ path: 'M749 551l-551 551L0 904l353-353L0 198 198 0z'
20
+
21
+
22
+ # Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
23
+ # License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
24
+ #
25
+ # SVG processing from svg-icon - https://leungwensen.github.io/svg-icon/#awesome
26
+ bars:
27
+ viewbox: '0 0 1536 1280'
28
+ path: 'M1536 1088v128q0 26-19 45t-45 19H64q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19H64q-26 0-45-19T0 704V576q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19H64q-26 0-45-19T0 192V64q0-26 19-45T64 0h1408q26 0 45 19t19 45z'
29
+ check-circle:
30
+ viewbox: '0 0 1536 1536'
31
+ path: 'M1284 606q0-28-18-46l-91-90q-19-19-45-19t-45 19L677 877 451 651q-19-19-45-19t-45 19l-91 90q-18 18-18 46 0 27 18 45l362 362q19 19 45 19 27 0 46-19l543-543q18-18 18-45zm252 162q0 209-103 385.5T1153.5 1433 768 1536t-385.5-103T103 1153.5 0 768t103-385.5T382.5 103 768 0t385.5 103T1433 382.5 1536 768z'
32
+ exclamation-circle:
33
+ viewbox: '0 0 1536 1536'
34
+ path: 'M768 0q209 0 385.5 103T1433 382.5 1536 768t-103 385.5-279.5 279.5T768 1536t-385.5-103T103 1153.5 0 768t103-385.5T382.5 103 768 0zm128 1247v-190q0-14-9-23.5t-22-9.5H673q-13 0-23 10t-10 23v190q0 13 10 23t23 10h192q13 0 22-9.5t9-23.5zm-2-344l18-621q0-12-10-18-10-8-24-8H658q-14 0-24 8-10 6-10 18l17 621q0 10 10 17.5t24 7.5h185q14 0 23.5-7.5T894 903z'
35
+ exclamation-triangle:
36
+ viewbox: '0 0 1806.666748046875 1664'
37
+ path: 'M1031.333 1375v-190q0-14-9.5-23.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 23.5v190q0 14 9.5 23.5t22.5 9.5h192q13 0 22.5-9.5t9.5-23.5zm-2-374l18-459q0-12-10-19-13-11-24-11h-220q-11 0-24 11-10 7-10 21l17 457q0 10 10 16.5t24 6.5h185q14 0 23.5-6.5t10.5-16.5zm-14-934l768 1408q35 63-2 126-17 29-46.5 46t-63.5 17h-1536q-34 0-63.5-17t-46.5-46q-37-63-2-126l768-1408q17-31 47-49t65-18 65 18 47 49z'
38
+ file-outline:
39
+ viewbox: '0 0 1536 1792'
40
+ path: 'M1468 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28H96q-40 0-68-28t-28-68V96q0-40 28-68T96 0h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528V640H992q-40 0-68-28t-28-68V128H128v1536h1280z'
41
+ folder-outline:
42
+ viewbox: '0 0 1664 1408'
43
+ path: 'M1536 1184V480q0-40-28-68t-68-28H736q-40 0-68-28t-28-68v-64q0-40-28-68t-68-28H224q-40 0-68 28t-28 68v960q0 40 28 68t68 28h1216q40 0 68-28t28-68zm128-704v704q0 92-66 158t-158 66H224q-92 0-158-66T0 1184V224q0-92 66-158T224 0h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z'
44
+ home:
45
+ viewbox: '0 0 1613.3333740234375 1283'
46
+ path: 'M1382.667 739v480q0 26-19 45t-45 19h-384V899h-256v384h-384q-26 0-45-19t-19-45V739q0-1 .5-3t.5-3l575-474 575 474q1 2 1 6zm223-69l-62 74q-8 9-21 11h-3q-13 0-21-7l-692-577-692 577q-12 8-24 7-13-2-21-11l-62-74q-8-10-7-23.5t11-21.5l719-599q32-26 76-26t76 26l244 204V35q0-14 9-23t23-9h192q14 0 23 9t9 23v408l219 182q10 8 11 21.5t-7 23.5z'
47
+ info-circle:
48
+ viewbox: '0 0 1536 1536'
49
+ path: 'M1024 1248v-160q0-14-9-23t-23-9h-96V544q0-14-9-23t-23-9H544q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zM896 352V192q0-14-9-23t-23-9H672q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5T1153.5 1433 768 1536t-385.5-103T103 1153.5 0 768t103-385.5T382.5 103 768 0t385.5 103T1433 382.5 1536 768z'
50
+ interface: # fa: neuter
51
+ viewbox: '0 0 1152 1792'
52
+ path: 'M1152 576q0 221-147.5 384.5T640 1148v612q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-612q-217-24-364.5-187.5T0 576q0-117 45.5-223.5t123-184 184-123T576 0t223.5 45.5 184 123 123 184T1152 576zm-576 448q185 0 316.5-131.5T1024 576 892.5 259.5 576 128 259.5 259.5 128 576t131.5 316.5T576 1024z'
53
+ magnifier: # fa: search
54
+ viewbox: '0 0 1664 1664'
55
+ path: 'M1152 704q0-185-131.5-316.5T704 256 387.5 387.5 256 704t131.5 316.5T704 1152t316.5-131.5T1152 704zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225T0 704t55.5-273.5 150-225 225-150T704 0t273.5 55.5 225 150 150 225T1408 704q0 220-124 399l343 343q37 37 37 90z'
56
+
57
+
58
+ # Entypo pictograms by Daniel Bruce — www.entypo.com
59
+ # License - http://creativecommons.org/licenses/by-sa/4.0/ (CC BY-SA 4.0)
60
+ #
61
+ # SVG processing from svg-icon - https://leungwensen.github.io/svg-icon/#entypo
62
+ cc-by:
63
+ viewbox: '0 0 960 960'
64
+ path: 'M480 304c-44 0-66-22.667-66-68s22-68 66-68c45.333 0 68 22.667 68 68s-22.667 68-68 68m98 26c9.333 0 16.667 2.667 22 8 6.667 6.667 10 14 10 22v196h-56v234H406V556h-56V360c0-8 3.333-15.333 10-22 5.333-5.333 12.667-8 22-8h196M480 0c133.333 0 246.667 46.667 340 140s140 206.667 140 340c0 132-46.667 245-140 339S613.333 960 480 960c-132 0-245-47-339-141S0 612 0 480c0-133.333 47-246.667 141-340S348 0 480 0m0 872c108 0 200.333-38.333 277-115s115-169 115-277c0-109.333-38.333-202-115-278S588 88 480 88s-200.333 38-277 114S88 370.667 88 480c0 108 38.333 200.333 115 277s169 115 277 115'
65
+ cc-cc:
66
+ viewbox: '0 0 964 962'
67
+ path: 'M476.667 1.333c132-1.333 245.333 44 340 136s143.333 204 146 336c1.333 133.333-44 247.333-136 342s-204.667 143.333-338 146c-132 1.333-245.667-44.333-341-137s-143.667-205-145-337C0 354 45 240 137.667 145.333s205.667-142.667 339-144m12 858c104-1.333 192.667-39.333 266-114s109.333-164.667 108-270C861.334 370 823 281 747.667 208.333s-165-108.333-269-107c-105.333 1.333-194.333 39.333-267 114s-108.333 164.667-107 270c1.333 105.333 39.333 194.333 114 267s164.667 108.333 270 107m-124-298c26.667 0 46-13.333 58-40l56 30c-13.333 24-30 41.333-50 52-21.333 13.333-44.667 20-70 20-41.333 0-74.667-12.667-100-38-25.333-24-38-58.667-38-104s12.667-80.667 38-106 57.333-38 96-38c57.333 0 98.667 22 124 66l-62 32c-6.667-13.333-14.667-22.667-24-28-9.333-5.333-18.667-8-28-8-40 0-60 27.333-60 82 0 25.333 4.667 44.667 14 58 12 14.667 27.333 22 46 22m266 0c28 0 46.667-13.333 56-40l58 30c-12 21.333-28.667 38.667-50 52-21.333 13.333-44.667 20-70 20-42.667 0-76-12.667-100-38-25.333-24-38-58.667-38-104 0-42.667 12.667-78 38-106 25.333-25.333 58-38 98-38 56 0 96 22 120 66l-60 32c-6.667-13.333-14.667-22.667-24-28-9.333-5.333-18.667-8-28-8-41.333 0-62 27.333-62 82 0 24 5.333 43.333 16 58 10.667 14.667 26 22 46 22'
68
+ flow-line:
69
+ viewbox: '0 0 240 840'
70
+ path: 'M168 608c48 22.667 72 60 72 112 0 33.333-11.667 61.667-35 85s-51.667 35-85 35-61.667-11.667-85-35-35-51.667-35-85c0-52 24-89.333 72-112V230C24 207.333 0 170.667 0 120c0-33.333 11.667-61.667 35-85S86.667 0 120 0s61.667 11.667 85 35 35 51.667 35 85c0 50.667-24 87.333-72 110v378M52 120c0 18.667 6.667 34.667 20 48 13.333 13.333 29.333 20 48 20s35-6.667 49-20 21-29.333 21-48c0-20-7-36.667-21-50-14-13.333-30.333-20-49-20s-34.667 6.667-48 20c-13.333 13.333-20 30-20 50m68 668c18.667 0 35-6.667 49-20s21-29.333 21-48c0-20-7-36.667-21-50-14-13.333-30.333-20-49-20s-34.667 6.667-48 20c-13.333 13.333-20 30-20 50 0 18.667 6.667 34.667 20 48 13.333 13.333 29.333 20 48 20'
71
+ flow-tree:
72
+ viewbox: '0 0 940 940'
73
+ path: 'M868 708c48 22.667 72 60 72 112 0 33.333-11.667 61.667-35 85s-51.667 35-85 35-61.667-11.667-85-35-35-51.667-35-85c0-52 24-89.333 72-112V594c0-52-25.333-78-76-78H596c-29.333 0-55.333-4-78-12v204c48 22.667 72 60 72 112 0 33.333-11.667 61.667-35 85s-51.667 35-85 35-61.667-11.667-85-35-35-51.667-35-85c0-52 24-89.333 72-112V504c-20 8-45.333 12-76 12H246c-22.667 0-40.333 6.333-53 19-12.667 12.667-20 23.667-22 33-2 9.333-3 18-3 26v114c48 22.667 72 60 72 112 0 33.333-11.667 61.667-35 85s-51.667 35-85 35-61.667-11.667-85-35-35-51.667-35-85c0-52 24-89.333 72-112V594c0-42.667 14.333-82 43-118s72.333-54 131-54h100c50.667 0 76-17.333 76-52V230c-48-22.667-72-59.333-72-110 0-33.333 11.667-61.667 35-85s51.667-35 85-35 61.667 11.667 85 35 35 51.667 35 85c0 50.667-24 87.333-72 110v140c0 34.667 26 52 78 52h100c57.333 0 100.333 18 129 54s43 75.333 43 118v114M190 820c0-20-7-36.667-21-50-14-13.333-30.333-20-49-20s-34.667 6.667-48 20c-13.333 13.333-20 30-20 50 0 18.667 6.667 34.667 20 48 13.333 13.333 29.333 20 48 20s35-6.667 49-20 21-29.333 21-48m212-700c0 18.667 6.667 34.667 20 48 13.333 13.333 29.333 20 48 20s35-6.667 49-20 21-29.333 21-48c0-20-7-36.667-21-50-14-13.333-30.333-20-49-20s-34.667 6.667-48 20c-13.333 13.333-20 30-20 50m138 700c0-20-7-36.667-21-50-14-13.333-30.333-20-49-20s-34.667 6.667-48 20c-13.333 13.333-20 30-20 50 0 18.667 6.667 34.667 20 48 13.333 13.333 29.333 20 48 20s35-6.667 49-20 21-29.333 21-48m280 68c18.667 0 35-6.667 49-20s21-29.333 21-48c0-20-7-36.667-21-50-14-13.333-30.333-20-49-20s-34.667 6.667-48 20c-13.333 13.333-20 30-20 50 0 18.667 6.667 34.667 20 48 13.333 13.333 29.333 20 48 20'
@@ -0,0 +1,28 @@
1
+ <table class="ui unstackable very basic collapsing table">
2
+ <tbody>
3
+
4
+ <tr>
5
+ <td>
6
+ <div class="license">
7
+ <a class="larger text" rel="license" href="https://creativecommons.org/licenses/by/4.0/" title="Creative Commons Attribution 4.0 International license">
8
+ {% include icon.liquid id='cc-cc' %}{% include icon.liquid id='cc-by' %}
9
+ </a>
10
+ </div>
11
+
12
+ <div>
13
+ <strong>{{ site.project.name }}</strong>
14
+ {{ "now" | date: "%Y" }} {{ site.project.owner }}
15
+ <br>
16
+ <a class="project-repo" href="{{ site.project.repo }}">{{ site.project.repo }}</a>
17
+ </div>
18
+ </td>
19
+ </tr>
20
+
21
+ <tr>
22
+ <td class="smaller text">
23
+ <strong>programming pages</strong> template v{{ layout.theme_version }} (<a href="{{ layout.theme_url }}" title="a documentation template for GitHub Pages">{{ layout.theme_url }}</a>)
24
+ </td>
25
+ </tr>
26
+
27
+ </tbody>
28
+ </table>
@@ -0,0 +1,24 @@
1
+ <h1 class="ui dividing header">Keyboard Shortcuts</h1>
2
+
3
+ <div class="content">
4
+ <table class="ui very basic table"><tbody>
5
+ <tr>
6
+ <td class="right aligned"><div class="ui basic label">s</div></td>
7
+ <td>focus <strong>s</strong>earch bar (<div class="ui very tight label">enter</div> to select, <div class="ui very tight label">▲ / ▼</div> to change selection)</td>
8
+ </tr>
9
+ {% for collection in site.collections %}
10
+ {% unless collection.label == 'posts' %}
11
+ {% capture label %}{{ collection.label | downcase }}{% endcapture %}
12
+ {% capture key %}{{ label | split: '' | first }}{% endcapture %}
13
+ <tr>
14
+ <td class="right aligned"><div class="ui basic label">g {{ key }}</div></td>
15
+ <td><strong>g</strong>o to <strong>{{ key }}</strong>{{ label | remove_first: key }}</td>
16
+ </tr>
17
+ {% endunless %}
18
+ {% endfor %}
19
+ <tr>
20
+ <td class="right aligned"><div class="ui basic label">h</div></td>
21
+ <td>toggle this help (<div class="ui very tight label">esc</div> also exits)</td>
22
+ </tr>
23
+ </tbody></table>
24
+ </div>
@@ -0,0 +1,225 @@
1
+ <div class="ui inverted large menu">
2
+ <div class="item" style="padding-top: 1.6em;">
3
+ {% include elements/search.html %}
4
+ </div>
5
+ </div>
6
+
7
+ <div class="ui fitted inverted divider"></div>
8
+
9
+ {% assign collection_list = site.collections %}
10
+
11
+ {% assign ordered = '' | split: '' %}
12
+ {% assign endered = '' | split: '' %}
13
+ {% assign unorder = '' | split: '' %}
14
+ {% for collection in collection_list %}
15
+ {% unless collection.label == 'posts' or collection.docs.size == 0 %}
16
+ {% if collection.tab-order %}
17
+ {% if collection.tab-order < 0 %}{% assign endered = endered | push: collection %}
18
+ {% else %}{% assign ordered = ordered | push: collection %}
19
+ {% endif %}
20
+ {% else %}{% assign unorder = unorder | push: collection %}
21
+ {% endif %}
22
+ {% endunless %}
23
+ {% endfor %}
24
+ {% assign ordered = ordered | sort: 'tab-order' %}
25
+ {% assign endered = endered | sort: 'tab-order' | reverse %}
26
+ {% assign collection_list = ordered | concat: unorder | concat: endered %}
27
+
28
+ <div id="collection-tabs" class="ui inverted stackable pointing secondary menu">
29
+ {% for collection in collection_list %}
30
+ {% capture tab_class %}{% if forloop.first %}active {% endif %}item{% endcapture %}
31
+ <a class="{{ tab_class }}" data-tab="{{ collection.label | downcase }}">{{ collection.title }}</a>
32
+ {% endfor %}
33
+ </div>
34
+
35
+ {% for collection in collection_list %}
36
+ {% capture tab_class %}ui {% if forloop.first %}active {% endif %}inverted tab segment{% endcapture %}
37
+ <div class="{{ tab_class }}" data-tab="{{ collection.label | downcase }}">
38
+ <h4 class="ui header">{{ collection.title }}</h4>
39
+ <div class="ui inverted link list">
40
+ {% assign doc_list = collection.docs %}
41
+ {% assign ordered_doc_list = '' | split: '' %}
42
+
43
+ {%- comment %}
44
+ for guides, we want to support user-defined ordering, but not require it in every guide.
45
+
46
+ this means we have to create our own file tree, keeping children with parents as we re-sort
47
+ the collection list from its default alphabetical order into user order, and for that,
48
+ we want to perform a depth-first iterative visitation of the page tree.
49
+
50
+ here's a psuedocode implementation in a javascript-like language; given root:
51
+
52
+ curr = root;
53
+ stack = [];
54
+ stack.push(root);
55
+ while (stack.length > 0) {
56
+ if (curr) {
57
+ print(curr);
58
+
59
+ if (curr.sibling)
60
+ stack.push(curr.sibling);
61
+
62
+ curr = curr.child;
63
+ }
64
+ else
65
+ curr = stack.pop();
66
+ }
67
+
68
+ but liquid brings some interesting challenges:
69
+ - no while loops
70
+ - no infinite loops
71
+ - no custom objects or hashes, just ordered arrays
72
+ - no array mutation in place
73
+ - no actual tree structure to start with, just a list of docs
74
+
75
+ so our strategy is to:
76
+ - start by bucketing the docs into levels, to get a tree-like context
77
+ - levels correspond to 'generations', but not always parent-child links
78
+ - parent-child relationships have to be tested by comparing path segments
79
+ - items in the same level are of the same generation, but not always siblings
80
+ - sibling relationships have to be tested by comparing path segments
81
+ - use arrays for tree nodes so we can store state (a 2-tuple: level index, item index)
82
+ - push state onto a stack made of an array and the push/pop operations from jekyll
83
+ - use a pseudo-infinite range loop with large bounds and a break clause in place of a while loop
84
+ {% endcomment -%}
85
+
86
+ {%- comment %} first, calculate max_depth as deepest level index {% endcomment -%}
87
+ {% assign max_depth = 0 %}
88
+ {% for doc in doc_list %}
89
+ {% assign depth = doc.path | split:'/' | size | minus:2 %} {%- comment %} minus one to convert from length to index, minus two to ignore root collection directory (_guides/) {% endcomment -%}
90
+ {% if depth > max_depth %}{% assign max_depth = depth %}{% endif %}
91
+ {% endfor %}
92
+
93
+ {%- comment %} separate docs into levels, and sort by user-defined order value {% endcomment -%}
94
+ {%- comment %} ordering: 0 is first, -1 is last, undefined orders go in the middle alphabetically
95
+ first ---------> middle ----------------------> last --------->|
96
+ [0..positive N]..[no order defined, use alpha]..[negative N..-1]
97
+ {% endcomment -%}
98
+ {% assign leveled = '' | split: '' %}
99
+ {% for i in (0..max_depth) %}
100
+ {% assign new = '' | split: '' %}
101
+ {% assign ordered = '' | split: '' %}
102
+ {% assign endered = '' | split: '' %}
103
+ {% assign unorder = '' | split: '' %}
104
+ {% for doc in doc_list %}
105
+ {% assign depth = doc.path | split:'/' | size | minus:2 %}
106
+ {% if depth == i %}
107
+ {% if doc.order %}
108
+ {% if doc.order < 0 %}{% assign endered = endered | push: doc %}
109
+ {% else %}{% assign ordered = ordered | push: doc %}
110
+ {% endif %}
111
+ {% else %}{% assign unorder = unorder | push: doc %}
112
+ {% endif %}
113
+ {% endif %}
114
+ {% endfor %}
115
+ {% assign ordered = ordered | sort: 'order' %}
116
+ {% assign endered = endered | sort: 'order' | reverse %}
117
+ {% assign new = ordered | concat: unorder | concat: endered %}
118
+ {% assign leveled = leveled | push: new %}
119
+ {% endfor %}
120
+
121
+ {%- comment %} set root and make current be root {% endcomment -%}
122
+ {%- assign root = '' | split: '' -%}
123
+ {%- assign root = root | push: 0 -%} {%- comment %} level index {% endcomment -%}
124
+ {%- assign root = root | push: 0 -%} {%- comment %} group index {% endcomment -%}
125
+ {%- assign curr = root -%}
126
+ {%- comment %} create a stack and initialize it with the root node {% endcomment -%}
127
+ {%- assign stack = '' | split: '' -%}
128
+ {%- assign stack = stack | push: root -%}
129
+
130
+ {%- comment %} fake a while loop with a fake infinite loop, being sure to bail when all nodes are processed {% endcomment -%}
131
+ {%- assign enough = doc_list.size | times: 2 -%} {%- comment %} estimate the worst case number of iterations required {% endcomment -%}
132
+ {%- for ever in (0..enough) -%}
133
+ {%- if stack.size == 0 %}{% break %}{% endif -%}
134
+ {%- comment %} if we have a current node, record it, push next sibling on the stack, and move on to first child {% endcomment -%}
135
+ {%- if curr -%}
136
+ {%- comment %} print curr {% endcomment -%}
137
+ {%- assign l = curr[0] -%} {%- comment %} level {% endcomment -%}
138
+ {%- assign e = curr[1] -%} {%- comment %} entry {% endcomment -%}
139
+ {%- assign d = leveled[l][e] -%} {%- comment %} doc {% endcomment -%}
140
+ {%- assign p = d.path | split: '/' -%} {%- comment %} path parts {% endcomment -%}
141
+ {%- assign t = p | last | split: '.' | first -%} {%- comment %} title, minus file extension {% endcomment -%}
142
+ {%- assign _ = p | pop -%} {%- comment %} drop file part {% endcomment -%}
143
+ {%- assign s = _ | last -%} {%- comment %} section (containing folder) {% endcomment -%}
144
+
145
+ {%- comment %} record node docs in visitation order {% endcomment -%}
146
+ {%- assign ordered_doc_list = ordered_doc_list | push: d -%}
147
+
148
+ {%- comment %} clear current node now that it's recorded {% endcomment -%}
149
+ {%- assign curr = nil -%}
150
+
151
+ {%- comment %} find and push next sibling in current group (if any) {% endcomment -%}
152
+ {%- assign e1 = e | plus: 1 -%}
153
+ {%- assign en = leveled[l].size | minus: 1 -%}
154
+ {%- for ei in (e1..en) -%} {%- comment %} look forward from current entry's index {% endcomment -%}
155
+ {%- assign di = leveled[l][ei] -%}
156
+ {%- assign pi = di.path | split: '/' -%}
157
+ {%- assign pi = pi | pop -%}
158
+ {%- assign si = pi | last -%}
159
+ {%- if si == s %} {%- comment %} siblings share the same section {% endcomment -%}
160
+ {%- comment %} ..and each higher path component also needs to match so we don't falsely select a separate subtree using the same names {% endcomment -%}
161
+ {%- assign full_match = true -%}
162
+ {%- for i in (0..l) -%}{%- unless pi[i] == p[i] -%}{%- assign full_match = false -%}{%- break -%}{%- endunless -%}{%- endfor -%}
163
+ {%- if full_match -%}
164
+ {%- assign next_item = '' | split: '' -%}
165
+ {%- assign next_item = next_item | push: l -%}
166
+ {%- assign next_item = next_item | push: ei -%}
167
+ {%- assign stack = stack | push: next_item -%}
168
+ {%- break -%}
169
+ {%- endif -%}
170
+ {%- endif -%}
171
+ {%- endfor -%}
172
+
173
+ {%- comment %} find and set curr to first matching child in next level group (if any) {% endcomment -%}
174
+ {%- if l < max_depth -%}
175
+ {%- assign l1 = l | plus: 1 -%}
176
+ {%- assign ei = 0 -%} {%- comment %} start at beginning of entry group {% endcomment -%}
177
+ {%- for di in leveled[l1] -%}
178
+ {%- assign pi = di.path | split:'/' -%}
179
+ {%- if pi[l1] == t %} {%- comment %} children are found in directories that match their parent's title {% endcomment -%}
180
+ {%- comment %} ..and each higher path component also needs to match so we don't falsely select a separate subtree using the same names {% endcomment -%}
181
+ {%- assign full_match = true -%}
182
+ {%- for i in (0..l) -%}{%- unless pi[i] == p[i] -%}{%- assign full_match = false -%}{%- break -%}{%- endunless -%}{%- endfor -%}
183
+ {%- if full_match -%}
184
+ {%- assign curr = '' | split: '' -%}
185
+ {%- assign curr = curr | push: l1 -%}
186
+ {%- assign curr = curr | push: ei -%}
187
+ {%- break -%}
188
+ {%- endif -%}
189
+ {%- endif -%}
190
+ {%- assign ei = ei | plus: 1 -%}
191
+ {%- endfor -%}
192
+ {%- endif -%}
193
+
194
+ {%- comment %} if no current node, pop from stack and start the loop over {% endcomment -%}
195
+ {%- else -%}
196
+ {%- assign curr = stack | last -%}
197
+ {%- assign stack = stack | pop %}
198
+ {%- endif -%}
199
+ {%- endfor -%}
200
+
201
+ {% assign doc_list = ordered_doc_list %}
202
+
203
+ {% for doc in doc_list %}
204
+ {% capture link %}{{ doc.title }}{% endcapture %}
205
+ {% capture url %}{{ doc.url }}#/{{ collection.label | downcase }}/{% endcapture %}
206
+ {% capture item_class %}{% if doc.title == page.title %}active {% endif %}item{% endcapture %}
207
+ {% case doc.layout %}
208
+ {% when 'package' %}
209
+ {% capture link %}{% include icon.liquid id='folder-outline' %} {% include package_shortener.liquid package=doc.module %}{% endcapture %}
210
+ {% when 'type' %}
211
+ {% capture pkg %}{{ doc.module }}.{{ doc.name }}{% endcapture %}
212
+ {% capture link %}{% include package_shortener.liquid package=pkg %}{% endcapture %}
213
+ {% when 'page' %}
214
+ {% assign path_bits = doc.relative_path | split: '.' | first | split: '/' %}
215
+ {% assign n = path_bits.size | minus: 2 %}
216
+ {% if n > 3 %}{% assign n = 3 %}{% endif %}
217
+ {% capture indent %}{% for i in (1..n) %}&ensp;{% endfor %}{% endcapture %}
218
+ {% capture link %}{{ indent }}{{ doc.title }}{% endcapture %}
219
+ {% endcase %}
220
+ <a class="very tight smaller text {{ item_class }}" href="{{ site.baseurl }}{{ url }}">{{ link }}</a>
221
+ {% endfor %}
222
+
223
+ </div>
224
+ </div>
225
+ {% endfor %}
@@ -0,0 +1,7 @@
1
+ <div id="site-search" class="ui fluid search">
2
+ <div class="ui inverted transparent left icon input">
3
+ {% include icon.liquid id='magnifier' %}
4
+ <input class="prompt" type="text" placeholder="search...">
5
+ </div>
6
+ <div class="results"></div>
7
+ </div>