type-on-strap 2.0.3 → 2.1.0
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 +25 -8
- data/_includes/aligner.html +15 -0
- data/_sass/includes/_navbar.scss +18 -15
- data/_sass/layouts/_page.scss +14 -0
- data/assets/js/main.min.js +1 -1
- data/assets/js/partials/navbar.js +6 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef06489094e16d39de802e362adc81b54d3a464458b52c84c02e0ce2b96cb3b4
|
4
|
+
data.tar.gz: b66a8e226d91c60fce5fa5ecf4abf7f54b39cfc5acb8234db84d4d1058c5f07b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbd593fe75da9e1ccc579b9b33250d7ef176fda853622dd8b6fcf4f8dce15eac6ab8c42096442bda6411552a5f56b592f8408dc85e9b6e943a7397b5b0a8b769
|
7
|
+
data.tar.gz: aed10825e1a462a433438b09d0acabdf0e9c013b6720eb5e2ab08a50a1153ee7a862cabdd63b8bbf1441e166de13ea6c578bd979fc2236565eb6843f0f1649b9
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[](https://travis-ci.org/sylhare/Type-on-Strap)
|
4
4
|
[](https://badge.fury.io/rb/type-on-strap)
|
5
|
-
[](https://hub.docker.com/
|
5
|
+
[](https://hub.docker.com/r/sylhare/type-on-strap)
|
6
6
|
|
7
7
|
A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme) with a few new features:
|
8
8
|
|
@@ -23,13 +23,13 @@ A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chan
|
|
23
23
|
|
24
24
|
## Table of Contents
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
- [Usage](#usage)
|
27
|
+
- [Structure](#structure)
|
28
|
+
- [Configure Type on Strap](#configure-type-on-strap)
|
29
|
+
- [Other Layouts](#other-layouts)
|
30
|
+
- [Feature pages](#feature-pages)
|
31
|
+
- [Advanced](#advanced)
|
32
|
+
- [License](#license)
|
33
33
|
|
34
34
|
## Usage
|
35
35
|
|
@@ -265,6 +265,23 @@ some text in the excerpt
|
|
265
265
|
|
266
266
|
The html is stripped out of the excerpt so it only display text.
|
267
267
|
|
268
|
+
|
269
|
+
### Image aligner
|
270
|
+
|
271
|
+
To easily add align images side by side in your article using the `aligner.html` include:
|
272
|
+
|
273
|
+
```ruby
|
274
|
+
{% include aligner.html images="path/to/img1.png,path/to/img2.png,path/to/img3.png" column=3 %}
|
275
|
+
```
|
276
|
+
|
277
|
+
Use it in any markdown file. There are two fields in the include you need to look into:
|
278
|
+
- _images_: Takes a string separated with `,` of all the images path.
|
279
|
+
- It by default look into `assets/img/` so give the path from there.
|
280
|
+
- _column_: (OPTIONAL) Set the number of column you want your imaged displayed in.
|
281
|
+
- default is 2 columns
|
282
|
+
- `column=3` set 3 columns
|
283
|
+
- `column="auto"` makes as many columns as images
|
284
|
+
|
268
285
|
## Other Layouts
|
269
286
|
Please refer to the [Jekyll docs for writing posts](https://jekyllrb.com/docs/posts/).
|
270
287
|
Non-standard features are documented below.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{% assign images = include.images | split: ',' %}
|
2
|
+
|
3
|
+
{% if include.column == "auto" %}
|
4
|
+
{% assign column = 100.0 | divided_by: images.size %}
|
5
|
+
{% elsif include.column > 0 %}
|
6
|
+
{% assign column = 100.0 | divided_by: include.column %}
|
7
|
+
{% endif %}
|
8
|
+
|
9
|
+
<div class="row">
|
10
|
+
{% for image in images %}
|
11
|
+
<div {% unless column %}class="column"{% endunless%} style="flex: {{ column }}%" >
|
12
|
+
<img src="{{ image | prepend: 'assets/img/' | relative_url }}" alt="{{ image | prepend: '/' | split: '/' | last }}">
|
13
|
+
</div>
|
14
|
+
{% endfor %}
|
15
|
+
</div>
|
data/_sass/includes/_navbar.scss
CHANGED
@@ -81,6 +81,7 @@
|
|
81
81
|
&#pull {
|
82
82
|
i {
|
83
83
|
margin-top: 13px;
|
84
|
+
margin-right: 10px;
|
84
85
|
float: right;
|
85
86
|
}
|
86
87
|
|
@@ -121,7 +122,8 @@
|
|
121
122
|
overflow: hidden;
|
122
123
|
|
123
124
|
/* fade out, then shrink */
|
124
|
-
transition: opacity .
|
125
|
+
transition: opacity .25s 0s, font-size .25s 0s;
|
126
|
+
transition-delay: 0s;
|
125
127
|
|
126
128
|
&.hide {
|
127
129
|
font-size: 0;
|
@@ -129,24 +131,25 @@
|
|
129
131
|
opacity: 0;
|
130
132
|
padding: 0;
|
131
133
|
}
|
134
|
+
}
|
132
135
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
136
|
+
li {
|
137
|
+
width: 100%;
|
138
|
+
text-align: center;
|
139
|
+
font-size: 1em;
|
140
|
+
position: relative;
|
141
|
+
background-color: darken($background-color, 2%);
|
139
142
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
+
&:nth-of-type(4n) {
|
144
|
+
background-color: $background-color;
|
145
|
+
}
|
143
146
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
}
|
147
|
+
a {
|
148
|
+
width: 100%;
|
149
|
+
margin: 0;
|
150
|
+
display: block;
|
149
151
|
}
|
152
|
+
|
150
153
|
}
|
151
154
|
}
|
152
155
|
}
|
data/_sass/layouts/_page.scss
CHANGED
data/assets/js/main.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var elements=document.getElementsByTagName("script");Array.prototype.forEach.call(elements,function(e){if(-1!==e.type.indexOf("math/tex")){var t=e.innerText||e.textContent;t=t.replace(/%.*/g,"");var n=document.createElement("span");-1!==e.type.indexOf("mode=display")?(n.className+="math-display",t="\\displaystyle {"+t+"}"):n.className+="math-inline",katex.render(t,n,{displayMode:!1}),e.parentNode.insertBefore(n,e)}});try{var elem=document.querySelector(".grid"),msnry=new Masonry(elem,{itemSelector:".grid-item",columnWidth:".grid-sizer",gutter:".gutter-sizer",percentPosition:!0}),imgLoad=imagesLoaded(elem);imgLoad.on("progress",function(e,t){msnry.layout()})}catch(e){if(!(e instanceof ReferenceError))throw e}document.addEventListener("DOMContentLoaded",function(e){var t=document.getElementById("pull"),n=document.querySelector("nav ul");t.addEventListener(
|
1
|
+
var elements=document.getElementsByTagName("script");Array.prototype.forEach.call(elements,function(e){if(-1!==e.type.indexOf("math/tex")){var t=e.innerText||e.textContent;t=t.replace(/%.*/g,"");var n=document.createElement("span");-1!==e.type.indexOf("mode=display")?(n.className+="math-display",t="\\displaystyle {"+t+"}"):n.className+="math-inline",katex.render(t,n,{displayMode:!1}),e.parentNode.insertBefore(n,e)}});try{var elem=document.querySelector(".grid"),msnry=new Masonry(elem,{itemSelector:".grid-item",columnWidth:".grid-sizer",gutter:".gutter-sizer",percentPosition:!0}),imgLoad=imagesLoaded(elem);imgLoad.on("progress",function(e,t){msnry.layout()})}catch(e){if(!(e instanceof ReferenceError))throw e}document.addEventListener("DOMContentLoaded",function(e){var t=document.getElementById("pull"),n=document.querySelector("nav ul");["click","touch"].forEach(function(e){t.addEventListener(e,function(e){n.classList.toggle("hide")},!1)}),window.addEventListener("scroll",function(){var e=window.pageYOffset||document.body.scrollTop;document.getElementById("main").style.backgroundPosition="100% "+parseInt(-e/3)+"px, 0%, center top"})});
|
@@ -6,8 +6,11 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
|
6
6
|
var pull = document.getElementById('pull');
|
7
7
|
var menu = document.querySelector('nav ul');
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
|
10
|
+
['click', 'touch'].forEach(function (e) {
|
11
|
+
pull.addEventListener(e, function (e) {
|
12
|
+
menu.classList.toggle('hide')
|
13
|
+
}, false);
|
11
14
|
});
|
12
15
|
|
13
16
|
/*
|
@@ -20,4 +23,4 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
|
20
23
|
|
21
24
|
mainStyle.backgroundPosition = '100% ' + parseInt(-x / 3) + 'px' + ', 0%, center top';
|
22
25
|
});
|
23
|
-
});
|
26
|
+
});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: type-on-strap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylhare
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- LICENSE
|
88
88
|
- README.md
|
89
89
|
- _data/language.yml
|
90
|
+
- _includes/aligner.html
|
90
91
|
- _includes/blog.html
|
91
92
|
- _includes/blog_nav.html
|
92
93
|
- _includes/disqus.html
|
@@ -267,7 +268,7 @@ post_install_message: |
|
|
267
268
|
|
268
269
|
* Use _data/ for social and language customization
|
269
270
|
|
270
|
-
*
|
271
|
+
* Visit https://github.com/sylhare/Type-on-Strap for more info.
|
271
272
|
|
272
273
|
-------------------------------------------------------------------------------------
|
273
274
|
rdoc_options:
|