r-jekyll-theme 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +55 -0
  4. data/_config.yml +59 -0
  5. data/_includes/content/multipage.html +10 -0
  6. data/_includes/content/singlepage.html +7 -0
  7. data/_includes/footer.html +17 -0
  8. data/_includes/glossary.md +21 -0
  9. data/_includes/head.html +20 -0
  10. data/_includes/header.html +24 -0
  11. data/_includes/print/cover_back.html +20 -0
  12. data/_includes/print/cover_front.html +12 -0
  13. data/_includes/print/print_button.html +1 -0
  14. data/_includes/toc/pages.html +21 -0
  15. data/_includes/toc/sections.html +170 -0
  16. data/_layouts/default.html +21 -0
  17. data/_layouts/singlepage_dev.html +20 -0
  18. data/_sass/_variables.scss +30 -0
  19. data/_sass/r.scss +40 -0
  20. data/_sass/r/content/abbr.scss +61 -0
  21. data/_sass/r/content/code.scss +123 -0
  22. data/_sass/r/content/image.scss +32 -0
  23. data/_sass/r/content/link.scss +22 -0
  24. data/_sass/r/content/list.scss +64 -0
  25. data/_sass/r/content/note.scss +41 -0
  26. data/_sass/r/content/paragraph.scss +16 -0
  27. data/_sass/r/content/quote.scss +27 -0
  28. data/_sass/r/content/table.scss +76 -0
  29. data/_sass/r/content/title.scss +64 -0
  30. data/_sass/r/layout/columns.scss +36 -0
  31. data/_sass/r/layout/desktop.scss +187 -0
  32. data/_sass/r/layout/mobile.scss +242 -0
  33. data/_sass/r/layout/print.scss +204 -0
  34. data/_sass/r/styling/animations.scss +43 -0
  35. data/_sass/r/styling/button.scss +26 -0
  36. data/_sass/r/styling/formatting.scss +10 -0
  37. data/_sass/r/styling/selection.scss +5 -0
  38. data/_sass/r/styling/shadow.scss +33 -0
  39. data/assets/bicycle.jpg +0 -0
  40. data/assets/favicon.svg +52 -0
  41. data/assets/icons/500px.svg +83 -0
  42. data/assets/icons/500px_dark.svg +83 -0
  43. data/assets/icons/email.svg +52 -0
  44. data/assets/icons/email_dark.svg +52 -0
  45. data/assets/icons/github.svg +79 -0
  46. data/assets/icons/github_dark.svg +79 -0
  47. data/assets/icons/linkedin.svg +53 -0
  48. data/assets/icons/linkedin_dark.svg +53 -0
  49. data/assets/icons/twitter.svg +46 -0
  50. data/assets/icons/twitter_dark.svg +46 -0
  51. data/assets/main.scss +3 -0
  52. metadata +107 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 81eb3aacc7d93b1c168237111bcdf450877fba77c8be596f17a1bde6372eb023
