programming-pages 0.5.19 → 0.5.20

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: 8ebde1a5c3b33eed9b20cec14af3d347baa9f98c1a22800bc404de2ec75d00e3
4
- data.tar.gz: db7c368126a1f7dcd4e3c862c6cd707b0b6af478fe80d7b688706399272c2ad3
3
+ metadata.gz: deec5dddcd5735b3915ed721c216ed556c87659e7e4e6dacd60cb6177921d08e
4
+ data.tar.gz: db14ceee0fc4ac8df53bb5960cbfaa6278704cf3fa5c249de616cc073b6a923f
5
5
  SHA512:
6
- metadata.gz: cf4c82e27716ed154bd531649bd8eb4112f019c3b116be121811dcc83856dbc4985dbde3eac17f21ca1b224a3875847998d5326957e6f4bc2de234507d519b91
7
- data.tar.gz: 13973abadc73def73005c8e1af26866d95b03adf492b2687758e8ea2a11426f308a20d91fc8758666b2ad4dff6ede0f3ddab872b963518f313b455fae9cd6e36
6
+ metadata.gz: f1b24386b653d78e016c81b6ed75665f69c8b9bb5633e7b0785503c6f31abe7aea9fcdf3f916d5381619bdb33871615593c259f56b99587ea3a5cff11e0f95ab
7
+ data.tar.gz: d6aa15dd9adb09a56457aee34984a9e0027d2974534f37f8f5f5f225e3d9d51f9730deb099b0d3f2d2ebb4a0ddc91e9051a460bf87eefa6c19b2651b60e52eba
@@ -6,31 +6,49 @@ collapsible_example
6
6
 
7
7
  params:
8
8
  file=<path-to-file> must be rooted in _includes
9
+ syntax=<hilighter-syntax-hint> (optional) hint for syntax hilighter; defaults to file extension
10
+ id_only=<'true'|any> (optional) when 'true', evaluates to the id of the example label, e.g. for use in an href; defaults to empty string and normal behavior of embedding code example
9
11
 
10
12
  {%- endcomment -%}
11
13
 
12
14
  {%- comment -%}push prior state{%- endcomment -%}
13
15
  {%- assign __name_parts = name_parts -%}
14
16
  {%- assign __example_id = example_id -%}
15
- {%- assign __example_content = example_content -%}
16
17
 
17
18
  {%- assign name_parts = include.file | split: '/' | last | split: '.' -%}
18
- {%- assign example_id = name_parts.first | prepend: 'ex-' -%}
19
+ {%- assign example_id = name_parts.first | slugify | prepend: 'example-' -%}
20
+
21
+ {%- if include.id_only == 'true' -%}
22
+ {{ example_id }}
23
+
24
+ {%- else -%}
25
+ {%- assign __collapsible_id = collapsible_id -%}
26
+ {%- assign __example_content = example_content -%}
27
+ {%- assign __syntax = syntax -%}
28
+
29
+ {%- assign collapsible_id = name_parts.first | slugify | prepend: 'collapsible-' -%}
30
+ {%- assign syntax = name_parts | last -%}{%- if include.syntax %}{% assign syntax = include.syntax %}{% endif -%}
19
31
  {%- capture example_content -%}
20
- ```{{ name_parts | last }}
32
+ ```{{ syntax }}
21
33
  {% include {{ include.file }} %}
22
34
  ```
23
35
  {%- endcapture -%}
24
36
 
25
37
  <div class="ui example segment">
26
- <a class="ui top attached basic tiny label" onclick="toggle_collapsed('{{ example_id }}')">{% include icon.liquid id='plus-square-outline' %} toggle example</a>
27
- <div id="{{ example_id }}" class="collapsible example collapsed">
38
+ <a class="ui top attached basic tiny label" onclick="toggle_collapsed('{{ collapsible_id }}')">{% include icon.liquid id='plus-square-outline' %} toggle example</a>
39
+ <div id="{{ collapsible_id }}" class="collapsible example collapsed">
28
40
  {{ example_content | markdownify }}
29
41
  </div>
30
- <div class="ui bottom attached label"> {{ name_parts | join: '.' }} </div>
42
+ <div id="{{ example_id }}" class="ui bottom attached label"> {{ name_parts | join: '.' }} </div>
31
43
  </div>
32
44
 
33
45
  {%- comment -%}pop prior state{%- endcomment -%}
34
46
  {%- assign example_content = __example_content -%}
47
+ {%- assign syntax = __syntax -%}
48
+ {%- assign collapsible_id = __collapsible_id -%}
49
+
50
+ {%- endif -%}
51
+
52
+ {%- comment -%}pop prior state{%- endcomment -%}
35
53
  {%- assign example_id = __example_id -%}
36
54
  {%- assign name_parts = __name_parts -%}
data/_layouts/page.html CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  layout: base
3
- theme_version: 0.5.19
3
+ theme_version: 0.5.20
4
4
  theme_url: https://github.com/pixeldroid/programming-pages
5
5
  ---
6
6
 
data/screenshot.png CHANGED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: programming-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.19
4
+ version: 0.5.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - pixeldroid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-27 00:00:00.000000000 Z
11
+ date: 2019-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-pages