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 +4 -4
- data/_includes/collapsible_example.liquid +24 -6
- data/_layouts/page.html +1 -1
- data/screenshot.png +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deec5dddcd5735b3915ed721c216ed556c87659e7e4e6dacd60cb6177921d08e
|
4
|
+
data.tar.gz: db14ceee0fc4ac8df53bb5960cbfaa6278704cf3fa5c249de616cc073b6a923f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: '
|
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
|
-
```{{
|
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('{{
|
27
|
-
<div id="{{
|
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
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.
|
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-
|
11
|
+
date: 2019-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-pages
|