classic-jekyll-theme 1.9.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -359
  3. data/_data/setup.yml +62 -10
  4. data/_data/text-for.yml +3 -0
  5. data/_includes/banner-area.html +57 -0
  6. data/_includes/banner-icon.html +23 -0
  7. data/_includes/banner-title-area.html +30 -0
  8. data/_includes/cblock-row.html +15 -3
  9. data/_includes/cblock.html +16 -1
  10. data/_includes/disqus-comments.html +39 -0
  11. data/_includes/footer.html +11 -0
  12. data/_includes/google-analytics.html +18 -8
  13. data/_includes/head.html +71 -30
  14. data/_includes/menubar-icon.html +23 -0
  15. data/_includes/menubar.html +428 -0
  16. data/_includes/secondary-column.html +30 -9
  17. data/_includes/tertiary-column.html +7 -3
  18. data/_includes/vertical-menu.html +284 -0
  19. data/_includes/widgets/browser-info.html +5 -2
  20. data/_includes/widgets/categories.html +21 -0
  21. data/_includes/widgets/cookie-consent.html +10 -10
  22. data/_includes/widgets/older-posts.html +63 -42
  23. data/_includes/widgets/recent-posts.html +14 -8
  24. data/_includes/widgets/social-media-res/icon-github.html +7 -1
  25. data/_includes/widgets/social-media-res/icon-github.svg +1 -1
  26. data/_includes/widgets/social-media-res/icon-twitter.html +7 -1
  27. data/_includes/widgets/social-media-res/icon-twitter.svg +1 -1
  28. data/_includes/widgets/social-media.html +19 -10
  29. data/_includes/widgets/subscribe.html +9 -4
  30. data/_includes/widgets/youtube-player.html +8 -8
  31. data/_layouts/banner-layout.html +1 -0
  32. data/_layouts/category-page.html +33 -33
  33. data/_layouts/content-blocks.html +1 -3
  34. data/_layouts/default.html +129 -55
  35. data/_layouts/home.html +4 -4
  36. data/_layouts/page.html +13 -12
  37. data/_layouts/post.html +13 -12
  38. data/_sass/classic-jekyll-theme.scss +1143 -155
  39. data/_sass/classic/_banner-area.scss +548 -0
  40. data/_sass/classic/_body.scss +15 -0
  41. data/_sass/classic/_columns.scss +122 -0
  42. data/_sass/classic/{_support.scss → _custom.scss} +12 -4
  43. data/_sass/classic/_footer.scss +31 -0
  44. data/_sass/classic/_menubar.scss +509 -0
  45. data/_sass/classic/_normalize-override.scss +9 -9
  46. data/_sass/classic/_normalize.scss +13 -27
  47. data/_sass/classic/_page.scss +1 -1
  48. data/_sass/classic/_post.scss +1 -1
  49. data/_sass/classic/_theme-internal.scss +37 -0
  50. data/_sass/classic/_theme-library.scss +85 -0
  51. data/_sass/classic/_vertical-menu.scss +237 -0
  52. data/_sass/classic/_widgets.scss +88 -0
  53. data/assets/img/banner-area-layout.png +0 -0
  54. data/assets/img/cog-wheels-120x68.png +0 -0
  55. data/assets/img/cog-wheels-240x135.png +0 -0
  56. data/assets/img/cog-wheels-30x17.png +0 -0
  57. data/assets/img/cog-wheels-60x43.png +0 -0
  58. data/assets/img/column-panel-layout.png +0 -0
  59. data/assets/img/test-pattern-110x83.png +0 -0
  60. data/assets/img/test-pattern-1280x800.png +0 -0
  61. data/assets/img/test-pattern-220x165.png +0 -0
  62. data/assets/img/test-pattern-55x42.png +0 -0
  63. data/assets/img/test-pattern-640x400.png +0 -0
  64. data/assets/img/top-level-layout.png +0 -0
  65. data/icons/android-chrome-192x192.png +0 -0
  66. data/icons/apple-touch-icon.png +0 -0
  67. data/icons/browserconfig.xml +9 -0
  68. data/icons/favicon-16x16.png +0 -0
  69. data/icons/favicon-32x32.png +0 -0
  70. data/icons/favicon.ico +0 -0
  71. data/icons/manifest.json +13 -0
  72. data/icons/mstile-150x150.png +0 -0
  73. data/icons/safari-pinned-tab.svg +14 -0
  74. data/pages/about/about.md +4 -1
  75. data/pages/classic/01-features.md +36 -0
  76. data/pages/classic/02-setup.md +113 -0
  77. data/pages/classic/03-pages-and-posts.md +21 -0
  78. data/pages/classic/04-posts.md +18 -0
  79. data/pages/classic/05-menus.md +122 -0
  80. data/pages/classic/06-categories.md +38 -0
  81. data/pages/classic/07-terminology.md +35 -0
  82. data/pages/classic/08-versioning.md +23 -0
  83. data/pages/contact/contact.md +7 -2
  84. data/pages/jekyll/01-jekyll.md +42 -0
  85. data/pages/jekyll/02-speed.md +88 -0
  86. data/pages/jekyll/03-ruby.md +19 -0
  87. data/pages/layouts/banner-main.md +36 -0
  88. data/pages/{other → layouts}/blocks.md +4 -3
  89. data/pages/layouts/landing-page.md +21 -0
  90. data/pages/layouts/no-sec-no-ter.md +28 -0
  91. data/pages/layouts/sec-left-no-ter.md +28 -0
  92. data/pages/layouts/sec-left-ter-right.md +28 -0
  93. data/pages/layouts/sec-right-no-ter.md +28 -0
  94. data/pages/layouts/sec-right-ter-left.md +28 -0
  95. data/pages/{more/more.md → menus/landing-page.md} +2 -5
  96. data/pages/menus/submenu-subsections.md +72 -0
  97. data/pages/menus/submenu1.md +22 -0
  98. data/pages/menus/submenu2.md +21 -0
  99. data/pages/menus/submenu3.md +30 -0
  100. metadata +72 -24
  101. data/_includes/disqus_comments.html +0 -25
  102. data/_includes/navbanner.html +0 -232
  103. data/_layouts/navbanner-layout.html +0 -1
  104. data/_sass/classic/_formatting.scss +0 -336
  105. data/_sass/classic/_layout.scss +0 -331
  106. data/_sass/classic/_widget-support.scss +0 -42
  107. data/navbanner.md +0 -5
  108. data/pages/classic/categories.md +0 -13
  109. data/pages/classic/classic.md +0 -12
  110. data/pages/classic/known-problems.md +0 -14
  111. data/pages/classic/pages.md +0 -23
  112. data/pages/classic/posts.md +0 -19
  113. data/pages/other/example-page.md +0 -12
  114. data/pages/other/other.md +0 -10
