classic-jekyll-theme 0.2.6 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65f8de8c1f5cb278cb911c11c3d301816d16270d
4
- data.tar.gz: 83303e4f295ae47a88d0949ecf9826f10b2ec8e9
3
+ metadata.gz: ae4bef7dac925d9f2db2c310b326a6911efd2fce
4
+ data.tar.gz: 10d760f801ec154fd63ab63ece0b7d4311205fff
5
5
  SHA512:
6
- metadata.gz: 506c23063c3c7e914b05d26751ac9252f03f095b3ec1bce6ec6b2f6b13ab0a7550f5503ca019f48be4e938eca03d22893af3d01b86192e45087a8f5886ad32fb
7
- data.tar.gz: 5d3bb3987bf170772c9b2e87d94e12eaa05b0c458ad282ace6ea048252e6e41dcf819e72c0a34d4ab0d304e7bdb801d3c2791e836c61b072f39c9f691b1a4fa8
6
+ metadata.gz: b2fd2c858022b37077bfcf1079937f06e6b252639e8d36aad212c400fcb57ff8e5473238597e2b48981ae0f047f809157ccdf53be2be3ddbc76450dfa787e462
7
+ data.tar.gz: 9cc1453af8f1c017aca197cd662b98ba55b9bd8d99fe1ef87a1cfeefcaa803e3cd547ddb477f5568104854227bd0d0d989fc0979acc1c56dc0760ef7b4ee5588
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Classic-Jekyll-Theme
1
+ # Classic-Jekyll-Theme v1.0.0
2
2
 
3
3
  Welcome to Classic-Jekyll-Theme. This theme centers around one of the most used website structures on the web. A banner, navigation menu, (up to) three columns and a footer. The design is fully responsive for three different screen widths: wide, medium and narrow. It is probably best shown in an example:
4
4
 
@@ -152,21 +152,65 @@ To create a page that must be included in the menu bar, add the following front
152
152
  ---
153
153
  ...
154
154
  menuInclude: yes
155
- menuTitle: "About Pages"
156
- subMenuFrom: Classic
157
- menuIndex: 2
155
+ menuLink: yes
156
+ menuTopTitle: Classic
157
+ menuTopIndex: 2
158
+ menuSubTitle: "About Pages"
159
+ menuSubIndex: 4
158
160
  ---
159
161
 
160
- - menuInclude: Set to "yes" to link this page from the menu bar.
161
- - menuTitle: The title that will be used in the menu bar.
162
- - menuIndex: The place of the title within the menu bar. For top level menu items, lower numbers will be to the left of higher numbers. For sub-menu items, lower numbers will go above higher numbers. This theme only sorts on menuIndex numbers, not on other properties.
163
- - subMenuFrom:
164
- - If absent, the page will be linked from a top level menu item. Top level menu items will always be visible when the menu bar is visible.
165
- - If a subMenuFrom value is present, and there is a matching page with this value as its menuTitle, then this page will be linked from a drop-down (sub) menu item below that top level menu item.
166
- - If a subMenuFrom value is present, and there is no matching page with this value as its menuTitle, then a top level menu item will be created with this as its title. This page will be linked from a drop down (sub) menu item below that menu item.
162
+ - menuInclude: Set to "yes" to consider this page for a navigation bar menu item.
163
+ - menuLink: Set to 'no' to disable a link creation from the navigation bar to this page. However the menu title or subtitle will be included. This allows the ordering of menu items that do not have an associated page. The default behaviour assumes 'yes'. So not including this tag will create a link. Note: This allows ordering of top level menu items. For submenu items this probably only makes sense if some kind of "divider" must be shown. Otherwise showing a submenu item without a link will probably confuse users.
164
+ - menuTopTitle: The title of the menu item in the navigation bar. When used in conjunction with a menuSubTitle, this will be the title of the menu item to which this submenu item will be added in the drop down menu.
165
+ - menuTopIndex: The place of the title within the menu bar. Lower numbers will be to the left of higher numbers. Be aware that the "Home" menu item will always be first and the "Categories" will always be last.
166
+ - menuSubIndex: The place of the submenu item within the dropdown menu. Lower numbers will go above higher numbers. This theme only sorts on menuIndex numbers, not on other properties.
167
167
 
168
168
  For a consistent user experience in the narrow layout, it is recommened not to link pages to top level menu items if these menu items have a drop-down submenu.
169
169
 
