primery 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +21 -0
  3. data/README.md +116 -0
  4. data/_includes/.gitkeep +1 -0
  5. data/_includes/head-custom-google-analytics.html +10 -0
  6. data/_includes/head-custom.html +9 -0
  7. data/_includes/toc.html +182 -0
  8. data/_layouts/default.html +36 -0
  9. data/_layouts/home.html +4 -0
  10. data/_layouts/page.html +4 -0
  11. data/_layouts/post.html +8 -0
  12. data/_sass/@primer/css/alerts/flash.scss +146 -0
  13. data/_sass/@primer/css/alerts/index.scss +3 -0
  14. data/_sass/@primer/css/autocomplete/autocomplete.scss +58 -0
  15. data/_sass/@primer/css/autocomplete/index.scss +4 -0
  16. data/_sass/@primer/css/autocomplete/suggester.scss +84 -0
  17. data/_sass/@primer/css/avatars/avatar-parent-child.scss +17 -0
  18. data/_sass/@primer/css/avatars/avatar-stack.scss +146 -0
  19. data/_sass/@primer/css/avatars/avatar.scss +48 -0
  20. data/_sass/@primer/css/avatars/circle-badge.scss +55 -0
  21. data/_sass/@primer/css/avatars/index.scss +7 -0
  22. data/_sass/@primer/css/base/base.scss +85 -0
  23. data/_sass/@primer/css/base/index.scss +8 -0
  24. data/_sass/@primer/css/base/kbd.scss +20 -0
  25. data/_sass/@primer/css/base/modes-v2.scss +27 -0
  26. data/_sass/@primer/css/base/modes.scss +36 -0
  27. data/_sass/@primer/css/base/normalize.scss +421 -0
  28. data/_sass/@primer/css/base/octicons.scss +6 -0
  29. data/_sass/@primer/css/base/typography-base.scss +88 -0
  30. data/_sass/@primer/css/blankslate/blankslate.scss +71 -0
  31. data/_sass/@primer/css/blankslate/index.scss +3 -0
  32. data/_sass/@primer/css/box/box.scss +292 -0
  33. data/_sass/@primer/css/box/index.scss +2 -0
  34. data/_sass/@primer/css/branch-name/branch-name.scss +32 -0
  35. data/_sass/@primer/css/branch-name/index.scss +3 -0
  36. data/_sass/@primer/css/breadcrumb/breadcrumb.scss +30 -0
  37. data/_sass/@primer/css/breadcrumb/index.scss +3 -0
  38. data/_sass/@primer/css/buttons/button-group.scss +91 -0
  39. data/_sass/@primer/css/buttons/button.scss +316 -0
  40. data/_sass/@primer/css/buttons/index.scss +4 -0
  41. data/_sass/@primer/css/buttons/misc.scss +215 -0
  42. data/_sass/@primer/css/core/index.scss +28 -0
  43. data/_sass/@primer/css/dropdown/dropdown.scss +275 -0
  44. data/_sass/@primer/css/dropdown/index.scss +2 -0
  45. data/_sass/@primer/css/forms/form-control.scss +250 -0
  46. data/_sass/@primer/css/forms/form-group.scss +252 -0
  47. data/_sass/@primer/css/forms/form-select.scss +46 -0
  48. data/_sass/@primer/css/forms/form-validation.scss +361 -0
  49. data/_sass/@primer/css/forms/index.scss +7 -0
  50. data/_sass/@primer/css/forms/input-group.scss +53 -0
  51. data/_sass/@primer/css/forms/radio-group.scss +43 -0
  52. data/_sass/@primer/css/header/header.scss +48 -0
  53. data/_sass/@primer/css/header/index.scss +2 -0
  54. data/_sass/@primer/css/index.scss +16 -0
  55. data/_sass/@primer/css/labels/counters.scss +36 -0
  56. data/_sass/@primer/css/labels/diffstat.scss +37 -0
  57. data/_sass/@primer/css/labels/index.scss +8 -0
  58. data/_sass/@primer/css/labels/issue-labels.scss +23 -0
  59. data/_sass/@primer/css/labels/labels.scss +63 -0
  60. data/_sass/@primer/css/labels/mixins.scss +32 -0
  61. data/_sass/@primer/css/labels/states.scss +59 -0
  62. data/_sass/@primer/css/layout/container.scss +30 -0
  63. data/_sass/@primer/css/layout/grid-offset.scss +19 -0
  64. data/_sass/@primer/css/layout/grid.scss +64 -0
  65. data/_sass/@primer/css/layout/index.scss +7 -0
  66. data/_sass/@primer/css/layout/layout.scss +186 -0
  67. data/_sass/@primer/css/layout/mixins.scss +79 -0
  68. data/_sass/@primer/css/links/index.scss +3 -0
  69. data/_sass/@primer/css/links/link.scss +55 -0
  70. data/_sass/@primer/css/loaders/index.scss +2 -0
  71. data/_sass/@primer/css/loaders/loaders.scss +19 -0
  72. data/_sass/@primer/css/markdown/blob-csv.scss +29 -0
  73. data/_sass/@primer/css/markdown/code.scss +68 -0
  74. data/_sass/@primer/css/markdown/headings.scss +72 -0
  75. data/_sass/@primer/css/markdown/images.scss +130 -0
  76. data/_sass/@primer/css/markdown/index.scss +8 -0
  77. data/_sass/@primer/css/markdown/lists.scss +90 -0
  78. data/_sass/@primer/css/markdown/markdown-body.scss +99 -0
  79. data/_sass/@primer/css/markdown/tables.scss +36 -0
  80. data/_sass/@primer/css/marketing/buttons/button.scss +106 -0
  81. data/_sass/@primer/css/marketing/buttons/index.scss +3 -0
  82. data/_sass/@primer/css/marketing/index.scss +14 -0
  83. data/_sass/@primer/css/marketing/support/index.scss +3 -0
  84. data/_sass/@primer/css/marketing/support/mixins.scss +80 -0
  85. data/_sass/@primer/css/marketing/support/variables.scss +128 -0
  86. data/_sass/@primer/css/marketing/type/index.scss +3 -0
  87. data/_sass/@primer/css/marketing/type/typography.scss +141 -0
  88. data/_sass/@primer/css/marketing/utilities/animations.scss +9 -0
  89. data/_sass/@primer/css/marketing/utilities/borders.scss +4 -0
  90. data/_sass/@primer/css/marketing/utilities/filters.scss +3 -0
  91. data/_sass/@primer/css/marketing/utilities/index.scss +6 -0
  92. data/_sass/@primer/css/marketing/utilities/layout.scss +50 -0
  93. data/_sass/@primer/css/navigation/filter-list.scss +64 -0
  94. data/_sass/@primer/css/navigation/index.scss +8 -0
  95. data/_sass/@primer/css/navigation/menu.scss +124 -0
  96. data/_sass/@primer/css/navigation/sidenav.scss +109 -0
  97. data/_sass/@primer/css/navigation/subnav.scss +128 -0
  98. data/_sass/@primer/css/navigation/tabnav.scss +100 -0
  99. data/_sass/@primer/css/navigation/underline-nav.scss +88 -0
  100. data/_sass/@primer/css/pagination/index.scss +3 -0
  101. data/_sass/@primer/css/pagination/pagination.scss +98 -0
  102. data/_sass/@primer/css/popover/index.scss +3 -0
  103. data/_sass/@primer/css/popover/popover.scss +193 -0
  104. data/_sass/@primer/css/product/index.scss +27 -0
  105. data/_sass/@primer/css/progress/index.scss +3 -0
  106. data/_sass/@primer/css/progress/progress.scss +28 -0
  107. data/_sass/@primer/css/select-menu/index.scss +3 -0
  108. data/_sass/@primer/css/select-menu/select-menu.scss +465 -0
  109. data/_sass/@primer/css/subhead/index.scss +3 -0
  110. data/_sass/@primer/css/subhead/subhead.scss +39 -0
  111. data/_sass/@primer/css/support/index.scss +10 -0
  112. data/_sass/@primer/css/support/mixins/color-modes.scss +106 -0
  113. data/_sass/@primer/css/support/mixins/layout.scss +58 -0
  114. data/_sass/@primer/css/support/mixins/misc.scss +26 -0
  115. data/_sass/@primer/css/support/mixins/typography.scss +84 -0
  116. data/_sass/@primer/css/support/variables/layout.scss +212 -0
  117. data/_sass/@primer/css/support/variables/misc.scss +17 -0
  118. data/_sass/@primer/css/support/variables/typography.scss +43 -0
  119. data/_sass/@primer/css/table-object/index.scss +1 -0
  120. data/_sass/@primer/css/table-object/table-object.scss +20 -0
  121. data/_sass/@primer/css/timeline/index.scss +2 -0
  122. data/_sass/@primer/css/timeline/timeline-item.scss +97 -0
  123. data/_sass/@primer/css/toasts/index.scss +2 -0
  124. data/_sass/@primer/css/toasts/toasts.scss +132 -0
  125. data/_sass/@primer/css/tooltips/index.scss +2 -0
  126. data/_sass/@primer/css/tooltips/tooltips.scss +292 -0
  127. data/_sass/@primer/css/truncate/index.scss +2 -0
  128. data/_sass/@primer/css/truncate/truncate.scss +61 -0
  129. data/_sass/@primer/css/utilities/animations.scss +196 -0
  130. data/_sass/@primer/css/utilities/borders.scss +75 -0
  131. data/_sass/@primer/css/utilities/box-shadow.scss +25 -0
  132. data/_sass/@primer/css/utilities/colors.scss +51 -0
  133. data/_sass/@primer/css/utilities/details.scss +28 -0
  134. data/_sass/@primer/css/utilities/flexbox.scss +52 -0
  135. data/_sass/@primer/css/utilities/index.scss +14 -0
  136. data/_sass/@primer/css/utilities/layout.scss +96 -0
  137. data/_sass/@primer/css/utilities/margin.scss +65 -0
  138. data/_sass/@primer/css/utilities/padding.scss +54 -0
  139. data/_sass/@primer/css/utilities/typography.scss +245 -0
  140. data/_sass/@primer/css/utilities/visibility-display.scss +74 -0
  141. data/_sass/@primer/octicons/index.scss +6 -0
  142. data/_sass/@primer/primitives/dist/scss/colors/_dark.scss +757 -0
  143. data/_sass/@primer/primitives/dist/scss/colors/_dark_dimmed.scss +757 -0
  144. data/_sass/@primer/primitives/dist/scss/colors/_light.scss +757 -0
  145. data/_sass/@primer/primitives/dist/scss/colors_v2/_dark.scss +820 -0
  146. data/_sass/@primer/primitives/dist/scss/colors_v2/_dark_dimmed.scss +820 -0
  147. data/_sass/@primer/primitives/dist/scss/colors_v2/_dark_high_contrast.scss +820 -0
  148. data/_sass/@primer/primitives/dist/scss/colors_v2/_light.scss +820 -0
  149. data/_sass/@primer/primitives/dist/scss/spacing/_normal.scss +11 -0
  150. data/_sass/@primer/primitives/dist/scss/typography/_normal.scss +15 -0
  151. data/_sass/jekyll-theme-primer.scss +10 -0
  152. data/_sass/primer-base/index.scss +5 -0
  153. data/_sass/primer-base/lib/base.scss +84 -0
  154. data/_sass/primer-base/lib/normalize.scss +421 -0
  155. data/_sass/primer-base/lib/typography-base.scss +86 -0
  156. data/_sass/primer-layout/index.scss +5 -0
  157. data/_sass/primer-layout/lib/columns.scss +54 -0
  158. data/_sass/primer-layout/lib/container.scss +30 -0
  159. data/_sass/primer-layout/lib/grid-offset.scss +19 -0
  160. data/_sass/primer-layout/lib/grid.scss +64 -0
  161. data/_sass/primer-markdown/index.scss +8 -0
  162. data/_sass/primer-markdown/lib/blob-csv.scss +27 -0
  163. data/_sass/primer-markdown/lib/code.scss +63 -0
  164. data/_sass/primer-markdown/lib/headings.scss +65 -0
  165. data/_sass/primer-markdown/lib/images.scss +119 -0
  166. data/_sass/primer-markdown/lib/lists.scss +76 -0
  167. data/_sass/primer-markdown/lib/markdown-body.scss +106 -0
  168. data/_sass/primer-markdown/lib/tables.scss +33 -0
  169. data/_sass/primer-support/index.scss +11 -0
  170. data/_sass/primer-support/lib/mixins/buttons.scss +160 -0
  171. data/_sass/primer-support/lib/mixins/layout.scss +58 -0
  172. data/_sass/primer-support/lib/mixins/misc.scss +29 -0
  173. data/_sass/primer-support/lib/mixins/typography.scss +84 -0
  174. data/_sass/primer-support/lib/variables/color-system.scss +114 -0
  175. data/_sass/primer-support/lib/variables/colors.scss +67 -0
  176. data/_sass/primer-support/lib/variables/layout.scss +72 -0
  177. data/_sass/primer-support/lib/variables/misc.scss +40 -0
  178. data/_sass/primer-support/lib/variables/typography.scss +43 -0
  179. data/_sass/primer-utilities/index.scss +14 -0
  180. data/_sass/primer-utilities/lib/animations.scss +184 -0
  181. data/_sass/primer-utilities/lib/borders.scss +100 -0
  182. data/_sass/primer-utilities/lib/box-shadow.scss +26 -0
  183. data/_sass/primer-utilities/lib/colors.scss +106 -0
  184. data/_sass/primer-utilities/lib/details.scss +18 -0
  185. data/_sass/primer-utilities/lib/flexbox.scss +52 -0
  186. data/_sass/primer-utilities/lib/layout.scss +85 -0
  187. data/_sass/primer-utilities/lib/margin.scss +53 -0
  188. data/_sass/primer-utilities/lib/padding.scss +54 -0
  189. data/_sass/primer-utilities/lib/typography.scss +215 -0
  190. data/_sass/primer-utilities/lib/visibility-display.scss +87 -0
  191. data/_sass/primer.scss +4 -0
  192. data/_sass/rouge.scss +209 -0
  193. data/assets/css/style.scss +4 -0
  194. metadata +339 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 566a74498741f3fed98df9bbca6620a8e5c2468afc53a988d3f673b01e60c57d