@@ -12,6 +12,9 @@ tCategories: Categories
12
12
  # Title on categories page
13
13
  tCategory: Category
14
14
 
15
+ # When no categories are present
16
+ tNoCategories: None
17
+
15
18
  # Message on category page if no posts have been found
16
19
  tNoBlogpostFound: No blogposts found for this category
17
20
 
@@ -0,0 +1,57 @@
1
+
2
+ <!-- include banner-area.html -->
3
+ {%- comment -%}<!--
4
+
5
+ Layout of the banner area.
6
+
7
+ The banner area is complex in the sense that some elements are out of the DOM permanently and some elements are out of the DOM depending on the settings in the site.data.setup file.
8
+
9
+ The height of the 'banner' class must be specified explicitly in the theme.scss file.
10
+
11
+ The icon, title and label are placed on top of the banner using relative/absolute positioning.
12
+
13
+ The conditional part for 'top-fixed' is present to make sure that the content of the column-panel is properly offset from the top of the screen such that no partion of it is positioned behind the banner-area. It has the same classes and structure as the banner-area so that it auto-adjusts for menubar switching (using the banner-menu-symbol).
14
+
15
+ If changes are made to this file that increase the height of the banner-area that is placed outside the DOM, the HTML code can compensate for the height increase by specifying a height for the add-to-banner-area-height class.
16
+
17
+ -->{%- endcomment -%}
18
+
19
+ {%- if site.data.setup.banner-position == 'top-fixed' -%}
20
+ {%- assign banner-classes = 'banner-area banner-area-outside-dom' -%}
21
+ {%- else -%}
22
+ {% assign banner-classes = 'banner-area banner-area-in-dom' -%}
23
+ {%- endif %}
24
+ <input type="checkbox" id="banner-menu-symbol">
25
+ <div class="{{ banner-classes }}">
26
+ <div class="banner"></div>
27
+ {%- comment -%}<!-- The following elements are permanently outside the DOM -->{%- endcomment %}
28
+ <div class="icon-container">
29
+ {% include banner-icon.html %}
30
+ </div>
31
+ <div class="title-area-container">
32
+ {% include banner-title-area.html %}
33
+ </div>
34
+ <div class="label-container"><label for="banner-menu-symbol"><p><!-- empty but necessary! --></p></label></div>
35
+ {%- comment -%}<!-- This is part of the DOM again (unless the banner area is outside the DOM) -->{%- endcomment %}
36
+ <div class="menubar-top-separator"></div>
37
+ {% include menubar.html %}
38
+ <div class="menubar-bottom-separator"></div>
39
+ </div>
40
+ {%- if site.data.setup.banner-position == 'top-fixed' %}
41
+ <div class="banner-area invisible">
42
+ <div class="banner"></div>
43
+ <div class="menubar-top-separator"></div>
44
+ <div class="menubar">
45
+ {% include menubar-icon.html %}
46
+ <div class="item">
47
+ <div class="title">
48
+ <div class=symbol><p></p></div>
49
+ <div class="text"><a><p>Home</p></a></div>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ <div class="menubar-bottom-separator"></div>
54
+ <div class="add-to-banner-area-height"></div>
55
+ </div>
56
+ {% endif -%}
57
+ <!-- end of include banner-area.html -->
@@ -0,0 +1,23 @@
1
+
2
+ <!-- include banner-icon.html -->
3
+ {%- comment -%}<!--
4
+
5
+ This file is for customization of the banner icon.
6
+
7
+ Do not change the name of the class of this div!
8
+
9
+ If no icon is needed, don't put anything in here, but keep the file.
10
+
11
+ Note that a simple banner icon can also be assigned through the settings in the classic-jekyll-theme.scss file.
12
+
13
+ Be aware that this banner-icon is arranged outside the DOM and as such does not drive the size of the the banner.
14
+
15
+ To display/not-display and elements use the '.display-flex-...' classes en '.display-block-...' classes. (See _sass/_theme-library.scss for more.
16
+
17
+ Example: <div class='myclass display-block-narrow'><p>Hello</p></div>
18
+
19
+ Will display the text "Hello" only when the narrow layout is in use.
20
+
21
+ -->{%- endcomment %}
22
+ <div class="banner-icon"></div>
23
+ <!-- end of include banner-icon.html -->
@@ -0,0 +1,30 @@
1
+
2
+ <!-- include banner-title-area.html -->
3
+ {%- comment -%}<!--
4
+
5
+ This file is for customization of the title and subtitle in the banner.
6
+
7
+ Do not change the name of any of the classes!
8
+
9
+ If customization is needed, don't put anything in here, but keep the file.
10
+
11
+ Note that simple title & subtitle can also be assigned through the settings in the classic-jekyll-theme.scss file.
12
+
13
+ Be aware that this title-area is arranged outside the DOM and as such does not drive the size of the the banner.
14
+
15
+ To display/not-display and elements use the '.display-flex-...' classes en '.display-block-...' classes. (See _sass/_theme-library.scss for more.
16
+
17
+ Example: <div class='myclass display-block-narrow'><p>Hello</p></div>
18
+
19
+ Will display the text "Hello" only when the narrow layout is in use.
20
+
21
+ -->{%- endcomment %}
22
+ <div class="title-area">
23
+ <div class="title">
24
+ <p>{{ site.title }}</p>
25
+ </div>
26
+ <div class="subtitle">
27
+ <p>{{ site.data.setup.subtitle }}</p>
28
+ </div>
29
+ </div>
30
+ <!-- end of include banner-title-area.html -->
@@ -1,6 +1,18 @@
1
+
2
+ <!-- include cblock-row.html -->
3
+ {% comment %}<!--
4
+
5
+ Layout of a single 'cblock'.
6
+
7
+ Parameters:
8
+ title: The title for the row of cblocks to be displayed.
9
+ cblocks: A sequence of cblock's that must be displayed in a row.
10
+
11
+ -->{%- endcomment -%}
1
12
  <h2 class="cblock-row-title">{{ include.title }}</h2>
2
13
  <div class="cblock-row">
3
- {% for cblock in include.cblocks %}
4
- {% include cblock.html name=cblock.name image=cblock.image description=cblock.description link=cblock.link %}
5
- {% endfor %}
14
+ {%- for cblock in include.cblocks -%}
15
+ {%- include cblock.html name=cblock.name image=cblock.image description=cblock.description link=cblock.link -%}
16
+ {%- endfor %}
6
17
  </div>
18
+ <!-- end of include cblock-row.html -->
@@ -1,5 +1,20 @@
1
+
2
+ <!-- include cblock.html -->
3
+ {% comment %}<!--
4
+
5
+ Layout of a single 'cblock'.
6
+
7
+ Parameters:
8
+ link: A link for more information about the item.
9
+ image: A link that points to an image to be displayed for the item.
10
+ name: The name of the item.
11
+ description: A short description of the item.
12
+
13
+ -->{%- endcomment -%}
14
+
1
15
  <div class="cblock">
2
16
  <a href={{ include.link }}><img class="cblock-image" src={{ include.image }}></a>
3
17
  <p class="cblock-name"><a href={{ include.link }}>{{ include.name }}</a></p>
4
18
  <p class="cblock-description">{{ include.description }}</p>
5
- </div>
19
+ </div>
20
+ <!-- end of include cblock.html -->
@@ -0,0 +1,39 @@
1
+
2
+ <!-- include disqus-comments.html -->
3
+ {%- comment -%}<!--
4
+
5
+ Layout of a disqus comment section.
6
+
7
+ Include this in a layout where the disqus comments must be placed.
8
+
9
+ Control:
10
+ page.comments: (yes | no) Turn the comment section on or of.
11
+ jekyll.environment: The disqus comments are only created for 'production' code.
12
+ site.url: Is prepended to the page.url to build the required disqus-url that allows disqus to mange the comments.
13
+ site.github.url: Same as site.url, but for sites hosted on github.
14
+ site.disqus.shortname: The disqus identifier for the site (user)
15
+
16
+ -->{%- endcomment -%}
17
+
18
+ {%- if page.comments != false and jekyll.environment == "production" -%}
19
+ {%- if site.url -%}
20
+ {%- assign disqus_url = page.url | prepend: site.url -%}
21
+ {%- elsif site.github.url -%}
22
+ {%- assign disqus_url = page.url | prepend: site.github.url -%}
23
+ {%- endif %}
24
+ <div id="disqus_thread"></div>
25
+ <script>
26
+ var disqus_config = function () {
27
+ this.page.url = '{{ disqus_url }}';
28
+ this.page.identifier = '{{ disqus_url }}';
29
+ };
30
+
31
+ (function() {
32
+ var d = document, s = d.createElement('script');
33
+ s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
34
+ s.setAttribute('data-timestamp', +new Date());
35
+ (d.head || d.body).appendChild(s);
36
+ })();
37
+ </script>
38
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
39
+ {% endif -%}
@@ -1,5 +1,16 @@
1
+
2
+ <!-- include footer.html -->
3
+ {%- comment -%}<!--
4
+
5
+ Layout of the footer.
6
+
7
+ Configuration:
8
+ site.description: The text to be displayed.
9
+
10
+ -->{%- endcomment %}
1
11
  <footer>
2
12
  <div>
3
13
  <p>{{ site.description | escape }}</p>
4
14
  </div>
5
15
  </footer>
16
+ <!-- end of include footer.html -->
@@ -1,11 +1,21 @@
1
- <script>
2
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
6
1
 
7
- ga('create', '{{ site.google_analytics }}', 'auto');
8
- ga('send', 'pageview');
2
+ <!-- include google-analytics.html -->
3
+ {% comment %}<!--
4
+
5
+ The script that allows the use of google analytics.
6
+
7
+ Configuration:
8
+ site.google_analytics: The site-id for the site issued by google analytics.
9
9
 
10
+ -->{%- endcomment -%}
11
+ <script>
12
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
13
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
14
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
15
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
16
+
17
+ ga('create', '{{ site.google_analytics }}', 'auto');
18
+ ga('send', 'pageview');
10
19
  </script>
11
-
20
+ <!-- end of include google-analytics.html -->
21
+
@@ -1,33 +1,74 @@
1
+
2
+ <!-- include head.html -->
3
+ {%- comment -%}<!--
4
+
5
+ Layout of the header included in all html pages.
6
+
7
+ The favicons are generated by http://realfavicongenerator.net.
8
+ To use your own set of favicons, visit that site, upload your favicon image and select the option that the favicons
9
+ are stored inside a folder called 'icons'. The download that folder and replace the contents of the 'icons' folder
10
+ with the files generated by the realfavicongenerator.
11
+
12
+ Alternatively disable the favicons by setting site.data.setup.realfavicongenerator to 'no'.
13
+
14
+ Configuration:
15
+ site.title: The title to be used when page.title is not set.
16
+ page.title: The title to be used for the <title> element.
17
+ site.description: The description to be used when the page.excerpt is not set.
18
+ page.excerpt: The description for the <meta> element with the name 'description'.
19
+ site.data.setup.use-separate-banner-menubar-file: Used to determine if JQuery must be loaded.
20
+ site.data.setup.drop-down-menu: Used to determine if JQuery must be loaded.
21
+ site.data.setup.enable-cookies-policy: Used to determine if the cookies consent must be used.
22
+ site.google_analytics: Used to determine if google-analytics must be used.
23
+
24
+ -->{%- endcomment %}
1
25
  <head>
2
- <meta charset="utf-8">
3
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
- <meta name="viewport" content="width=device-width, initial-scale=1">
5
-
6
- <title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
7
-
8
- {% if page.excerpt %}{% assign description = page.excerpt %}{% else %}{% assign description = site.description %}{% endif %}
9
- <meta name="description" content="{{ description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
10
-
11
- <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
12
- <link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
13
- <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
14
-
15
- <!-- Include JQuery from google -->
16
- {% if site.data.setup.use-separate-navbanner %}
17
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
18
- {% endif %}
19
-
20
- <!-- Include google analytics for production build and if necessary -->
21
- {% if jekyll.environment == 'production' and site.google_analytics %}
22
- {% include google-analytics.html %}
23
- {% endif %}
24
-
25
- <!-- Include cookie consent for production build when enabled -->
26
- {% if jekyll.environment == 'production' %}
27
- {% if site.data.setup.enable-cookies-policy %}
28
- {% include widgets/cookie-consent.html %}
29
- {% endif %}
30
- {% endif %}
26
+ <meta charset="utf-8">
27
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
28
+ <meta name="viewport" content="width=device-width, initial-scale=1">
31
29
 
32
- </head>
30
+ {%- if site.data.setup.realfavicongenerator %}
31
+ <link rel="apple-touch-icon" sizes="180x180" href="{{ "/icons/apple-touch-icon.png" | relative_url }}">
32
+ <link rel="icon" type="image/png" sizes="32x32" href="{{ "/icons/favicon-32x32.png" | relative_url }}">
33
+ <link rel="icon" type="image/png" sizes="16x16" href="{{ "/icons/favicon-16x16.png" | relative_url }}">
34
+ <link rel="manifest" href="{{ "/icons/manifest.json" | relative_url }}">
35
+ <link rel="mask-icon" href="{{ "/icons/safari-pinned-tab.svg" | relative_url }}" color="#5bbad5">
36
+ <link rel="shortcut icon" href="{{ "/icons/favicon.ico" | relative_url }}">
37
+ <meta name="msapplication-config" content="{{ "/icons/browserconfig.xml" | relative_url }}">
38
+ <meta name="theme-color" content="#ffffff">
39
+ {%- endif %}
40
+
41
+ <title>{%- if page.title -%}{{ page.title | escape }}{%- else -%}{{ site.title | escape }}{%- endif -%}</title>
33
42
 
43
+ {%- if page.excerpt -%}
44
+ {%- assign description = page.excerpt -%}
45
+ {%- else -%}
46
+ {%- assign description = site.description -%}
47
+ {%- endif %}
48
+
49
+ <meta name="description" content="{{ description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
50
+
51
+ <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
52
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
53
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
54
+
55
+ {%- comment -%}<!-- Include JQuery from google -->{%- endcomment -%}
56
+
57
+ {%- if site.data.setup.use-separate-banner-menubar-file %}
58
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
59
+ {%- endif -%}
60
+
61
+ {%- comment -%}<!-- Include google analytics for production build and if necessary -->{%- endcomment -%}
62
+
63
+ {%- if jekyll.environment == 'production' and site.google_analytics -%}
64
+ {%- include google-analytics.html -%}
65
+ {%- endif -%}
66
+
67
+ {%- comment -%}<!-- Include cookie consent for production build when enabled -->{%- endcomment -%}
68
+ {%- if jekyll.environment == 'production' -%}
69
+ {%- if site.data.setup.enable-cookies-policy -%}
70
+ {%- include widgets/cookie-consent.html -%}
71
+ {%- endif -%}
72
+ {%- endif %}
73
+ </head>
74
+ <!-- end of include head.html -->
@@ -0,0 +1,23 @@
1
+
2
+ <!-- include menubar-icon.html -->
3
+ {%- comment -%}<!--
4
+
5
+ This file is for customization of the menubar icon.
6
+
7
+ Do not change the name of the class of this div!
8
+
9
+ If no icon is needed, don't put anything in here, but keep the file.
10
+
11
+ Note that a simple menubar icon can also be assigned through the settings in the classic-jekyll-theme.scss file.
12
+
13
+ The content here will drive the height of the menubar if the '$menubar-height-...' is set to 'auto'.
14
+
15
+ To display/not-display and elements use the '.display-flex-...' classes en '.display-block-...' classes. (See _sass/_theme-library.scss for more.
16
+
17
+ Example: <div class='myclass display-block-narrow'><p>Hello</p></div>
18
+
19
+ Will display the text "Hello" only when the narrow layout is in use.
20
+
21
+ -->{%- endcomment %}
22
+ <div class="menubar-icon"></div>
23
+ <!-- end of include menubar-icon.html -->
@@ -0,0 +1,428 @@
1
+
2
+ <!-- include menubar.html -->
3
+ <nav class="menubar">
4
+
5
+ {%- comment -%}<!-- include the menu icon -->{%- endcomment -%}
6
+
7
+ {%- include menubar-icon.html -%}
8
+
9
+ {%- comment -%}<!-- Create a list of top menu item titles -->{%- endcomment -%}
10
+
11
+ {%- assign topTitles = "" | split: "" -%}
12
+ {%- assign sortedPages = site.pages | where:'menuInclude', true | where_exp:'item', 'item.menuTopTitle != nil' | sort: 'menuTopIndex', 'last' -%}
13
+ {%- for ape in sortedPages -%}{%- assign topTitles = topTitles | push: ape.menuTopTitle -%}{%- endfor -%}
14
+ {%- assign topTitles = topTitles | uniq -%}
15
+
16
+ {%- comment -%}<!-- Home page -->{%- endcomment -%}
17
+ {%- assign home = 'Home' -%}
18
+ {%- if site.data.text-for.tHome -%}{%- assign home = site.data.text-for.tHome -%}{%- endif -%}
19
+ {%- if page.url == '/' %}
20
+ <div class="item isActiveSelection">
21
+ {%- else %}
22
+ <div class="item">
23
+ {%- endif %}
24
+ <div class="title">
25
+ <label class="symbol"><p></p></label>
26
+ <div class="text"><a href="{{ site.url }}{{ site.baseurl }}/index.html"><p>{{ home }}</p></a></div>
27
+ </div>
28
+ </div>
29
+
30
+ {%- comment -%}<!-- Page menus -->{%- endcomment -%}
31
+ {%- for topTitle in topTitles -%}
32
+
33
+ {%- if jekyll.environment != 'production' and site.data.setup.fast-content-build -%}{%- else -%}
34
+
35
+ {%- comment -%}<!-- note: the html comment tags are for editor coloring support
36
+
37
+ Due to the poor support for variables in Liquid we have to resort to some fairly laborious code.
38
+
39
+ First determine all pages that contain sub menu information for the running top menu item. These are collected in "titlePages"
40
+
41
+ Then create four lists containing the sub menu title, index, url and link respectively. These lists are all in the same sequence such that entry [n] is applicable to the same sub menu in all lists. (I.e. they are synchronous)
42
+
43
+ Then sort the lists into four new lists. Again these lists must be kept synchronous.
44
+
45
+ Lastly, step through the lists to create the actual sub menu's
46
+
47
+ -->{%- endcomment -%}
48
+
49
+ {%- assign titlePages = site.pages | where:'menuInclude', true | where:'menuTopTitle', topTitle -%}
50
+
51
+ {%- assign subMenuTitles = "" | split: "" -%}
52
+ {%- assign subMenuIndexes = "" | split: "" -%}
53
+ {%- assign subMenuUrls = "" | split: "" -%}
54
+ {%- assign subMenuLinks = "" | split: "" -%}
55
+
56
+ {%- for ape in titlePages -%}
57
+ {%- if ape.menuSubTitle != nil -%}
58
+ {%- assign subMenuTitles = subMenuTitles | push: ape.menuSubTitle -%}
59
+ {%- if ape.menuSubIndex != nil -%}
60
+ {%- assign subMenuIndexes = subMenuIndexes | push: ape.menuSubIndex -%}
61
+ {%- else -%}
62
+ {%- assign subMenuIndexes = subMenuIndexes | push: -1 -%}
63
+ {%- endif -%}
64
+ {%- assign subMenuUrls = subMenuUrls | push: ape.url -%}
65
+ {%- if ape.menuLink != nil -%}
66
+ {%- assign subMenuLinks = subMenuLinks | push: ape.menuLink -%}
67
+ {%- else -%}
68
+ {%- assign subMenuLinks = subMenuLinks | push: true -%}
69
+ {%- endif -%}
70
+ {%- endif -%}
71
+ {%- if ape.menuSubs != nil -%}
72
+ {%- for sub in ape.menuSubs -%}
73
+ {%- assign subMenuTitles = subMenuTitles | push: sub.title -%}
74
+ {%- if sub.index != nil -%}
75
+ {%- assign subMenuIndexes = subMenuIndexes | push: sub.index -%}
76
+ {%- else -%}
77
+ {%- assign subMenuIndexes = subMenuIndexes | push: -1 -%}
78
+ {%- endif -%}
79
+ {%- if sub.url != nil -%}
80
+ {%- if sub.anchorId != nil -%}
81
+ {%- assign urlWithAnchorId = sub.url | append: '#' | append: sub.anchorId -%}
82
+ {%- else -%}
83
+ {%- assign urlWithAnchorId = sub.url -%}
84
+ {%- endif -%}
85
+ {%- else -%}
86
+ {%- if sub.anchorId != nil -%}
87
+ {%- assign urlWithAnchorId = ape.url | append: '#' | append: sub.anchorId -%}
88
+ {%- else -%}
89
+ {%- assign urlWithAnchorId = ape.url -%}
90
+ {%- endif -%}
91
+ {%- endif -%}
92
+ {%- assign subMenuUrls = subMenuUrls | push: urlWithAnchorId -%}
93
+ {%- if sub.link != nil -%}
94
+ {%- assign subMenuLinks = subMenuLinks | push: sub.link -%}
95
+ {%- else -%}
96
+ {%- assign subMenuLinks = subMenuLinks | push: true -%}
97
+ {%- endif -%}
98
+ {%- endfor -%}
99
+ {%- endif -%}
100
+ {%- endfor -%}
101
+
102
+ {%- assign sortedSubMenuTitles = "" | split: "" -%}
103
+ {%- assign sortedSubMenuIndexes = subMenuIndexes | sort -%}
104
+ {%- assign sortedSubMenuUrls = "" | split: "" -%}
105
+ {%- assign sortedSubMenuLinks = "" | split: "" -%}
106
+
107
+ {%- for menuIndex in sortedSubMenuIndexes -%}
108
+ {%- if menuIndex != -1 -%}
109
+ {%- for aMenuIndex in subMenuIndexes -%}
110
+ {%- if aMenuIndex == menuIndex -%}
111
+ {%- assign sortedSubMenuTitles = sortedSubMenuTitles | push: subMenuTitles[forloop.index0] -%}
112
+ {%- assign sortedSubMenuUrls = sortedSubMenuUrls | push: subMenuUrls[forloop.index0] -%}
113
+ {%- assign sortedSubMenuLinks = sortedSubMenuLinks | push: subMenuLinks[forloop.index0] -%}
114
+ {%- continue -%}
115
+ {%- endif -%}
116
+ {%- endfor -%}
117
+ {%- endif -%}
118
+ {%- endfor -%}
119
+ {%- for aMenuIndex in subMenuIndexes -%}
120
+ {%- if aMenuIndex == -1 -%}
121
+ {%- assign sortedSubMenuTitles = sortedSubMenuTitles | push: subMenuTitles[forloop.index0] -%}
122
+ {%- assign sortedSubMenuUrls = sortedSubMenuUrls | push: subMenuUrls[forloop.index0] -%}
123
+ {%- assign sortedSubMenuLinks = sortedSubMenuLinks | push: subMenuLinks[forloop.index0] -%}
124
+ {%- continue -%}
125
+ {%- endif -%}
126
+ {%- endfor -%}
127
+
128
+ {%- endif %}
129
+ <div class="item-separator"><p><!-- empty but necessary --></p></div>
130
+
131
+ {%- comment -%}<!-- If the menu selection and active page are the same, show it -->{%- endcomment -%}
132
+
133
+ {%- if page.menuTopTitle == topTitle -%}
134
+ {%- if page.menuLink == false %}
135
+ <div class="item">
136
+ {%- else %}
137
+ <div class="item isActiveSelection">
138
+ {%- endif -%}
139
+ {%- else %}
140
+ <div class="item">
141
+ {%- endif -%}
142
+
143
+ {%- comment -%}<!-- Create top menu item -->{%- endcomment %}
144
+ <input type="checkbox" id="{{ topTitle | append:'-checkbox'}}">
145
+ <div class="title">
146
+ <label class="symbol" for="{{ topTitle | append:'-checkbox'}}">
147
+ {%- if sortedSubMenuTitles.size > 0 %}
148
+ <p class="code"><!-- will be filled by disclosure indicator --></p>
149
+ {%- else %}
150
+ <p></p>
151
+ {%- endif %}
152
+ </label>
153
+ <div class="text">
154
+
155
+ {%- comment -%}<!-- Find page to link to -->{%- endcomment -%}
156
+
157
+ {%- assign pageFound = false -%}
158
+ {%- for ape in site.pages -%}
159
+ {%- if ape.menuTopTitle == topTitle and ape.menuSubTitle == nil and ape.menuSubs == nil -%}
160
+ {%- if ape.menuLink == false %}
161
+ <p class="paddingAsLink">{{ topTitle }}</p>
162
+ {%- else %}
163
+ <a href="{{ ape.url | relative_url }}"><p>{{ topTitle }}</p></a>
164
+ {%- endif -%}
165
+ {%- assign pageFound = true -%}
166
+ {%- break -%}
167
+ {%- endif -%}
168
+ {%- endfor -%}
169
+ {%- if pageFound == false -%}
170
+ {%- for ape in site.pages -%}
171
+ {%- if ape.menuTopTitle == topTitle and ape.menuTopIndex -%}
172
+ {%- if ape.menuLink == false %}
173
+ <p class="paddingAsLink">{{ topTitle }}</p>
174
+ {%- else %}
175
+ <a href="{{ ape.url | relative_url }}"><p>{{ topTitle }}</p></a>
176
+ {%- endif -%}
177
+ {%- assign pageFound = true -%}
178
+ {%- break -%}
179
+ {%- endif -%}
180
+ {%- endfor -%}
181
+ {%- if pageFound == false %}
182
+ <p class="paddingAsLink">{{ topTitle }}</p>
183
+ {%- endif -%}
184
+ {%- endif %}
185
+ </div>
186
+ </div>
187
+
188
+
189
+ {%- if jekyll.environment != 'production' and site.data.setup.fast-content-build -%}{%- else %}
190
+
191
+ {%- comment -%}<!-- Create sub menu items -->{%- endcomment -%}
192
+
193
+ {% if sortedSubMenuTitles.size > 0 -%}
194
+ {%- if site.data.setup.drop-down-menu %}
195
+ <div class="dropdown">
196
+ {%- else %}
197
+ <div class="dropdown-narrow">
198
+ {%- endif -%}
199
+ {%- for subMenuTitle in sortedSubMenuTitles %}
200
+
201
+ {%- comment -%}<!-- Build the sub-sub tables for {{ subMenuTitle }} -->{%- endcomment -%}
202
+
203
+ {% assign subsubMenuTitles = "" | split: "" -%}
204
+ {%- assign subsubMenuIndexes = "" | split: "" -%}
205
+ {%- assign subsubMenuUrls = "" | split: "" -%}
206
+ {%- assign subsubMenuLinks = "" | split: "" -%}
207
+
208
+ {%- for ape in titlePages %}
209
+ {%- if ape.menuSubs != nil %}
210
+ {%- for sub in ape.menuSubs -%}
211
+ {%- if sub.title == subMenuTitle %}
212
+ {%- if sub.sub != nil %}
213
+ {%- for subsub in sub.sub %}
214
+ {%- assign subsubMenuTitles = subsubMenuTitles | push: subsub.title -%}
215
+ {%- if subsub.index != nil -%}
216
+ {%- assign subsubMenuIndexes = subsubMenuIndexes | push: subsub.index -%}
217
+ {%- else -%}
218
+ {%- assign subsubMenuIndexes = subsubMenuIndexes | push: -1 -%}
219
+ {%- endif -%}
220
+ {%- if subsub.url != nil -%}
221
+ {%- if subsub.anchorId != nil -%}
222
+ {%- assign urlWithAnchorId = subsub.url | append: '#' | append: subsub.anchorId -%}
223
+ {%- else -%}
224
+ {%- assign urlWithAnchorId = subsub.url -%}
225
+ {%- endif -%}
226
+ {%- else -%}
227
+ {%- if subsub.anchorId != nil -%}
228
+ {%- assign urlWithAnchorId = ape.url | append: '#' | append: subsub.anchorId -%}
229
+ {%- else -%}
230
+ {%- assign urlWithAnchorId = ape.url -%}
231
+ {%- endif -%}
232
+ {%- endif -%}
233
+ {%- assign subsubMenuUrls = subsubMenuUrls | push: urlWithAnchorId -%}
234
+ {%- if subsub.link != nil -%}
235
+ {%- assign subsubMenuLinks = subsubMenuLinks | push: subsub.link -%}
236
+ {%- else -%}
237
+ {%- assign subsubMenuLinks = subsubMenuLinks | push: true -%}
238
+ {%- endif -%}
239
+ {%- endfor -%}
240
+ {%- endif -%}
241
+ {%- endif -%}
242
+ {%- endfor -%}
243
+ {%- endif -%}
244
+ {%- endfor %}
245
+
246
+ {%- comment -%}<!-- Sort all 4 the lists based on the index of the subMenu that was read -->{%- endcomment -%}
247
+
248
+ {% assign sortedSubsubMenuTitles = "" | split: "" -%}
249
+ {%- assign sortedSubsubMenuIndexes = subsubMenuIndexes | sort -%}
250
+ {%- assign sortedSubsubMenuUrls = "" | split: "" -%}
251
+ {%- assign sortedSubsubMenuLinks = "" | split: "" -%}
252
+
253
+ {%- for menuIndex in sortedSubsubMenuIndexes -%}
254
+ {%- if menuIndex != -1 -%}
255
+ {%- for aMenuIndex in subsubMenuIndexes -%}
256
+ {%- if aMenuIndex == menuIndex -%}
257
+ {%- assign sortedSubsubMenuTitles = sortedSubsubMenuTitles | push: subsubMenuTitles[forloop.index0] -%}
258
+ {%- assign sortedSubsubMenuUrls = sortedSubsubMenuUrls | push: subsubMenuUrls[forloop.index0] -%}
259
+ {%- assign sortedSubsubMenuLinks = sortedSubsubMenuLinks | push: subsubMenuLinks[forloop.index0] -%}
260
+ {%- continue -%}
261
+ {%- endif -%}
262
+ {%- endfor -%}
263
+ {%- endif -%}
264
+ {%- endfor -%}
265
+ {%- for aMenuIndex in subsubMenuIndexes -%}
266
+ {%- if aMenuIndex == -1 -%}
267
+ {%- assign sortedSubsubMenuTitles = sortedSubsubMenuTitles | push: subsubMenuTitles[forloop.index0] -%}
268
+ {%- assign sortedSubsubMenuUrls = sortedSubsubMenuUrls | push: subsubMenuUrls[forloop.index0] -%}
269
+ {%- assign sortedSubsubMenuLinks = sortedSubsubMenuLinks | push: subsubMenuLinks[forloop.index0] -%}
270
+ {%- continue -%}
271
+ {%- endif -%}
272
+ {%- endfor %}
273
+
274
+ {%- comment -%}<!-- Create the sub menu -->{%- endcomment %}
275
+ <div class="subitem-separator"><p></p></div>
276
+ {%- if sortedSubMenuLinks[forloop.index0] != false -%}
277
+ {%- if sortedSubMenuUrls[forloop.index0] == page.url %}
278
+ <div class="subitem isActiveSelection">
279
+ {%- else -%}
280
+ {%- assign urlFound = false -%}
281
+ {%- for url in sortedSubSubMenuUrls -%}
282
+ {%- if url == page.url -%}{%- assign urlFound = true -%}{%- endif -%}
283
+ {%- endfor -%}
284
+ {%- if urlFound %}
285
+ <div class="subitem isActiveSelection">
286
+ {%- else %}
287
+ <div class="subitem">
288
+ {%- endif -%}
289
+ {%- endif %}
290
+ <input type="checkbox" id="{{ subMenuTitle | append:'-checkbox'}}">
291
+ <div class="title">
292
+ <label class="symbol" for="{{ subMenuTitle | append:'-checkbox'}}">
293
+ {%- if sortedSubsubMenuTitles.size > 0 %}
294
+ <p class="code"><!-- will be filled by disclosure indicator --></p>
295
+ {%- else %}
296
+ <p></p>
297
+ {%- endif %}
298
+ </label>
299
+ <div class="text">
300
+ <a href="{{ sortedSubMenuUrls[forloop.index0] | relative_url }}"><p>{{ subMenuTitle }}</p></a>
301
+ </div>
302
+ </div>
303
+ {%- else -%}
304
+ {%- assign urlFound = false -%}
305
+ {%- for url in sortedSubSubMenuUrls -%}
306
+ {%- if url == page.url -%}{%- assign urlFound = true -%}{%- endif -%}
307
+ {%- endfor -%}
308
+ {%- if urlFound %}
309
+ <div class="subitem isActiveSelection">
310
+ {%- else %}
311
+ <div class="subitem">
312
+ {%- endif %}
313
+ <input type="checkbox" id="{{ subMenuTitle | append:'-checkbox'}}">
314
+ <div class="title">
315
+ <label class="symbol" for="{{ subMenuTitle | append:'-checkbox'}}">
316
+ {%- if sortedSubsubMenuTitles.size > 0 %}
317
+ <p class="code"><!-- will be filled by disclosure indicator --></p>
318
+ {%- else %}
319
+ <p></p>
320
+ {%- endif %}
321
+ </label>
322
+ <div class="text"><p class="paddingAsLink">{{ subMenuTitle }}</p></div>
323
+ </div>
324
+ {%- endif -%}
325
+
326
+ {%- comment -%}<!-- sub sub menu item build -->{%- endcomment -%}
327
+
328
+ {% if sortedSubsubMenuTitles.size > 0 -%}
329
+ {%- if site.data.setup.drop-down-menu %}
330
+ <div class="sub-dropdown">
331
+ {%- else %}
332
+ <div class="sub-dropdown-narrow">
333
+ {%- endif -%}
334
+ {%- for subsubMenuTitle in sortedSubsubMenuTitles %}
335
+ <div class="subsubitem-separator"><p></p></div>
336
+ {%- if sortedSubsubMenuLinks[forloop.index0] != false -%}
337
+ {%- if sortedSubsubMenuUrls[forloop.index0] == page.url %}
338
+ <div class="subsubitem isActiveSelection">
339
+ {%- else %}
340
+ <div class="subsubitem">
341
+ {%- endif %}
342
+ <div class="title">
343
+ <div class="symbol"><p></p></div>
344
+ <div class="text">
345
+ <a href="{{ sortedSubsubMenuUrls[forloop.index0] | relative_url }}"><p>{{ subsubMenuTitle }}</p></a>
346
+ </div>
347
+ </div>
348
+ {%- else %}
349
+ <div class="subsubitem">
350
+ <div class="title">
351
+ <div class="symbol"><p></p></div>
352
+ <div class="text"><p class="paddingAsLink">{{ subsubMenuTitle }}</p></div>
353
+ </div>
354
+ {%- endif %}
355
+ </div>
356
+ {%- endfor %}
357
+ </div>
358
+ {%- endif %}
359
+ </div>
360
+ {%- endfor %}
361
+ </div>
362
+ {%- endif -%}
363
+ {%- endif %}
364
+ </div>
365
+ {%- endfor -%}
366
+
367
+
368
+ {%- comment -%}<!-- Categories menu -->{%- endcomment -%}
369
+
370
+ {%- if jekyll.environment != 'production' and site.data.setup.fast-content-build -%}{%- else -%}
371
+ {%- if site.data.setup.generate-categories-menu -%}
372
+ {%- assign cats = site.pages | where:'layout', 'category-page' | sort:'title' -%}
373
+ {%- if cats.size > 0 -%}
374
+ {%- assign categories = 'Categories' -%}
375
+ {%- if site.data.text-for.tCategories -%}{%- assign categories = site.data.text-for.tCategories -%}{%- endif %}
376
+ <div class="item-separator"><p><!-- empty but necessary --></p></div>
377
+
378
+ {%- comment -%}<!-- Check if a category page is selected -->{%- endcomment -%}
379
+
380
+ {%- assign selected = false -%}
381
+ {%- for cat in cats -%}{%- if cat.url == page.url -%}{%- assign selected = true -%}{%- endif -%}{%- endfor -%}
382
+ {%- if selected -%}
383
+ {%- if site.data.setup.drop-down-menu %}
384
+ <div class="item isActiveSelection">
385
+ {%- else %}
386
+ <div class="item-narrow-only isActiveSelection">
387
+ {%- endif -%}
388
+ {%- else -%}
389
+ {%- if site.data.setup.drop-down-menu %}
390
+ <div class="item">
391
+ {%- else %}
392
+ <div class="item-narrow-only">
393
+ {%- endif -%}
394
+ {%- endif %}
395
+ <input type="checkbox" id="category-checkbox">
396
+ <div class="title">
397
+ <label class="symbol" for="category-checkbox">
398
+ {%- if cats.size > 0 %}
399
+ <p class="code"><!-- will be filled by disclosure indicator --></p>
400
+ {%- else -%}
401
+ <p></p>
402
+ {%- endif -%}
403
+ </label>
404
+ <div class="text"><p class="paddingAsLink">{{ categories }}</p></div>
405
+ </div>
406
+ <div class="dropdown">
407
+ {%- for cat in cats %}
408
+ <div class="subitem-separator"><p></p></div>
409
+ {%- if cat.url == page.url %}
410
+ <div class="subitem isActiveSelection">
411
+ {%- else %}
412
+ <div class="subitem">
413
+ {%- endif %}
414
+ <div class="title">
415
+ <div class="symbol"></div>
416
+ <div class="text">
417
+ <a href="{{ cat.url | relative_url }}"><p>{{ cat.title | capitalize }}</p></a>
418
+ </div>
419
+ </div>
420
+ </div>
421
+ {%- endfor %}
422
+ </div>
423
+ </div>
424
+ {%- endif -%}
425
+ {%- endif -%}
426
+ {%- endif %}
427
+ </nav>
428
+ <!-- end of include menubar.html -->