170
+ ## History
171
+
172
+ 0.2.6 Inital version (before this I was only getting acquainted with the gem-publishing mechanism)
173
+ 1.0.0 Fixed a problem with navigation menu generation. (Insufficient control over menu item placement)
174
+
175
+ ## Upgrade information
176
+
177
+ ### from 0.2.6 to 1.0.0
178
+
179
+ #### Page creation
180
+
181
+ The page creation YAML matter has changed. The old tags did not give full control over the menu buildup, the new tags do.
182
+
183
+ Old: menuInclude
184
+ New: menuInclude
185
+
186
+ No changes, works as before.<br><br>
187
+
188
+ Old: -
189
+ New: menuLink true|false
190
+
191
+ A new option that controls if a menu title has a link to a page. The default value is 'true' so when this tag is not included, a link to the page will be created. If set to 'false', then the menu item will show up in the specified place, but will not be linked to a page. Use this to order menu items that have a drop-down menu but do not have a page by itself.<br><br>
192
+
193
+ Old: menuTitle
194
+ New: menuTopTitle
195
+ New: menuSubTitle
196
+
197
+ Specifies the string to be used for the menu item.<br><br>
198
+
199
+ Old: subMenuFrom
200
+ New: menuTopTitle
201
+
202
+ Specifies the menu item from which this is a submenu item.<br><br>
203
+
204
+ Old: menuIndex
205
+ New: menuTopIndex
206
+ New: menuSubIndex
207
+
208
+ The index for a menu item. If not present, the menu ordering is undetermined. If only a part of the pages have this item then the menu items of the pages that do not have this item specified will be included first. If multiple specifications exist, then the highest number overrides the lower numbers. Like before, a lower number goes to the left -or on top- of the higher number.
209
+
210
+ ## Known problems (need your help)
211
+
212
+ There is some odd behaviour in the navigation bar that I have not been able to nail down yet. It has to do with the space between top level menu items. There is some additional space that I am not able to trace down. For those who like a puzzle: there is some space around a ".navbanner-menu ul li" that has no obvious source. Please let me know if you happen to find where it comes from. (rien@balancingrock.nl)
213
+
170
214
  ## Feedback
171
215
 
172
216
  Comments, bug reports, feature requests and improvements are eagerly anticipated via email: rien@balancingrock.nl.
@@ -15,36 +15,15 @@
15
15
  <!-- Navigation bar visibility depends on screen width. -->
16
16
  <nav class="navbanner-menu">
17
17
 
18
- <!-- The site navigation menu. Note that there is only one level of sub-menu items -->
19
- <!-- Create a list of the necessary submenu's -->
20
-
21
- {% assign submenus = "" | split: "" %}
22
- {% assign sortedPages = site.pages | sort: 'menuIndex' %}
18
+ <!-- Create a list of top menu item titles -->
19
+ {% assign topTitles = "" | split: "" %}
20
+ {% assign sortedPages = site.pages | sort: 'menuTopIndex' %} <!-- sorts empty tags first, then numerically -->
23
21
  {% for ape in sortedPages %}
24
- {% if ape.menuInclude %}
25
- {% if ape.subMenuFrom %}
26
- {% assign item-found = false %}
27
- {% for menu-item in submenus %}
28
- {% if menu-item == ape.subMenuFrom %}
29
- {% assign item-found = true %}
30
- {% endif %}
31
- {% endfor %}
32
- {% if item-found == false %}
33
- {% assign submenus = submenus | push: ape.subMenuFrom %}
34
- {% endif %}
35
- {% else %}
36
- {% assign item-found = false %}
37
- {% for menu-item in submenus %}
38
- {% if menu-item == ape.menuTitle %}
39
- {% assign item-found = true %}
40
- {% endif %}
41
- {% endfor %}
42
- {% if item-found == false %}
43
- {% assign submenus = submenus | push: ape.menuTitle %}
44
- {% endif %}
45
- {% endif %}
22
+ {% if ape.menuInclude == true and ape.menuTopTitle %}
23
+ {% assign topTitles = topTitles | push: ape.menuTopTitle %}
46
24
  {% endif %}
47
25
  {% endfor %}
26
+ {% assign topTitles = topTitles | reverse | uniq | reverse %} <!-- remove emtpy, stay numerically -->
48
27
 
49
28
  <!-- Using the above list, create the menu and submenu's -->
50
29
  <ul>
@@ -56,60 +35,83 @@
56
35
  <div class="menu-item-title"><a href="/"><p>Home</p></a></div>
57
36
  </div>
58
37
  </li>
59
-
38
+
60
39
  <!-- Page menus -->
