jekyll-swift-theme 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -2
- data/_includes/shorts/gallery.html +9 -0
- data/_includes/shorts/picture.html +11 -0
- data/_includes/shorts/youtube.html +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e986063b8373632bd776d7ec1fbbcd6b854f69ef6b56ab64977fa6fa1f680c8b
|
4
|
+
data.tar.gz: 4828fc363d51d011ff1af311175fea00a69de2e416c9b0619fe485f4bf153655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67f63009901979e66e9d8030424b228e287698db0288dd8305802f11163f5cb6bdd3f8816e3c144b5948b94065be27d24060515f7177e361692d42221c32141e
|
7
|
+
data.tar.gz: 97e0678b0da1c139c150a3af240d5c2416b810d5284aa9b1ff4c76b96a816dbc34d8911fb169d47fcf03e5fa8e8b81722c8cbccb58b2cf2a18560423e425d308
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
![jekyll-swift-theme](https://socialify.git.ci/elyday/jekyll-swift-theme/image?description=1&forks=1&language=1&owner=1&pattern=Circuit%20Board&stargazers=1&theme=Dark)
|
2
|
+
|
3
|
+
![](https://ruby-gem-downloads-badge.herokuapp.com/jekyll-swift-theme?type=total&metric=true)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/jekyll-swift-theme.svg)](https://badge.fury.io/rb/jekyll-swift-theme)
|
2
5
|
|
3
6
|
This theme is designed for blogging purposes. Feel free to extend it for other use cases though.
|
4
7
|
|
@@ -14,12 +17,49 @@ This Theme is a port of [Hugo Swift Theme](https://github.com/onweru/hugo-swift-
|
|
14
17
|
* Pagination
|
15
18
|
* Dark Mode
|
16
19
|
* Native lazy loading of images
|
20
|
+
* Picture & Gallery Support
|
21
|
+
* YouTube Video Support
|
17
22
|
|
18
23
|
### TODO
|
19
24
|
|
20
25
|
* Syntax Highlighting
|
21
|
-
* Gallery & Video Support
|
22
26
|
* Staticman
|
27
|
+
* Tag Sites
|
28
|
+
|
29
|
+
### Pictures
|
30
|
+
|
31
|
+
You can include pictures very simple. You want to use darkmode images when darkmode is enabled on a device and a regular image on lightmode? It takes 3 include parameters
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
{% include shorts/picture.html normalPath="images/read.jpg" darkPath="images/speakers.jpg" alt="reading" %}
|
35
|
+
```
|
36
|
+
|
37
|
+
### Gallery
|
38
|
+
|
39
|
+
You can include a gallery in your article. For this you need first to define the gallery with its images in the file `_data/gallery.yml`.
|
40
|
+
|
41
|
+
```yaml
|
42
|
+
example:
|
43
|
+
- image: fast-lane.jpg
|
44
|
+
description: a fast lane
|
45
|
+
|
46
|
+
- image: stuck.jpg
|
47
|
+
description: a stuck bike
|
48
|
+
```
|
49
|
+
|
50
|
+
Then you can include the gallery with the used key.
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
{% include shorts/gallery.html name="example" %}
|
54
|
+
```
|
55
|
+
|
56
|
+
### YouTube Video Support
|
57
|
+
|
58
|
+
You can include a youtube video very simple.
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
{% include shorts/youtube.html videoId="mgiWeQI0_nM" %
|
62
|
+
```
|
23
63
|
|
24
64
|
## Installation
|
25
65
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
{% assign gallery = site.data.gallery[include.name] %}
|
2
|
+
|
3
|
+
<div class="gallery">
|
4
|
+
{% for item in gallery %}
|
5
|
+
<figure class="gallery_item">
|
6
|
+
<img src="{{ '/assets/images/' | append: item.image | relativePath }}" class="gallery_image" alt="{{ item.description }}" />
|
7
|
+
</figure>
|
8
|
+
{% endfor %}
|
9
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{% assign image = "/assets/images/" | append: include.normalPath %}
|
2
|
+
{% assign darkImage = "/assets/images/" | append: include.normalPath %}
|
3
|
+
|
4
|
+
{% if include.darkPath %}
|
5
|
+
{% assign darkImage = "/assets/images/" | append: include.darkPath %}
|
6
|
+
{% endif %}
|
7
|
+
|
8
|
+
<picture class="nav-logo">
|
9
|
+
<source srcset="{{ darkImage | relativePath }}" media="(prefers-color-scheme: dark)">
|
10
|
+
<img srcset="{{ image | relativePath }}" alt="{{ include.alt }}">
|
11
|
+
</picture>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-swift-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- elyday
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -111,6 +111,9 @@ files:
|
|
111
111
|
- _includes/intro.html
|
112
112
|
- _includes/nav.html
|
113
113
|
- _includes/related.html
|
114
|
+
- _includes/shorts/gallery.html
|
115
|
+
- _includes/shorts/picture.html
|
116
|
+
- _includes/shorts/youtube.html
|
114
117
|
- _layouts/default.html
|
115
118
|
- _layouts/home.html
|
116
119
|
- _layouts/page.html
|