4
+ data.tar.gz: 86e64a488e56534701fb25f3828048626d9bfbc82982f010eb8c27bd596813f0
5
+ SHA512:
6
+ metadata.gz: 54f3e4655d3a28a1c78ea4e7c02f73f3ad26cef9cc58a5fa00d9ad86660d1fa23ffadace6d9e8a6567014e4e8287ca98f918eb4430b3c779890941e2e2c5f086
7
+ data.tar.gz: 7b70e5dbf4b3df1fb1cb192f14ab9d40a57bb33e8817260cb6d3456d3fab3a5b5073a32f774261cf60307667e22b2afa98be036dbe2c17926d57db062112e695
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 rafalkaron
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.
@@ -0,0 +1,55 @@
1
+ # r-jekyll-theme
2
+
3
+ A simple red Jekyll theme perfect for portfolios and resumes.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your Jekyll site's `Gemfile`:
8
+
9
+ ```ruby
10
+ gem "r-jekyll-theme"
11
+ ```
12
+
13
+ And add this line to your Jekyll site's `_config.yml`:
14
+
15
+ ```yaml
16
+ theme: r-jekyll-theme
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install r-jekyll-theme
26
+
27
+ ## Usage
28
+
29
+ ### Data
30
+
31
+ * `contact.yml` - Edit this file to \
32
+
33
+ #### meta.yml
34
+
35
+ ### Layouts
36
+
37
+ ### SASS
38
+
39
+ ## Contributing
40
+
41
+ Bug reports and pull requests are welcome on GitHub at https://github.com/rafalkaron/r-jekyll-theme. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
42
+
43
+ ## Development
44
+
45
+ To set up your environment to develop this theme, run `bundle install`.
46
+
47
+ 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.
48
+
49
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass`, `_data` and `assets` tracked with Git will be bundled.
50
+ To add a custom directory to your theme-gem, please edit the regexp in `r.gemspec` accordingly.
51
+
52
+ ## License
53
+
54
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
55
+
@@ -0,0 +1,59 @@
1
+ ### Site metadata
2
+ title: r
3
+ author: Name Surname
4
+ description: Site description
5
+ keywords: comma, separated, keywords
6
+ since: 2020
7
+ logo: "Red"
8
+
9
+ ### Contact data
10
+ contact:
11
+ email:
12
+ id: 'mail@domain.com'
13
+ href: 'mailto:'
14
+ title: 'Email'
15
+ icon: "assets/icons/email.svg"
16
+ icon_dark: "assets/icons/email_dark.svg"
17
+ github:
18
+ id: 'github_id'
19
+ href: 'https://github.com/'
20
+ title: 'GitHub'
21
+ icon: "assets/icons/github.svg"
22
+ icon_dark: "assets/icons/github_dark.svg"
23
+ linkedin:
24
+ id: 'linkedin_id'
25
+ href: 'https://linkedin.com/in/'
26
+ title: 'LinkedIn'
27
+ icon: "assets/icons/linkedin.svg"
28
+ icon_dark: "assets/icons/linkedin_dark.svg"
29
+ twitter:
30
+ id: 'twitter_id'
31
+ href: 'https://twitter.com/'
32
+ title: 'Twitter'
33
+ icon: "assets/icons/twitter.svg"
34
+ icon_dark: "assets/icons/twitter_dark.svg"
35
+ 500px:
36
+ id: '500px_id'
37
+ href: 'https://500px.com/'
38
+ title: '500px'
39
+ icon: "assets/icons/500px.svg"
40
+ icon_dark: "assets/icons/500px_dark.svg"
41
+
42
+ ### Site configuration
43
+ livereload: true
44
+ exclude:
45
+ - LICENSE
46
+ - Gemfile
47
+ - Gemfile.lock
48
+ - README.md
49
+ markdown: kramdown
50
+ kramdown:
51
+ input: GFM
52
+
53
+ ### github-pages-remote theme
54
+ plugins:
55
+ - jekyll-remote-theme
56
+ remote_theme: rafalkaron/r-jekyll-theme@main
57
+
58
+ ### Uncomment for gem-based theme
59
+ #theme: r-jekyll-theme
@@ -0,0 +1,10 @@
1
+ {% assign content = content | strip | replace: '<h1', '</article><article class="level-1"><h1' | remove_first: "</article>" %}
2
+ {% assign content = content | strip | replace: '<h2', '</section><section class="level-2"><h2' | remove_first: "</section>" %}
3
+ {% assign content = content | strip | replace: '<h3', '</section><section class="level-3"><h3' %}
4
+ {% assign content = content | strip | replace: '<h4', '</section><section class="level-4"><h4' %}
5
+ {% assign content = content | strip | replace: '<h5', '</section><section class="level-5"><h5' %}
6
+ {% assign content = content | strip | replace: '<h6', '</section><section class="level-6"><h6' %}
7
+
8
+ {{ content }}
9
+
10
+ </article>
@@ -0,0 +1,7 @@
1
+ {% assign content_pages = site.pages | where: "layout", "singlepage" | sort: "order" %}
2
+ {% for p in content_pages %}
3
+ <section class="section" id="{{p.title | slugify}}">
4
+ {{- p.content | markdownify -}}
5
+ </section>
6
+
7
+ {% endfor %}
@@ -0,0 +1,17 @@
1
+
2
+
3
+ <footer id="site-footer">
4
+ <div class="footer-column footer-contact">
5
+ {%- if site.contact %}
6
+ {%- assign con = site.contact -%}
7
+ {%- for entry in con -%}
8
+ {%- assign key = entry | first -%}
9
+ {% if con[key].id %}
10
+ <a target="blank" class="footer-image-link" href="{{ con[key].href }}{{ con[key].id }}" title="{{ con[key].title }}"><img class="footer-icon" src="{{ con[key].icon }}"></a>
11
+ {%- endif -%}
12
+ {% endfor %}
13
+ {%- endif %}
14
+ </div>
15
+ <div class="footer-column footer-copyright">Copyright © {{site.since}}-{{ 'now' | date: "%Y" }} <a class="footer-link" href="{{site.email.href}}{{site.email.id}}" target="blank">{{site.author}}</a>.</div>
16
+ </footer>
17
+
@@ -0,0 +1,21 @@
1
+ *[SMEs]: Subject Matter Experts
2
+ *[SME]: Subject Matter Expert
3
+ *[DITA]: Darwin Information Typing Architecture
4
+ *[GUI]: Graphical User Interface
5
+ *[CLI]: Command Line Interface
6
+ *[CCMS]: Component Content Management System
7
+ *[Kanban]: An Agile framework focused on balancing demands with available capacity and handling bottlenecks.
8
+ *[Scrum]: An Agile framework that aims at completing planned items within a fixed timeframe.
9
+ *[Agile]: A work framework that involves self-organizing and cross-functional teams.
10
+ *[WMS]: Work Management System
11
+ *[XSLT]: Extensible Stylesheet Language Transformations
12
+ *[UX]: User Experience
13
+ *[UI]: User Interface
14
+ *[AC]: Acceptance Criteria
15
+ *[STR]: Steps to Reproduce
16
+ *[RAW]: Unprocessed image
17
+ *[QA]: Quality Assurance
18
+ *[SaaS]: Software as a Service
19
+ *[RFP]: Request for Proposal
20
+ *[RFI]: Request for Information
21
+ *[RFQ]: Request for Quotation
@@ -0,0 +1,20 @@
1
+
2
+
3
+ <head>
4
+ {%- assign title = page.title -%}
5
+ {%- if site.title -%}
6
+ {% assign title = site.title | append: " | " | append: page.title %}
7
+ {%- endif -%}
8
+ {% if page.title == nil %}
9
+ {% assign title = site.title | append: " | " | append: "404" %}
10
+ {% endif %}
11
+ <title>{{ title }}</title>
12
+ <meta charset="utf-8">
13
+ <meta name="author" content="{{ site.author }}">
14
+ <meta name="description" content="{{ site.description }}">
15
+ <meta name="keywords" content="{{ site.keywords }}">
16
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
18
+ <link rel="icon" type="image/ico" href="assets/favicon.svg">
19
+ <link rel="stylesheet" href="assets/main.css">
20
+ </head>
@@ -0,0 +1,24 @@
1
+
2
+
3
+ <header id="site-header" role="banner">
4
+ <div id="site-logo-container">
5
+ {%- if site.logo %}
6
+ <a href="index.html" id="site-logo">{{ site.logo }}</a>
7
+ {%- endif %}
8
+ </div>
9
+
10
+ <nav id="site-nav">
11
+ <div id="site-nav-page">
12
+ <div id="toc-pages">
13
+ {% include toc/pages.html -%}
14
+ </div>
15
+ </div>
16
+ <div id="site-nav-section">
17
+ <h1 class="print print-header">Contents</h1>
18
+ <div id="toc-sections">
19
+ {% include toc/sections.html html=content anchor_class="nav-link" h_min=1 h_max=1 sanitize=true %}
20
+ </div>
21
+ </div>
22
+ </nav>
23
+ </header>
24
+
@@ -0,0 +1,20 @@
1
+ <div class="print" id="cover-back">
2
+ <div id="cover-back-content">
3
+
4
+ <div class="footer-column footer-contact">
5
+ <h1 class="print-header">Contact</h1>
6
+ {%- if site.contact %}
7
+ {%- assign con = site.contact -%}
8
+ <ul>
9
+ {%- for entry in con -%}
10
+ {%- assign key = entry | first -%}
11
+ {% if con[key].id %}
12
+ <li><img class="footer-icon" src="{{ con[key].icon_dark }}"><a target="blank" class="footer-image-link" href="{{ con[key].href }}{{ con[key].id }}" title="{{ con[key].title }}">{{ con[key].href | remove_first: 'mailto:' | remove_first: 'https://' }}{{ con[key].id }}</a></li>
13
+ {%- endif -%}
14
+ {% endfor %}
15
+ </ul>
16
+ {%- endif %}
17
+ </div>
18
+
19
+ </div>
20
+ </div>
@@ -0,0 +1,12 @@
1
+ <div class="print" id="cover-front">
2
+ <div id="cover-front-content">
3
+ {%- if site.logo %}
4
+ <a target="blank" href="index.html" id="site-logo">{{ site.logo }}</a>
5
+ {%- endif %}
6
+ <div id="site-reference-container">
7
+ <a target="blank" id="site-reference" href="index.html">rafalkaron.github.io</a>
8
+ <div class="footer-column copyright">Copyright © {{site.since}}-{{ 'now' | date: "%Y" }} <a class="footer-link" href="{{site.email.href}}{{site.email.id}}" target="blank">{{site.author}}</a>.</div>
9
+ </div>
10
+
11
+ </div>
12
+ </div>
@@ -0,0 +1 @@
1
+ <input id="print-button" class="screen" type="button" value="Print {{ page.title }}" onClick="window.print()">
@@ -0,0 +1,21 @@
1
+ {%- assign default_paths = site.pages | where: "layout", "default" | sort: "order" | map: "path" -%}
2
+ {%- assign page_paths = site.header_pages | default: default_paths -%}
3
+
4
+
5
+ <ul class="{{ page.title | slugify }}">
6
+ {%- for path in page_paths %}
7
+ {%- assign toc_page = site.pages | where: "path", path | first -%}
8
+ {%- assign link_title = toc_page.title -%}
9
+ {%- if toc_page.navtitle -%}
10
+ {% assign link_title = toc_page.navtitle %}
11
+ {% endif %}
12
+ <li><a href="{{ toc_page.url | relative_url }}" class="nav-link {{ toc_page.title | slugify }}">{{ link_title | escape }}</a></li>
13
+ {%- endfor %}
14
+ </ul>
15
+
16
+ <style>
17
+ ul.{{ page.title | slugify }} a.{{ page.title | slugify }} {
18
+ text-decoration: underline;
19
+ }
20
+ </style>
21
+
@@ -0,0 +1,170 @@
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.0.14
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
+ * baseurl (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
+ * skipNoIDs (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 my_toc %}{% endcapture %}
57
+ {% assign orderedList = include.ordered | default: false %}
58
+ {% assign skipNoIDs = include.skipNoIDs | default: false %}
59
+ {% assign minHeader = include.h_min | default: 1 %}
60
+ {% assign maxHeader = include.h_max | default: 6 %}
61
+ {% assign nodes = include.html | split: '<h' %}
62
+ {% assign firstHeader = true %}
63
+ {% assign previousLevel = 0 %}
64
+
65
+ {% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
66
+
67
+ {% for node in nodes %}
68
+ {% if node == "" %}
69
+ {% continue %}
70
+ {% endif %}
71
+
72
+ {% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
73
+
74
+ {% if headerLevel < minHeader or headerLevel > maxHeader %}
75
+ {% continue %}
76
+ {% endif %}
77
+
78
+ {% assign _workspace = node | split: '</h' %}
79
+
80
+ {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
81
+ {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
82
+ {% assign html_id = _idWorkspace[0] %}
83
+
84
+ {% assign _classWorkspace = _workspace[0] | split: 'class="' %}
85
+ {% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
86
+ {% assign html_class = _classWorkspace[0] %}
87
+
88
+ {% if html_class contains "no_toc" %}
89
+ {% continue %}
90
+ {% endif %}
91
+
92
+ {% if firstHeader %}
93
+ {% assign firstHeader = false %}
94
+ {% assign minHeader = headerLevel %}
95
+ {% endif %}
96
+
97
+ {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
98
+ {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
99
+
100
+ {% assign indentAmount = headerLevel | minus: minHeader %}
101
+ {% assign space = '' %}
102
+ {% for i in (1..indentAmount) %}
103
+ {% assign space = space | prepend: ' ' %}
104
+ {% endfor %}
105
+
106
+ {% if include.item_class and include.item_class != blank %}
107
+ {% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
108
+ {% endif %}
109
+
110
+ {% capture anchor_body %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
111
+ {% capture anchor_body %}{{ anchor_body | replace: "|", "\|" }}{% endcapture %}
112
+
113
+ {% if html_id %}
114
+ {% capture list_item %}[{{ anchor_body }}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% endcapture %}
115
+ {% elsif skipNoIDs == true %}
116
+ {% continue %}
117
+ {% else %}
118
+ {% capture list_item %}{{ anchor_body }}{% endcapture %}
119
+ {% endif %}
120
+
121
+ <!--
122
+ If we have a submenu class and we're unindenting, then we need to add a "closing" class to this group of bullet
123
+ points
124
+ -->
125
+ {% if include.submenu_class and previousLevel > indentAmount %}
126
+ <!--
127
+ `space` is the current indentation, so we if want to close off the previous grouping, we need to add one
128
+ more level of indentation
129
+ -->
130
+ {% assign submenuIndentation = space | prepend: ' ' %}
131
+
132
+ {% capture my_toc %}{{ my_toc }}
133
+ {{ submenuIndentation }}{:.{{ include.submenu_class | replace: '%level%', previousLevel }}}{% endcapture %}
134
+ {% endif %}
135
+
136
+ {% capture my_toc %}{{ my_toc }}
137
+ {{ space }}{{ listModifier }} {{ listItemClass }} {{ list_item }}{% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
138
+
139
+ {% assign previousLevel = indentAmount %}
140
+ {% endfor %}
141
+
142
+ {% if include.class and include.class != blank %}
143
+ {% capture my_toc %}{:.{{ include.class }}}
144
+ {{ my_toc | lstrip }}{% endcapture %}
145
+ {% endif %}
146
+
147
+ {% if include.id %}
148
+ {% capture my_toc %}{: #{{ include.id }}}
149
+ {{ my_toc | lstrip }}{% endcapture %}
150
+ {% endif %}
151
+
152
+ <!--
153
+ If we have a submenu class, we need to close off all the remaining list item groups so that submenu classes are
154
+ applied correctly to them
155
+ -->
156
+ {% if include.submenu_class != blank %}
157
+ <!-- The last level of indentation that we were at, we need to work backwards from there closing each group -->
158
+ {% for i in (1..previousLevel) %}
159
+ {% assign lvl = previousLevel | plus: 1 | minus: i %} <!-- Invert the indent level based on `i` -->
160
+ {% assign closingSpace = '' %}
161
+
162
+ {% for i in (1..lvl) %}
163
+ {% assign closingSpace = closingSpace | prepend: ' ' %}
164
+ {% endfor %}
165
+
166
+ {% capture my_toc %}{{ my_toc }}
167
+ {{ closingSpace }}{:.{{ include.submenu_class | replace: '%level%', lvl }}}{% endcapture %}
168
+ {% endfor %}
169
+ {% endif %}
170
+ {% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}