61
- {% assign sortedSubMenus = submenus %}
62
- {% for submenu in sortedSubMenus %}
63
- <li>
64
- <input type="checkbox" id="{{ submenu | append:'-checkbox'}}">
65
- <label for="{{ submenu | append:'-checkbox'}}">
66
- <div class="menu-item-separator"><p><!-- empty but necessary --></p></div>
67
- <div class="menu-item">
68
- <div class="menu-item-symbol">
69
- {% for subpage in site.pages %}
70
- {% if subpage.subMenuFrom == submenu %}
71
- <p><!-- will be filled by disclosure indicator --></p>
40
+ {% for topTitle in topTitles %}
41
+
42
+ <!-- Create a list of sub menu item titles -->
43
+ {% assign subTitles = "" | split: "" %}
44
+ {% assign sortedPages = site.pages | sort: 'menuSubIndex' %}
45
+ {% for ape in sortedPages %}
46
+ {% if ape.menuInclude == true and ape.menuTopTitle == topTitle and ape.menuSubTitle %}
47
+ {% assign subTitles = subTitles | push: ape.menuSubTitle %}
48
+ {% endif %}
49
+ {% endfor %}
50
+ {% assign subTitles = subTitles | reverse | uniq | reverse %}
51
+
52
+ <li>
53
+
54
+ <!-- Create top menu item -->
55
+ <input type="checkbox" id="{{ topTitle | append:'-checkbox'}}">
56
+ <label for="{{ topTitle | append:'-checkbox'}}">
57
+ <div class="menu-item-separator"><p><!-- empty but necessary --></p></div>
58
+ <div class="menu-item">
59
+ <div class="menu-item-symbol">
60
+ {% if subTitles.size > 0 %}
61
+ <p><!-- will be filled by disclosure indicator --></p>
62
+ {% endif %}
63
+ </div>
64
+ <div class="menu-item-title">
65
+ <!-- Find page to link to -->
66
+ {% assign pageFound = false %}
67
+ {% for ape in site.pages %}
68
+ {% if ape.menuTopTitle == topTitle and ape.menuSubTitle == nil %}
69
+ {% if ape.menuLink == false %}
70
+ <p>{{ topTitle }}</p>
71
+ {% else %}
72
+ <a href="{{ ape.url }}"><p>{{ topTitle }}</p></a>
73
+ {% endif %}
74
+ {% assign pageFound == true %}
72
75
  {% break %}
73
76
  {% endif %}
74
77
  {% endfor %}
78
+ {% if pageFound == false %}
79
+ <p>{{ topTitle }}</p>
80
+ {% endif %}
81
+ </div>
75
82
  </div>
76
- <div class="menu-item-title">
77
- {% assign foundTitlePage = false %}
78
- {% for titlepage in site.pages %}
79
- {% if titlepage.menuInclude %}
80
- {% if titlepage.menuTitle == submenu %}
81
- {% if titlepage.subMenuFrom == nil %}
82
- <a href="{{ titlepage.url }}"><p>{{ submenu }}</p></a>
83
- {% assign foundTitlePage = true %}
84
- {% break %}
85
- {% endif %}
83
+ </label>
84
+
85
+ <!-- Create sub menu items -->
86
+ {% if subTitles.size > 0 %}
87
+ <ul>
88
+ {% for subTitle in subTitles %}
89
+ {% for ape in site.pages %}
90
+ {% if ape.menuTopTitle == topTitle and ape.menuSubTitle == subTitle %}
91
+ {% if ape.menuLink != false %}
92
+ <li>
93
+ <div class="menu-subitem">
94
+ <div class="menu-subitem-symbol"></div>
95
+ <div class="menu-subitem-title">
96
+ <a href="{{ ape.url }}"><p>{{ subTitle }}</p></a>
97
+ </div>
98
+ </div>
99
+ </li>
100
+ {% else %}
101
+ <li>
102
+ <div class="menu-subitem">
103
+ <div class="menu-subitem-symbol"></div>
104
+ <div class="menu-subitem-title"><p>{{ subTitle }}</p></div>
105
+ </div>
106
+ </li>
86
107
  {% endif %}
108
+ {% break %}
87
109
  {% endif %}
88
110
  {% endfor %}
89
- {% if foundTitlePage == false %}
90
- <p>{{ submenu }}</p>
91
- {% endif %}
92
- </div>
93
- </div>
94
- </label>
95
- <ul>
96
- {% assign sortedPages = site.pages | sort: 'menuIndex' %}
97
- {% for ape in sortedPages %}
98
- {% if ape.menuInclude %}
99
- {% if ape.subMenuFrom == submenu %}
100
- <li>
101
- <div class="menu-subitem">
102
- <div class="menu-subitem-symbol"></div>
103
- <div class="menu-subitem-title">
104
- <a href="{{ ape.url }}"><p>{{ ape.menuTitle }}</p></a>
105
- </div>
106
- </div>
107
- </li>
108
- {% endif %}
111
+ {% endfor %}
112
+ </ul>
109
113
  {% endif %}
110
- {% endfor %}
111
- </ul>
112
- </li>
114
+ </li>
113
115
  {% endfor %}
114
116
 
115
117
  <!-- Categories menu -->
@@ -141,7 +143,6 @@
141
143
  {% endfor %}
142
144
  </ul>
143
145
  </li>
144
-
145
146
  </ul>
146
147
  </nav>
147
148
 
data/pages/about/about.md CHANGED
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  layout: page
3
3
  title: About this site
4
- menuInclude: true
5
- menuTitle: About
6
- menuIndex: 100
4
+ menuInclude: yes
5
+ menuLink: yes
6
+ menuTopTitle: About
7
+ menuTopIndex: 100
7
8
  description: A short introduction to the content of this site.
8
9
  # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
9
10
  ---
@@ -3,9 +3,8 @@ layout: page
3
3
  title: "Categories in classic"
4
4
  date: 2016-11-04
5
5
  menuInclude: yes
6
- menuTitle: "About Categories"
7
- subMenuFrom: Classic
8
- menuIndex: 3
6
+ menuTopTitle: Classic
7
+ menuSubTitle: "About Categories"
9
8
  description: A description can be up to 156 characters long...
10
9
  # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
11
10
  ---
@@ -3,8 +3,9 @@ layout: page
3
3
  title: "The Classic Theme"
4
4
  date: 2016-11-04
5
5
  menuInclude: yes
6
- menuTitle: Classic
7
- menuIndex: 2
6
+ menuLink: yes
7
+ menuTopTitle: Classic
8
+ menuTopIndex: 2
8
9
  description: A description can be up to 156 characters long...
9
10
  # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
10
11
  ---
@@ -3,9 +3,9 @@ layout: page
3
3
  title: "Known problems"
4
4
  date: 2016-11-05
5
5
  menuInclude: yes
6
- menuTitle: "Known problems"
7
- subMenuFrom: Classic
8
- menuIndex: 4
6
+ menuTopTitle: Classic
7
+ menuSubTitle: "Known problems"
8
+ menuSubIndex: 4
9
9
  description: A description can be up to 156 characters long...
10
10
  # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
11
11
  ---
@@ -3,9 +3,9 @@ layout: page
3
3
  title: "Pages in classic"
4
4
  date: 2016-11-04
5
5
  menuInclude: yes
6
- menuTitle: "About Pages"
7
- subMenuFrom: Classic
8
- menuIndex: 2
6
+ menuTopTitle: Classic
7
+ menuSubTitle: "About Pages"
8
+ menuSubIndex: 2
9
9
  description: A description can be up to 156 characters long...
10
10
  # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
11
11
  ---
@@ -3,9 +3,9 @@ layout: page
3
3
  title: "Posts in classic"
4
4
  date: 2016-11-04
5
5
  menuInclude: yes
6
- menuTitle: "About Posts"
7
- subMenuFrom: Classic
8
- menuIndex: 1
6
+ menuTopTitle: Classic
7
+ menuSubTitle: "About Posts"
8
+ menuSubIndex: 1
9
9
  description: A description can be up to 156 characters long...
10
10
  # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
11
11
  ---
@@ -2,8 +2,8 @@
2
2
  layout: page
3
3
  title: Contact
4
4
  menuInclude: true
5
- menuTitle: Contact
6
- menuIndex: 99
5
+ menuTopTitle: Contact
6
+ menuTopIndex: 99
7
7
  description: Contact information for this site.
8
8
  # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
9
9
  ---
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: page
3
+ menuInclude: yes
4
+ menuLink: no
5
+ menuTopTitle: More
6
+ menuTopIndex: 10
7
+ menuSubTitle: More of anything
8
+ description: A description can be up to 156 characters long...
9
+ # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
10
+ ---
11
+
12
+ More of anything.
@@ -3,9 +3,9 @@ layout: page
3
3
  title: "An example page"
4
4
  date: 2016-10-31
5
5
  menuInclude: yes
6
- subMenuFrom: Other
7
- menuTitle: The menu title
8
- menuIndex: 1
6
+ menuTopTitle: Other
7
+ menuSubTitle: The menu title
8
+ menuSubIndex: 1
9
9
  description: A description can be up to 156 characters long...
10
10
  # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
11
11
  ---
@@ -0,0 +1,11 @@
1
+ ---
2
+ layout: page
3
+ menuInclude: yes
4
+ menuLink: yes
5
+ menuTopTitle: Other
6
+ menuTopIndex: 3
7
+ description: A description can be up to 156 characters long...
8
+ # end of description at 156 characters ----------| (last 3 chars will be replaced by '...' on overflow)
9
+ ---
10
+
11
+ just some text
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classic-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rien
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-07 00:00:00.000000000 Z
11
+ date: 2016-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll-feed
@@ -123,7 +123,9 @@ files:
123
123
  - pages/classic/posts.md
124
124
  - pages/contact/contact.md
125
125
  - pages/cookie-consent/cookie-consent.md
126
+ - pages/more/more.md
126
127
  - pages/other/example-page.md
128
+ - pages/other/other.md
127
129
  homepage: https://rubygems.org/gems/classic-jekyll-theme
128
130
  licenses:
129
131
  - MIT