programming-pages 0.5.11 → 0.5.12

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
  SHA256:
3
- metadata.gz: 9bd4526b36e5f20dcda2ebc433b34ea561589d2afce6fed107a02123ac31e465
4
- data.tar.gz: 5a4744fc09b922e89a626927abe3e2f532ffda42fe5525e113d6a4bd54c35be5
3
+ metadata.gz: 0a6b1a9b591c42fda5c74b677f67f7453cded99ce3f651a71c6f412c2005f70a
4
+ data.tar.gz: 3c1ce1126a5955d15147187b0d28941871d93f6412deec20c3186366743cc82d
5
5
  SHA512:
6
- metadata.gz: 8334abcabd5a42c59ffc7af9148811396e2babf2485eba4fe53d9df10aa9258f39759f6a957dc9aa2b88a5363100f7e4d76ec63c5ee6862e7139f06a52f452c7
7
- data.tar.gz: 7bc97ea4e1a7d7281d0595da286a1f572f6bdd543192d44c951269b6e81340712c82aa768ebb28b51d329b26d3502dbbd084ebe88a89d386176cff73b2a161e0
6
+ metadata.gz: 05772c1a109ea8a40f0b23f9918ba68e6f588379384942406df74a878ba6afe7df6600caceae6224060ba5b9d9a8b0f078d004b7e7393279b851a2be93a4f0e5
7
+ data.tar.gz: d260e088c3d649b4110af0a517ac9cb5f75b74034ece0ff5226b1c88b4aac1e868b67e91ead5dad9215073ff50162d6e04768d6eeeb890c312bccd9a56f6f7fe
@@ -115,7 +115,7 @@ so our strategy is to:
115
115
  {% endif %}
116
116
  {% endfor %}
117
117
  {% assign ordered = ordered | sort: 'order' %}
118
- {% assign endered = endered | sort: 'order' | reverse %}
118
+ {% assign endered = endered | sort: 'order' %}
119
119
  {% assign new = ordered | concat: unorder | concat: endered %}
120
120
  {% assign leveled = leveled | push: new %}
121
121
  {% endfor %}
@@ -204,10 +204,11 @@ so our strategy is to:
204
204
  {% endunless %}
205
205
 
206
206
  {%- comment %} delegate to extension point for actual rendering of link list {% endcomment -%}
207
- {% include render_indices.liquid doc_list=doc_list collection_label=collection.title page_title=page.title %}
207
+ {% include render_indices.liquid doc_list=doc_list collection_label=collection.label page_title=page.title %}
208
208
 
209
- <br>
210
- <br>
211
209
  </div>
210
+
211
+ &nbsp;<br>
212
+ &nbsp;<br>
212
213
  </div>
213
214
  {% endfor %}
@@ -28,7 +28,7 @@ params:
28
28
  {% endif %}
29
29
  {% endfor %}
30
30
  {% assign ordered = ordered | sort: 'order' %}
31
- {% assign endered = endered | sort: 'order' | reverse %}
31
+ {% assign endered = endered | sort: 'order' %}
32
32
  {% assign doc_list = ordered | concat: unorder | concat: endered %}
33
33
 
34
34
  <div class="ui bulleted link list">
@@ -8,18 +8,21 @@ params:
8
8
  doc_list=<array of document objects to create links for>
9
9
  collection_label=<name of collection the docs belong to>
10
10
  page_title=<title of the calling page>
11
+ no_indent=<pipe delimited list of layouts that should not be indented>
11
12
 
12
13
  {%- endcomment -%}
14
+ {% assign no_indenting = include.no_indent | split: '|' %}
13
15
  {% for doc in include.doc_list %}
14
16
  {% capture link %}{{ doc.title }}{% endcapture %}
15
17
  {% capture url %}{{ doc.url }}#/{{ include.collection_label | downcase }}/{% endcapture %}
18
+ {% capture item_id %}{% if doc.title == include.page_title %} id="active-page-index"{% endif %}{% endcapture %}
16
19
  {% capture item_class %}{% if doc.title == include.page_title %}active {% endif %}item{% endcapture %}
17
- {% if doc.layout == 'page' or doc.layout == 'layout' or doc.layout == 'guide-index' %}
20
+ {% unless no_indenting contains doc.layout %}
18
21
  {% assign path_bits = doc.relative_path | split: '.' | first | split: '/' %}