4
+ data.tar.gz: 62a44bb42c37fc3752e382a871c7cee1dd46241991d7d015697cc012769a5deb
5
+ SHA512:
6
+ metadata.gz: 9d89a5833a320f833a9b8274e706e2c282a0f42e6aff072ccc73accdbf4cef4c3b84e9f60c0ce36b6649dd49d37a78ade0dbc92fd0d5e45a97d02e4558013b22
7
+ data.tar.gz: 275f4b2a42ad2d413b765b4a7195114fce705b2ee946c2fd8229eb9a5fe757877095e7bd01d2b92c1d8f941a95b240e0814524b46c9d84ace3e7fb91516e74dc
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016-2017 GitHub, Inc.
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.
data/README.md ADDED
@@ -0,0 +1,116 @@
1
+ # Primery (WIP)
2
+
3
+ [![.github/workflows/ci.yaml](https://github.com/leapofazzam123/Primery/actions/workflows/ci.yaml/badge.svg)](https://github.com/leapofazzam123/Primery/actions/workflows/ci.yaml) [![Gem Version](https://badge.fury.io/rb/jekyll-theme-primer.svg)](https://badge.fury.io/rb/jekyll-theme-primer)
4
+
5
+ *An imporved version of Primer Jekyll theme. You can [preview the theme to see what it looks like](http://leapofazzam.github.io/Primery), or even [use it today](#usage).*
6
+
7
+ ![Thumbnail of Primer](thumbnail.png)
8
+
9
+ ## Usage
10
+
11
+ To use the Primer theme:
12
+
13
+ 1. Add the following to your site's `_config.yml`:
14
+
15
+ ```yml
16
+ remote_theme: leapofazzam123/Primery
17
+ plugins:
18
+ - jekyll-remote-theme # add this line to the plugins list if you already have one
19
+ ```
20
+
21
+ 2. Optionally, if you'd like to preview your site on your computer, add the following to your site's `Gemfile`:
22
+
23
+ ```ruby
24
+ gem "github-pages", group: :jekyll_plugins
25
+ ```
26
+
27
+ ## Customizing
28
+
29
+ ### Configuration variables
30
+
31
+ Primer will respect the following variables, if set in your site's `_config.yml`:
32
+
33
+ ```yml
34
+ title: [The title of your site]
35
+ description: [A short description of your site's purpose]
36
+ ```
37
+
38
+ Additionally, you may choose to set the following optional variables:
39
+
40
+ ```yml
41
+ show_downloads: ["true" or "false" (unquoted) to indicate whether to provide a download URL]
42
+ google_analytics: [Your Google Analytics tracking ID]
43
+ ```
44
+
45
+ ### Stylesheet
46
+
47
+ If you'd like to add your own custom styles:
48
+
49
+ 1. Create a file called `/assets/css/style.scss` in your site
50
+ 2. Add the following content to the top of the file, exactly as shown:
51
+ ```scss
52
+ ---
53
+ ---
54
+
55
+ @import "{{ site.theme }}";
56
+ ```
57
+ 3. Add any custom CSS (or Sass, including imports) you'd like immediately after the `@import` line
58
+
59
+ *Note: If you'd like to change the theme's Sass variables, you must set new values before the `@import` line in your stylesheet.*
60
+
61
+ ### Layouts
62
+
63
+ If you'd like to change the theme's HTML layout:
64
+
65
+ 1. For some changes such as a custom `favicon`, you can add custom files in your local `_includes` folder. The files [provided with the theme](https://github.com/leapofazzam123/Primery/tree/master/_includes) provide a starting point and are included by the [original layout template](https://github.com/leapofazzam123/Primery/blob/master/_layouts/default.html).
66
+ 2. For more extensive changes, [copy the original template](https://github.com/leapofazzam123/Primery/blob/master/_layouts/default.html) from the theme's repository<br />(*Pro-tip: click "raw" to make copying easier*)
67
+ 3. Create a file called `/_layouts/default.html` in your site
68
+ 4. Paste the default layout content copied in the first step
69
+ 5. Customize the layout as you'd like
70
+
71
+ ### Customizing Google Analytics code
72
+
73
+ Google has released several iterations to their Google Analytics code over the years since this theme was first created. If you would like to take advantage of the latest code, paste it into `_includes/head-custom-google-analytics.html` in your Jekyll site.
74
+
75
+ ### Overriding GitHub-generated URLs
76
+
77
+ Templates often rely on URLs supplied by GitHub such as links to your repository or links to download your project. If you'd like to override one or more default URLs:
78
+
79
+ 1. Look at [the template source](https://github.com/leapofazzam123/Primery/blob/master/_layouts/default.html) to determine the name of the variable. It will be in the form of `{{ site.github.zip_url }}`.
80
+ 2. Specify the URL that you'd like the template to use in your site's `_config.yml`. For example, if the variable was `site.github.url`, you'd add the following:
81
+ ```yml
82
+ github:
83
+ zip_url: http://example.com/download.zip
84
+ another_url: another value
85
+ ```
86
+ 3. When your site is built, Jekyll will use the URL you specified, rather than the default one provided by GitHub.
87
+
88
+ *Note: You must remove the `site.` prefix, and each variable name (after the `github.`) should be indent with two space below `github:`.*
89
+
90
+ For more information, see [the Jekyll variables documentation](https://jekyllrb.com/docs/variables/).
91
+
92
+ ## Roadmap
93
+
94
+ See the [open issues](https://github.com/leapofazzam123/Primery/issues) for a list of proposed features (and known issues).
95
+
96
+ ## Project philosophy
97
+
98
+ The Primer theme is intended to make it quick and easy for GitHub Pages users to create their first (or 100th) website. The theme should meet the vast majority of users' needs out of the box, erring on the side of simplicity rather than flexibility, and provide users the opportunity to opt-in to additional complexity if they have specific needs or wish to further customize their experience (such as adding custom CSS or modifying the default layout). It should also look great, but that goes without saying.
99
+
100
+ ## Contributing
101
+
102
+ Interested in contributing to Primer? We'd love your help. Primer is an open source project, built one contribution at a time by users like you. See [the CONTRIBUTING file](docs/CONTRIBUTING.md) for instructions on how to contribute.
103
+
104
+ ### Previewing the theme locally
105
+
106
+ If you'd like to preview the theme locally (for example, in the process of proposing a change):
107
+
108
+ 1. Clone down the theme's repository (`git clone https://github.com/leapofazzam123/Primery`)
109
+ 2. `cd` into the theme's directory
110
+ 3. Run `script/bootstrap` to install the necessary dependencies
111
+ 4. Run `bundle exec jekyll serve` to start the preview server
112
+ 5. Visit [`localhost:4000`](http://localhost:4000) in your browser to preview the theme
113
+
114
+ ### Running tests
115
+
116
+ The theme contains a minimal test suite, to ensure a site with the theme would build successfully. To run the tests, simply run `script/cibuild`. You'll need to run `script/bootstrap` once before the test script will work.
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,10 @@
1
+ {% if site.google_analytics %}
2
+ <script>
3
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
5
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
6
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
7
+ ga('create', '{{ site.google_analytics }}', 'auto');
8
+ ga('send', 'pageview');
9
+ </script>
10
+ {% endif %}
@@ -0,0 +1,9 @@
1
+ <!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
2
+
3
+ <!-- Setup Google Analytics -->
4
+ {% include head-custom-google-analytics.html %}
5
+
6
+ <!-- You can set your favicon here -->
7
+ <!-- link rel="shortcut icon" type="image/x-icon" href="{{ '/favicon.ico' | relative_url }}" -->
8
+
9
+ <!-- end custom head snippets -->
@@ -0,0 +1,182 @@
1
+ {% capture tocWorkspace %}
2
+ {% comment %}
3
+ Copyright (c) 2017 Vladimir "allejo" Jimenez
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated documentation
7
+ files (the "Software"), to deal in the Software without
8
+ restriction, including without limitation the rights to use,
9
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the
11
+ Software is furnished to do so, subject to the following
12
+ conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+ OTHER DEALINGS IN THE SOFTWARE.
25
+ {% endcomment %}
26
+ {% comment %}
27
+ Version 1.1.0
28
+ https://github.com/allejo/jekyll-toc
29
+
30
+ "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
31
+
32
+ Usage:
33
+ {% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
34
+
35
+ Parameters:
36
+ * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
37
+
38
+ Optional Parameters:
39
+ * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
40
+ * class (string) : '' - a CSS class assigned to the TOC
41
+ * id (string) : '' - an ID to assigned to the TOC
42
+ * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
43
+ * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
44
+ * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
45
+ * item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
46
+ * submenu_class (string) : '' - add custom class(es) for each child group of headings; has support for '%level%' placeholder which is the current "submenu" heading level
47
+ * base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
48
+ * anchor_class (string) : '' - add custom class(es) for each anchor element
49
+ * skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
50
+
51
+ Output:
52
+ An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
53
+ generate the table of contents and will NOT output the markdown given to it
54
+ {% endcomment %}
55
+
56
+ {% capture newline %}
57
+ {% endcapture %}
58
+ {% assign newline = newline | rstrip %} <!-- Remove the extra spacing but preserve the newline -->
59
+
60
+ {% capture deprecation_warnings %}{% endcapture %}
61
+
62
+ {% if include.baseurl %}
63
+ {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "baseurl" has been deprecated, use "base_url" instead -->{{ newline }}{% endcapture %}
64
+ {% endif %}
65
+
66
+ {% if include.skipNoIDs %}
67
+ {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "skipNoIDs" has been deprecated, use "skip_no_ids" instead -->{{ newline }}{% endcapture %}
68
+ {% endif %}
69
+
70
+ {% capture jekyll_toc %}{% endcapture %}
71
+ {% assign orderedList = include.ordered | default: false %}
72
+ {% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
73
+ {% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
74
+ {% assign minHeader = include.h_min | default: 1 %}
75
+ {% assign maxHeader = include.h_max | default: 6 %}
76
+ {% assign nodes = include.html | strip | split: '<h' %}
77
+
78
+ {% assign firstHeader = true %}
79
+ {% assign currLevel = 0 %}
80
+ {% assign lastLevel = 0 %}
81
+
82
+ {% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
83
+
84
+ {% for node in nodes %}
85
+ {% if node == "" %}
86
+ {% continue %}
87
+ {% endif %}
88
+
89
+ {% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
90
+
91
+ {% if currLevel < minHeader or currLevel > maxHeader %}
92
+ {% continue %}
93
+ {% endif %}
94
+
95
+ {% assign _workspace = node | split: '</h' %}
96
+
97
+ {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
98
+ {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
99
+ {% assign htmlID = _idWorkspace[0] %}
100
+
101
+ {% assign _classWorkspace = _workspace[0] | split: 'class="' %}
102
+ {% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
103
+ {% assign htmlClass = _classWorkspace[0] %}
104
+
105
+ {% if htmlClass contains "no_toc" %}
106
+ {% continue %}
107
+ {% endif %}
108
+
109
+ {% if firstHeader %}
110
+ {% assign minHeader = currLevel %}
111
+ {% endif %}
112
+
113
+ {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
114
+ {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
115
+
116
+ {% if include.item_class and include.item_class != blank %}
117
+ {% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
118
+ {% endif %}
119
+
120
+ {% if include.submenu_class and include.submenu_class != blank %}
121
+ {% assign subMenuLevel = currLevel | minus: 1 %}
122
+ {% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
123
+ {% endif %}
124
+
125
+ {% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
126
+
127
+ {% if htmlID %}
128
+ {% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
129
+
130
+ {% if include.anchor_class %}
131
+ {% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
132
+ {% endif %}
133
+
134
+ {% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
135
+ {% elsif skipNoIDs == true %}
136
+ {% continue %}
137
+ {% else %}
138
+ {% capture listItem %}{{ anchorBody }}{% endcapture %}
139
+ {% endif %}
140
+
141
+ {% if currLevel > lastLevel %}
142
+ {% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
143
+ {% elsif currLevel < lastLevel %}
144
+ {% assign repeatCount = lastLevel | minus: currLevel %}
145
+
146
+ {% for i in (1..repeatCount) %}
147
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
148
+ {% endfor %}
149
+
150
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
151
+ {% else %}
152
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
153
+ {% endif %}
154
+
155
+ {% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
156
+
157
+ {% assign lastLevel = currLevel %}
158
+ {% assign firstHeader = false %}
159
+ {% endfor %}
160
+
161
+ {% assign repeatCount = minHeader | minus: 1 %}
162
+ {% assign repeatCount = lastLevel | minus: repeatCount %}
163
+ {% for i in (1..repeatCount) %}
164
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
165
+ {% endfor %}
166
+
167
+ {% if jekyll_toc != '' %}
168
+ {% assign rootAttributes = '' %}
169
+ {% if include.class and include.class != blank %}
170
+ {% capture rootAttributes %} class="{{ include.class | split: '.' | join: ' ' }}"{% endcapture %}
171
+ {% endif %}
172
+
173
+ {% if include.id and include.id != blank %}
174
+ {% capture rootAttributes %}{{ rootAttributes }} id="{{ include.id }}"{% endcapture %}
175
+ {% endif %}
176
+
177
+ {% if rootAttributes %}
178
+ {% assign nodes = jekyll_toc | split: '>' %}
179
+ {% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
180
+ {% endif %}
181
+ {% endif %}
182
+ {% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc }}
@@ -0,0 +1,36 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ site.lang | default: "en-US" }}">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+
8
+ {% seo %}
9
+ <link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
10
+ {% include head-custom.html %}
11
+ </head>
12
+ <body>
13
+ <div class="color-bg-canvas-inverse">
14
+ <header class="Header p-responsive px-3" style="padding:12px">
15
+ <div class="Header-item hide-lg hide-xl">
16
+ <a class="close-button Header-link d-flex flex-items-left" href="#menu" role="button" style="padding:8px"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="#fff" fill-rule="evenodd" d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"></path></svg></a>
17
+ </div>
18
+ <div class="Header-item Header-item--full">
19
+ <a class="Header-link f4 d-flex flex-items-center" href="{{ "/" | absolute_url }}"><h4 class="title">{{ site.title }}</h3></a>
20
+ </div>
21
+ </header>
22
+ </div>
23
+ <div class="Layout Layout--gutter-none p-responsive px-3 my-4">
24
+ <div class="Layout-main markdown-body">
25
+ {{ content }}
26
+ </div>
27
+ </div>
28
+ {% if site.github.private != true and site.github.license %}
29
+ <div class="footer p-responsive px-3 my-3 border-top border-gray-light mt-5 pt-3 text-right text-gray">
30
+ This site is open source. {% github_edit_link "Improve this page" %}.
31
+ </div>
32
+ {% endif %}
33
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
34
+ <script>anchors.add(); anchors.remove(".title");</script>
35
+ </body>
36
+ </html>
@@ -0,0 +1,4 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {{ content }}
@@ -0,0 +1,4 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {{ content }}
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+ <div class="Subhead">
5
+ <h3 class="title Subhead-heading">{{ post.title }}</h3>
6
+ <div class="Subhead-description">{{ post.date | date: "%A, %B %d, %Y" }}</div>
7
+ </div>
8
+ {{ content }}
@@ -0,0 +1,146 @@
1
+ // stylelint-disable selector-max-type, no-duplicate-selectors
2
+
3
+ // Default flash
4
+ .flash {
5
+ position: relative;
6
+ // stylelint-disable-next-line primer/spacing
7
+ padding: 20px $spacer-3;
8
+ border-style: $border-style;
9
+ border-width: $border-width;
10
+ border-radius: $border-radius;
11
+
12
+ p:last-child {
13
+ margin-bottom: 0;
14
+ }
15
+
16
+ .octicon {
17
+ // stylelint-disable-next-line primer/spacing
18
+ margin-right: 12px;
19
+ }
20
+ }
21
+
22
+ // Contain the flash messages
23
+ .flash-messages {
24
+ margin-bottom: $spacer-4;
25
+ }
26
+
27
+ // Close button
28
+ .flash-close {
29
+ float: right;
30
+ padding: $spacer-3;
31
+ margin: -$spacer-3;
32
+ text-align: center;
33
+ cursor: pointer;
34
+
35
+ // Undo `<button>` styles
36
+ background: none;
37
+ border: 0;
38
+ appearance: none;
39
+
40
+ &:hover {
41
+ opacity: 0.7;
42
+ }
43
+
44
+ &:active {
45
+ opacity: 0.5;
46
+ }
47
+
48
+ .octicon {
49
+ margin-right: 0;
50
+ }
51
+ }
52
+
53
+ // Action button
54
+ .flash-action {
55
+ float: right;
56
+ // stylelint-disable-next-line primer/spacing
57
+ margin-top: -3px;
58
+ margin-left: $spacer-4;
59
+ background-clip: padding-box;
60
+ }
61
+
62
+ //
63
+ // Color variations
64
+ //
65
+
66
+ .flash {
67
+ color: var(--color-alert-info-text);
68
+ background-image: linear-gradient(var(--color-alert-info-bg), var(--color-alert-info-bg));
69
+ border-color: var(--color-alert-info-border);
70
+
71
+ .octicon {
72
+ // stylelint-disable-next-line primer/colors
73
+ color: var(--color-alert-info-icon);
74
+ }
75
+ }
76
+
77
+ .flash-warn {
78
+ color: var(--color-alert-warn-text);
79
+ background-image: linear-gradient(var(--color-alert-warn-bg), var(--color-alert-warn-bg));
80
+ border-color: var(--color-alert-warn-border);
81
+
82
+ .octicon {
83
+ // stylelint-disable-next-line primer/colors
84
+ color: var(--color-alert-warn-icon);
85
+ }
86
+ }
87
+
88
+ .flash-error {
89
+ color: var(--color-alert-error-text);
90
+ background-image: linear-gradient(var(--color-alert-error-bg), var(--color-alert-error-bg));
91
+ border-color: var(--color-alert-error-border);
92
+
93
+ .octicon {
94
+ // stylelint-disable-next-line primer/colors
95
+ color: var(--color-alert-error-icon);
96
+ }
97
+ }
98
+
99
+ .flash-success {
100
+ color: var(--color-alert-success-text);
101
+ background-image: linear-gradient(var(--color-alert-success-bg), var(--color-alert-success-bg));
102
+ border-color: var(--color-alert-success-border);
103
+
104
+ .octicon {
105
+ // stylelint-disable-next-line primer/colors
106
+ color: var(--color-alert-success-icon);
107
+ }
108
+ }
109
+
110
+ //
111
+ // Layout variations
112
+ //
113
+
114
+ .flash-full {
115
+ // stylelint-disable-next-line primer/spacing
116
+ margin-top: -1px;
117
+ border-width: $border-width 0;
118
+ border-radius: 0;
119
+ }
120
+
121
+ // A banner rendered at the top of the page.
122
+ .flash-banner {
123
+ position: fixed;
124
+ top: 0;
125
+ z-index: 90;
126
+ width: 100%;
127
+ border-top: 0;
128
+ border-right: 0;
129
+ border-left: 0;
130
+ border-radius: 0;
131
+ }
132
+
133
+ // Makes sure the background is opaque to cover any content underneath
134
+ .flash-full,
135
+ .flash-banner {
136
+ background-color: var(--color-bg-canvas);
137
+ }
138
+
139
+ // FIXME deprecate this
140
+ .warning {
141
+ padding: $em-spacer-5;
142
+ // stylelint-disable-next-line primer/spacing
143
+ margin-bottom: 0.8em;
144
+ font-weight: $font-weight-bold;
145
+ background-color: var(--color-alert-warn-bg);
146
+ }