jekyll-gl 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +72 -1
- data/jekyll-gl.gemspec +2 -2
- data/lib/jekyll-gl.rb +53 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd1bebec56902ea7801d352ddda0306cf4c6db5a
|
4
|
+
data.tar.gz: b5a5d914d2749327d8c499600f2342fc19c60c90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db34c7162d368277850b210d8e92fe44c57c49185bcab45bfd8e52c05367cc6b78c226151588562ecd3f28417a44d9d14ba3363c8721a6555378a9290dad34a9
|
7
|
+
data.tar.gz: 19596fc361d2885cc7e03fd231c492c1682523aecfcfacb87ca92bd9cc07b9a410d1428d2db1d5e137ee13893befc71961247f580cb752fbb5ecdd71c8b0e2f6
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# jekyll-gl
|
2
2
|
|
3
|
-
This is a very simple Jekyll plugin to be used on Hyojun.guideline project. It'll place `.gl` class on all markdown generated elements.
|
3
|
+
This is a very simple Jekyll plugin to be used on Hyojun.guideline project. It'll place `.gl` class on all markdown generated elements. It also creates some liquid tags for creating specific modules: `example`, `typography`, `colors` and.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -39,6 +39,77 @@ kramdown:
|
|
39
39
|
transliterated_header_ids: true
|
40
40
|
```
|
41
41
|
|
42
|
+
### Tags
|
43
|
+
|
44
|
+
There are some liquid tags defined to be used inside the markdown files that should be used as helpers on creating the guideline:
|
45
|
+
|
46
|
+
#### Example boxes
|
47
|
+
|
48
|
+
To create an example box with an html inside, just wrap the code with `{% example [checkers] [dark|inline] [full] %}` tag. Ex.:
|
49
|
+
|
50
|
+
* Basic example box:
|
51
|
+
|
52
|
+
```
|
53
|
+
{% example %}
|
54
|
+
box de exemplo padrão
|
55
|
+
{% endexample %}
|
56
|
+
```
|
57
|
+
|
58
|
+
* Example box with checkers background:
|
59
|
+
|
60
|
+
```
|
61
|
+
{% example checkers %}
|
62
|
+
box de exemplo padrão com checkers
|
63
|
+
{% endexample %}
|
64
|
+
```
|
65
|
+
|
66
|
+
* Dark version of the checkers background:
|
67
|
+
|
68
|
+
```
|
69
|
+
{% example checkers dark %}
|
70
|
+
box de exemplo padrão com checkers escuro
|
71
|
+
{% endexample %}
|
72
|
+
```
|
73
|
+
|
74
|
+
* Full-width example box won't be limited by the guideline default max-width:
|
75
|
+
```
|
76
|
+
{% example full %}
|
77
|
+
box de exemplo full
|
78
|
+
{% endexample %}
|
79
|
+
```
|
80
|
+
|
81
|
+
* Inline example box to be used in the middle of texts for small examples:
|
82
|
+
```
|
83
|
+
{% example inline %}
|
84
|
+
box de exemplo full
|
85
|
+
{% endexample %}
|
86
|
+
```
|
87
|
+
|
88
|
+
> Note that any of the options can be combined, such as `full checkers`, `inline checkers dark`, etc.
|
89
|
+
|
90
|
+
### Char-tables
|
91
|
+
|
92
|
+
To create a chartable, just use the `{% typography [...font-family] %}` tag with the glyph list inside, separated by `,`. Example:
|
93
|
+
|
94
|
+
```
|
95
|
+
{% typography Helvetica, sans-serif %}
|
96
|
+
a,b,c,d,e,f,g,h,i,j,k
|
97
|
+
A,B,C,D,E,F,G,H,I,J,K
|
98
|
+
{% endtypography %}
|
99
|
+
```
|
100
|
+
|
101
|
+
### Color pallete
|
102
|
+
|
103
|
+
To create a color pallete, just use the `{% colors %}` tag with the colors values inside, separated by a line break. You can algo place another value to be shown to the user instead of the raw data, useful for projects that uses color variables:
|
104
|
+
|
105
|
+
```
|
106
|
+
{% colors %}
|
107
|
+
#fefede
|
108
|
+
rgba(10,20,10,.5)
|
109
|
+
rgba(10,20,10,.3);$var-name
|
110
|
+
{% endcolors %}
|
111
|
+
```
|
112
|
+
|
42
113
|
## Contributing
|
43
114
|
|
44
115
|
Go to [Hyojun.guideline](https://bitbucket.org/fbiz/hyojun.guideline/) for more information.
|
data/jekyll-gl.gemspec
CHANGED
@@ -4,11 +4,11 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "jekyll-gl"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.3"
|
8
8
|
spec.authors = ["Marcelo Miranda Carneiro"]
|
9
9
|
spec.email = ["mcarneiro@fbiz.com.br"]
|
10
10
|
spec.summary = %q{Hyojun.guideline Jekyll Plugin}
|
11
|
-
spec.description = %q{This Jekyll plugin will place a ".gl" class in every mardown generated elment to automate Hyojun.guideline.}
|
11
|
+
spec.description = %q{This Jekyll plugin will place a ".gl" class in every mardown generated elment to automate Hyojun.guideline. Also, creates some liquid tags for the markdown files.}
|
12
12
|
spec.homepage = "http://fbiz.bitbucket.org/hyojun.guideline/"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
data/lib/jekyll-gl.rb
CHANGED
@@ -87,5 +87,58 @@ module Jekyll
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
+
module Jekyll
|
91
|
+
class Typography < Liquid::Block
|
92
|
+
|
93
|
+
def initialize(tag_name, markup, options)
|
94
|
+
super
|
95
|
+
|
96
|
+
@font_family = markup
|
97
|
+
end
|
98
|
+
|
99
|
+
def render(context)
|
100
|
+
content = ''
|
101
|
+
|
102
|
+
super.split(/[,\n]/).each do |val|
|
103
|
+
next if val == ''
|
104
|
+
content += '<li title="{{glyph}}"> {{glyph}} </li>'.gsub('{{glyph}}', val);
|
105
|
+
end
|
106
|
+
|
107
|
+
'<ul class="gl-char-table" style="font-family: {{family}};">{{content}}</ul>'
|
108
|
+
.gsub('{{family}}', @font_family)
|
109
|
+
.sub('{{content}}', content)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
module Jekyll
|
115
|
+
class Colors < Liquid::Block
|
116
|
+
|
117
|
+
def initialize(tag_name, markup, options)
|
118
|
+
super
|
119
|
+
|
120
|
+
@font_family = markup
|
121
|
+
end
|
122
|
+
|
123
|
+
def render(context)
|
124
|
+
content = ''
|
125
|
+
|
126
|
+
super.split(/[\n]/).each do |val|
|
127
|
+
next if val == ''
|
128
|
+
|
129
|
+
data = (val && val.split(';')) || [];
|
130
|
+
content += '<li title="{{var}}" style="background-color:{{color}};"></li>'
|
131
|
+
.sub('{{var}}', data[1] || data[0] || '')
|
132
|
+
.gsub('{{color}}', data[0] || '');
|
133
|
+
end
|
134
|
+
|
135
|
+
'<ul class="gl-colors">{{content}}</ul>'
|
136
|
+
.sub('{{content}}', content)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
90
141
|
Liquid::Template.register_tag('example', Jekyll::Example)
|
142
|
+
Liquid::Template.register_tag('typography', Jekyll::Typography)
|
143
|
+
Liquid::Template.register_tag('colors', Jekyll::Colors)
|
91
144
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-gl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Miranda Carneiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,7 +25,8 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
description: This Jekyll plugin will place a ".gl" class in every mardown generated
|
28
|
-
elment to automate Hyojun.guideline.
|
28
|
+
elment to automate Hyojun.guideline. Also, creates some liquid tags for the markdown
|
29
|
+
files.
|
29
30
|
email:
|
30
31
|
- mcarneiro@fbiz.com.br
|
31
32
|
executables: []
|