19
22
  {% assign n = path_bits.size | minus: 2 %}
20
23
  {% if n > 3 %}{% assign n = 3 %}{% endif %}
21
24
  {% capture indent %}{% for i in (1..n) %}&ensp;{% endfor %}{% endcapture %}
22
25
  {% capture link %}{{ indent }}{{ doc.title }}{% endcapture %}
23
- {% endif %}
24
- <a class="very tight smaller text {{ item_class }}" href="{{ site.baseurl }}{{ url }}">{{ link }}</a>
26
+ {% endunless %}
27
+ <a{{ item_id }} class="very tight smaller text {{ item_class }}" href="{{ site.baseurl }}{{ url }}">{{ link }}</a>
25
28
  {% endfor %}
@@ -3,7 +3,7 @@ help_modal_init = function() {
3
3
  inverted: true
4
4
  });
5
5
 
6
- // set up shortut key sequence to toggle modal
6
+ {% comment %} set up shortut key sequence to toggle modal {% endcomment %}
7
7
  Mousetrap.bind('h', function() { $('#site-help').modal('toggle'); return false; });
8
8
  };
9
9
 
@@ -1,10 +1,20 @@
1
+ set_indices_scrolltop = function() {
2
+ {% comment %} look for active item and scroll it into view (set by render_indices.liquid) {% endcomment %}
3
+ var active_item = $('#active-page-index').first();
4
+ if (active_item.length < 1) return;
5
+
6
+ var y = active_item.position().top;
7
+ $('#sidebar-fixed').scrollTop(y);
8
+ }
9
+
1
10
  collection_tabs_init = function() {
2
11
  $('#collection-tabs .item').tab({
3
12
  history: true,
4
13
  historyType: 'hash',
14
+ onFirstLoad: set_indices_scrolltop,
5
15
  });
6
16
 
7
- // set up shortut key sequences to change tabs
17
+ {% comment %} set up shortut key sequences to change tabs {% endcomment %}
8
18
  {% for collection in site.collections %}
9
19
  {% unless collection.label == 'posts' %}
10
20
  {% capture label %}{{ collection.label | downcase }}{% endcapture %}
@@ -3,27 +3,20 @@ site_search_init = function() {
3
3
  {% for collection in site.collections %}
4
4
  {% unless collection.label == 'posts' %}
5
5
  {% for doc in collection.docs %}
6
- {% assign title = doc.title %}
7
6
  {% capture url %}{{ doc.url }}#/{{ collection.label | downcase }}/{% endcapture %}
8
- {% case doc.layout %}
9
- {% when 'package' %}
10
- {% assign title = doc.module %}
11
- {% when 'type' %}
12
- {% assign title = doc.name %}
13
- {% endcase %}
14
- { title: '{{ title }}', url: '{{ site.baseurl }}{{ url }}' },
7
+ { title: '{{ doc.title }}', url: '{{ site.baseurl }}{{ url }}' },
15
8
  {% endfor %}
16
9
  {% endunless %}
17
10
  {% endfor %}
18
11
  ];
19
12
 
20
- // urls are auto-followed, so no callback needed
13
+ {% comment %} urls are auto-followed, so no callback needed {% endcomment %}
21
14
  $('#site-search').search({
22
15
  source: search_content,
23
16
  selectFirstResult: true,
24
17
  });
25
18
 
26
- // set up shortut key for search input focus
19
+ {% comment %} set up shortut key for search input focus {% endcomment %}
27
20
  Mousetrap.bind('s', function() { $( '#site-search .prompt' ).focus(); return false; });
28
21
  };
29
22
 
data/_layouts/page.html CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  layout: base
3
- theme_version: 0.5.11
3
+ theme_version: 0.5.12
4
4
  theme_url: https://github.com/pixeldroid/programming-pages
5
5
  ---
6
6
 
data/screenshot.png CHANGED
Binary file
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: programming-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.11
4
+ version: 0.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - pixeldroid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-23 00:00:00.000000000 Z
11
+ date: 2019-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-pages
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '192'
19
+ version: '193'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: '192'
26
+ version: '193'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.16'
33
+ version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.16'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement