jekyll-theme-simplex 0.9.2 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +188 -5
- data/_includes/head.html +1 -0
- data/_includes/header.html +8 -1
- data/_includes/nav.html +3 -5
- data/_includes/scripts.html +1 -0
- data/_includes/snippet.html +17 -9
- data/_layouts/page.html +3 -1
- data/_layouts/post.html +56 -3
- data/_sass/_feed.scss +30 -2
- data/_sass/_footer.scss +3 -0
- data/_sass/_global.scss +96 -6
- data/_sass/_header.scss +31 -6
- data/_sass/_page.scss +21 -0
- data/_sass/_post.scss +126 -0
- data/_sass/_variables.scss +220 -16
- data/assets/img/icons/arrow_left.svg +1 -0
- data/assets/img/icons/arrow_right.svg +1 -0
- data/assets/img/icons/brush.svg +47 -0
- data/assets/img/icons/chip.svg +111 -0
- data/assets/img/icons/code.svg +1 -0
- data/assets/img/icons/cog.svg +1 -0
- data/assets/img/icons/cpp.svg +77 -0
- data/assets/img/icons/download.svg +1 -0
- data/assets/img/icons/question.svg +65 -0
- data/assets/img/icons/server.svg +135 -0
- data/assets/img/icons/web.svg +63 -0
- data/assets/js/lity.min.css +3 -0
- data/assets/js/lity.min.js +5 -0
- data/assets/style.scss +2 -0
- metadata +16 -3
- data/assets/img/icons/wrench.svg +0 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1251d5010926fa8ab805effd541c8e71dbbcac4a1ccfa269c6b6135a8cf5c385
|
4
|
+
data.tar.gz: cfd4c10677d13731ee0613356daf35086dbac9e0c850d3882be9f6c60a03c880
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f08231a46883310d187e14de416fc8977361512d339ddae28d8885758c061cc58c00619d2d7ca815c3cd973844ce79b6e8c0db65f902bddba374a27f4d432ec4
|
7
|
+
data.tar.gz: 7ea776e9e5bf9f0e179c4b391f7b9a04994b07f4aaff967fa93a4e8082ca6afb6d3567d6e35cece214266fb5c3508d3ad2fb4e52c01a0182510e8653036c53b0
|
data/README.md
CHANGED
@@ -1,10 +1,27 @@
|
|
1
|
-
|
1
|
+
⚠ WORK IN PROGRESS - DO NOT USE IN PRODUCTION ⚠
|
2
|
+
|
2
3
|
[![Demo](https://img.shields.io/badge/demo-golasblog-blue?style=flat-square)](https://golas.blog/)
|
3
4
|
|
4
5
|
# <img src="assets/img/icons/simplex_logo.svg" alt="Simplex" height="50"/>
|
5
6
|
|
6
7
|
A *simple* yet neat blogging theme. Developed for the [golas blog](https://golas.blog/) project.
|
7
8
|
|
9
|
+
## 👓 Preview
|
10
|
+
![Preview](preview.gif)
|
11
|
+
|
12
|
+
## 💎 Features
|
13
|
+
### Responsive
|
14
|
+
![Responsivity preview](previewResponsive.gif)
|
15
|
+
|
16
|
+
### Dark mode
|
17
|
+
![Dark mode preview](previewDark.gif)
|
18
|
+
|
19
|
+
### Buttons
|
20
|
+
![Buttons preview](previewButtons.png)
|
21
|
+
|
22
|
+
### Lity Lightbox
|
23
|
+
Supports images, videos, iFrames and more. See below for syntax.
|
24
|
+
|
8
25
|
## ℹ Installation
|
9
26
|
|
10
27
|
Add this line to your Jekyll site's `Gemfile`:
|
@@ -29,10 +46,170 @@ Or install it yourself as:
|
|
29
46
|
|
30
47
|
## ✔ Usage
|
31
48
|
|
32
|
-
|
49
|
+
### ⚙ Setting up the template
|
50
|
+
Replace the contents of the _config.yml file with the following:
|
51
|
+
```yaml
|
52
|
+
title: the Simplex theme #The name of your blog.
|
53
|
+
logo_img: /assets/img/icons/golasblog_logo.svg #Absolute path to the logo. If not specified, the title will be displayed instead.
|
54
|
+
description: description #Description.
|
55
|
+
global_tags: jekyll theme simplex golasblog responsive html5 #Tags.
|
56
|
+
copyright: © Golasowski 2020 #Your copyright.
|
57
|
+
|
58
|
+
collections:
|
59
|
+
category:
|
60
|
+
output: true
|
61
|
+
authors:
|
62
|
+
output: false
|
63
|
+
|
64
|
+
defaults:
|
65
|
+
-
|
66
|
+
scope:
|
67
|
+
path: ""
|
68
|
+
type: category
|
69
|
+
values:
|
70
|
+
layout: "category"
|
71
|
+
```
|
33
72
|
|
34
|
-
|
73
|
+
### ✨ Defining categories
|
74
|
+
Create a `_category` folder in the root directory of the blog. Create a `.md` file for every category with the contents:
|
75
|
+
```
|
76
|
+
---
|
77
|
+
category: [design] #Category ID.
|
78
|
+
hue: var(--c-themeHueOrange) #Category hue. See note [1].
|
79
|
+
title: Design #Category title.
|
80
|
+
description: Lorem ipsum dolor sit amet.
|
81
|
+
---
|
82
|
+
```
|
83
|
+
|
84
|
+
### 🤵 Defining authors
|
85
|
+
Create a `_authors` folder in the root directory. Create a `.md` file for every author with the contents:
|
86
|
+
```
|
87
|
+
---
|
88
|
+
nick: golas #Author's nick.
|
89
|
+
full_name: Andrew Golasowski #Author's full name.
|
90
|
+
photo_dir: assets/img/authors/golas.png #Path to the author's pic.
|
91
|
+
---
|
92
|
+
```
|
93
|
+
|
94
|
+
### 📰 Defining the menu
|
95
|
+
Create a `_data` folder in the root directory. In the folder, create a `nav.yaml` file. Here's an example:
|
96
|
+
```yaml
|
97
|
+
- title: Programming #Menu item title.
|
98
|
+
url: category/programming.html #Menu item url.
|
99
|
+
icon: assets/img/icons/programming.svg #Menu item icon.
|
100
|
+
hue: "var(--c-themeHueRed)" #Menu item hue - see note [1].
|
101
|
+
subnav: #Subnav. See note [2].
|
102
|
+
- title: C++ #Submenu item title.
|
103
|
+
url: cpp.html #Submenu item url.
|
104
|
+
hue: "var(--c-themeHueOrange)" #Submenu item hue.
|
105
|
+
subnav: #Another subnav
|
106
|
+
- title: Libraries
|
107
|
+
url: libs.html
|
108
|
+
hue: "var(--c-themeHueBlue)"
|
109
|
+
- title: Design
|
110
|
+
url: design.html
|
111
|
+
icon: assets/img/icons/design.svg
|
112
|
+
hue: "var(--c-themeHueRed)"
|
113
|
+
```
|
114
|
+
#### Pro tip:
|
115
|
+
Use color icons with the same hue as the menu items. Icons will be black and on hover the color will be shown.
|
116
|
+
|
117
|
+
### ✒ Creating posts
|
118
|
+
Posts are created in the `_posts` directory. Following front matter attributes are supported:
|
119
|
+
```
|
120
|
+
---
|
121
|
+
layout: post #Do not change.
|
122
|
+
category: [programming, testing] #One, more categories or no at all.
|
123
|
+
title: "Lorem ipsum" #Article title.
|
124
|
+
author: andy #Author's nick.
|
125
|
+
---
|
126
|
+
Your markdown content here.
|
127
|
+
```
|
128
|
+
|
129
|
+
### ⚡ Syntax highlighting
|
130
|
+
The theme uses Pygments CSS created by [@richleland](https://github.com/richleland). If you want to modify the highlighting styles, just download different CSS or create your own - see [Jekyll docs](https://jekyllrb.com/docs/liquid/tags/#stylesheets-for-syntax-highlighting).
|
35
131
|
|
132
|
+
Note - `@media` is used to manage different styles for light and dark web browser mode. See `_variables.scss` file for details.
|
133
|
+
|
134
|
+
### 📷 Inserting pictures
|
135
|
+
Classic Markdown syntax is supported. However, to be able to use the lightbox feature, you have to use HTML syntax. Minimal example:
|
136
|
+
```html
|
137
|
+
<a href="/assets/example.jpg" data-lity>
|
138
|
+
<img src="/assets/example_thumbnail.jpg"/>
|
139
|
+
</a>
|
140
|
+
```
|
141
|
+
|
142
|
+
To provide image description use this syntax:
|
143
|
+
```html
|
144
|
+
<div class="sx-picture">
|
145
|
+
<a href="/assets/example.jpg" data-lity>
|
146
|
+
<img src="/assets/example_thumbnail.jpg"/>
|
147
|
+
</a>
|
148
|
+
<span class="sx-subtitle">My picture description.</span>
|
149
|
+
</div>
|
150
|
+
```
|
151
|
+
|
152
|
+
**Do not forget the `data-lity` attribute.**
|
153
|
+
|
154
|
+
#### ↔ Centering
|
155
|
+
To center pictures, put the code inside a `div` with `sx-center` class like this:
|
156
|
+
```html
|
157
|
+
<div markdown=1 class="sx-center">
|
158
|
+
![My picture](/assets/example.jpg)
|
159
|
+
</div>
|
160
|
+
```
|
161
|
+
|
162
|
+
### 🔘 Buttons
|
163
|
+
Buttons can be inserted with the following syntax. Just replace `theme` with `red`, `green`, `blue`, `orange`, `purple` or `brown`, specify the target link in `href` attribute and the icon in `src` attribute.
|
164
|
+
```html
|
165
|
+
<div class='sx-button'>
|
166
|
+
<a href='https://your.link.here.example.com/' class='sx-button__content theme'>
|
167
|
+
<img src='/assets/img/icons/example_icon.svg'/>#{text}
|
168
|
+
</a>
|
169
|
+
</div>
|
170
|
+
```
|
171
|
+
|
172
|
+
Markdown attribute can be omitted if you don't use markdown inside the block (e.g. by using the lightbox syntax).
|
173
|
+
|
174
|
+
### ℹ Notes
|
175
|
+
[1] Hue can be either one of the predefined colors or any of the CSS `color` attribute supported values (hex, rgb...).
|
176
|
+
|
177
|
+
[2] Submenus are generated recursively, so any menu (and submenu) can have its own submenu.
|
178
|
+
|
179
|
+
#### Predefined colors
|
180
|
+
You can use following predefined colors:
|
181
|
+
```scss
|
182
|
+
--c-themePrimaryLight: #EFEFEF;
|
183
|
+
--c-themePrimaryDark: #101010;
|
184
|
+
--c-themeSecondaryLight: #DADADA;
|
185
|
+
--c-themeSecondaryDark: #252525;
|
186
|
+
--c-themeTerniaryLight: #AEAEAE;
|
187
|
+
--c-themeTerniaryDark: #515151;
|
188
|
+
--c-themeQuaternaryLight: #919191;
|
189
|
+
--c-themeQuaternaryDark: #888888;
|
190
|
+
|
191
|
+
--c-themeHueRed: #C02717;
|
192
|
+
--c-themeHueGreen: #8EA604;
|
193
|
+
--c-themeHueBlue: #2E86AB;
|
194
|
+
--c-themeHueOrange: #E59500;
|
195
|
+
--c-themeHuePurple: #9F00CE;
|
196
|
+
--c-themeHueBrown: #230007;
|
197
|
+
```
|
198
|
+
These colors are CSS variables, usage: `var(--var-name)`
|
199
|
+
|
200
|
+
## Add-ons
|
201
|
+
Add-ons are distributed as Jekyll plugins. Just download any desired `.rb` file from the repository `_plugin` folder and put it in your `_plugin` folder.
|
202
|
+
|
203
|
+
### Buttons (button.rb)
|
204
|
+
Adds a tag to simplify insertion of buttons:
|
205
|
+
```
|
206
|
+
{% button red|https://www.example.com/|/assets/img/icons/cog.svg %}
|
207
|
+
Download binary
|
208
|
+
{% endbutton %}
|
209
|
+
```
|
210
|
+
|
211
|
+
## 🤝 Contributing
|
212
|
+
|
36
213
|
Bug reports and pull requests are welcome on [GitHub](https://github.com/andreondra/jekyll-theme-simplex).
|
37
214
|
|
38
215
|
## ⚙ Development
|
@@ -44,7 +221,13 @@ Your theme is setup just like a normal Jekyll site! To test your theme, run `bun
|
|
44
221
|
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
45
222
|
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-simplex.gemspec` accordingly.
|
46
223
|
|
47
|
-
##
|
224
|
+
## Credits
|
225
|
+
Includes icons by [uxwing](https://uxwing.com/).
|
226
|
+
|
227
|
+
The lightbox feature is provided by [Lity](https://github.com/jsor/lity) licensed under the [MIT License](https://opensource.org/licenses/MIT).
|
48
228
|
|
49
|
-
|
229
|
+
Uses [jQuery](https://github.com/jquery/jquery) JavaScript plugin licensed under the [MIT License](https://opensource.org/licenses/MIT).
|
230
|
+
|
231
|
+
## ⚖ License
|
232
|
+
© Ondrej Golasowski. The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
50
233
|
|
data/_includes/head.html
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
<link rel="stylesheet" href="{{ site.url }}/assets/fonts/fonts.css"/>
|
2
2
|
<link rel="stylesheet" href="{{ site.url }}/assets/style.css"/>
|
3
|
+
<link rel="stylesheet" href="{{ site.url }}/assets/js/lity.min.css"/>
|
3
4
|
|
4
5
|
<meta charset="UTF-8">
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
data/_includes/header.html
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
<header class="header">
|
2
2
|
<section class="logo">
|
3
|
-
<
|
3
|
+
<a href="{{ site.url }}/" class="logo__link">
|
4
|
+
{% if site.logo_img != nil %}
|
5
|
+
<h1 style="display: none;">golasblog</h1>
|
6
|
+
<img class="logo__link__img" src={{site.logo_img}}/>
|
7
|
+
{% else %}
|
8
|
+
<h1>golasblog</h1>
|
9
|
+
{% endif %}
|
10
|
+
</a>
|
4
11
|
</section>
|
5
12
|
<button id="menuToggle">
|
6
13
|
<div></div>
|
data/_includes/nav.html
CHANGED
@@ -8,11 +8,9 @@
|
|
8
8
|
|
9
9
|
<div class="item-controls">
|
10
10
|
<a href="{{ site.url }}/{{ item.url }}">
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
{% endif %}
|
15
|
-
{% endfor %}
|
11
|
+
{% if item.icon != nil %}
|
12
|
+
<img src="{{ site.url }}/{{ item.icon }}"/>
|
13
|
+
{% endif %}
|
16
14
|
{% if item.hue != nil %}
|
17
15
|
<p style="color: {{ item.hue }}">{{ item.title }}</p>
|
18
16
|
{% else %}
|
data/_includes/scripts.html
CHANGED
data/_includes/snippet.html
CHANGED
@@ -4,11 +4,11 @@
|
|
4
4
|
background-image:
|
5
5
|
radial-gradient(ellipse closest-side, var(--c-snippetBackgroundExternal), var(--c-snippetBackgroundInternal)),
|
6
6
|
url(
|
7
|
-
{% if post.image_dir ==
|
7
|
+
{% if post.image_dir == "default" %}
|
8
8
|
{% assign url = post.path | split: "." | first | split: "/" | last %}
|
9
9
|
{{ site.url }}/assets/posts/{{ url }}/background_image.png
|
10
|
-
{% else if post.image_dir !=
|
11
|
-
{{ post.image_dir }}
|
10
|
+
{% else if post.image_dir != nil %}
|
11
|
+
{{ site.url }}/{{ post.image_dir }}
|
12
12
|
{% endif %}
|
13
13
|
);
|
14
14
|
}
|
@@ -16,15 +16,23 @@
|
|
16
16
|
<a class="snippet__link" href="{{ post.url }}">
|
17
17
|
<section class="snippet__data">
|
18
18
|
<section class="snippet__data__metadata">
|
19
|
-
<
|
19
|
+
<section class="snippet__data__metadata__category">
|
20
|
+
{% for category in post.category %}
|
21
|
+
<p class="snippet__data__metadata__category__title" style="background: {{ site.category | where: "category", category | map: "hue"}}">{{ category }}</p>
|
22
|
+
{% else %}
|
23
|
+
<p class="snippet__data__metadata__category__title">No category</p>
|
24
|
+
{% endfor %}
|
25
|
+
</section>
|
20
26
|
<p class="snippet__data__metadata__date">{{ post.date | date: '%B %d, %Y' }}</p>
|
21
27
|
</section>
|
22
28
|
<h2 class="snippet__data__header">{{post.title }}</h2>
|
23
29
|
<p class="snippet__data__text">{{ post.excerpt | strip_html }}</p>
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
30
|
+
{% if post.author != nil %}
|
31
|
+
<div class="snippet__data__author">
|
32
|
+
{% assign author = site.authors | where: "nick", post.author | first %}
|
33
|
+
<img src="{{ site.url }}/{{ author.photo_dir }}"/>
|
34
|
+
<p>{{ author.full_name }}</p>
|
35
|
+
</div>
|
36
|
+
{% endif %}
|
29
37
|
</section>
|
30
38
|
</a>
|
data/_layouts/page.html
CHANGED
data/_layouts/post.html
CHANGED
@@ -2,6 +2,59 @@
|
|
2
2
|
layout: default
|
3
3
|
---
|
4
4
|
|
5
|
-
<
|
6
|
-
|
7
|
-
|
5
|
+
<article class="post">
|
6
|
+
|
7
|
+
<div class="post__title">
|
8
|
+
<h1 class="post__title__text">{{ page.title }}</h1>
|
9
|
+
</div>
|
10
|
+
<div class="post__meta">
|
11
|
+
<div class="post__meta__category">
|
12
|
+
{% for category in page.category %}
|
13
|
+
<p class="post__meta__category__title" style="background: {{ site.category | where: "category", category | map: "hue"}}">{{ category }}</p>
|
14
|
+
{% else %}
|
15
|
+
<p class="post__meta__category__title">No category</p>
|
16
|
+
{% endfor %}
|
17
|
+
</div>
|
18
|
+
<p class="post__meta__divider">·</p>
|
19
|
+
<div class="post__meta__date">
|
20
|
+
{{ page.date | date: '%B %d, %Y' }}
|
21
|
+
</div>
|
22
|
+
{% if page.author != nil %}
|
23
|
+
{% assign author = site.authors | where: "nick", page.author | first %}
|
24
|
+
<p class="post__meta__divider">·</p>
|
25
|
+
<div class="post__meta__author">
|
26
|
+
<p>by </p>
|
27
|
+
<img class="post__meta__author__photo" src="{{ site.url }}/{{ author.photo_dir }}"/>
|
28
|
+
<p>{{ author.full_name }}</p>
|
29
|
+
</div>
|
30
|
+
{% endif %}
|
31
|
+
</div>
|
32
|
+
|
33
|
+
{% if page.prevPart != nil or page.nextPart != nil %}
|
34
|
+
<div class="post__navigator">
|
35
|
+
<div
|
36
|
+
class="post__navigator__buttons"
|
37
|
+
{% if page.prevPart == nil %}
|
38
|
+
style="justify-content: flex-end;"
|
39
|
+
{% endif %}
|
40
|
+
>
|
41
|
+
{% if page.prevPart != nil %}
|
42
|
+
<a href="{% link {{ page.prevPart }} %}">
|
43
|
+
<img class="arrow-left" src="{{ site.url }}/assets/img/icons/arrow_left.svg"/>
|
44
|
+
Previous
|
45
|
+
</a>
|
46
|
+
{% endif %}
|
47
|
+
{% if page.nextPart != nil %}
|
48
|
+
<a href="{% link {{ page.nextPart }} %}">
|
49
|
+
Next
|
50
|
+
<img class="arrow-right" src="{{ site.url }}/assets/img/icons/arrow_right.svg"/>
|
51
|
+
</a>
|
52
|
+
{% endif %}
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
{% endif %}
|
56
|
+
|
57
|
+
<div class="post__content">
|
58
|
+
{{ content }}
|
59
|
+
</div>
|
60
|
+
</article>
|
data/_sass/_feed.scss
CHANGED
@@ -20,12 +20,19 @@
|
|
20
20
|
flex-direction: column;
|
21
21
|
};
|
22
22
|
|
23
|
+
color: var(--c-feed-title);
|
24
|
+
|
23
25
|
text-align: center;
|
24
26
|
padding: 0 2rem;
|
27
|
+
margin-bottom: 2rem;
|
25
28
|
min-width: 80%;
|
26
29
|
|
27
30
|
h1{
|
28
31
|
margin: 1rem 0 0 0;
|
32
|
+
|
33
|
+
@include for-size('tablet'){
|
34
|
+
margin: 0;
|
35
|
+
}
|
29
36
|
}
|
30
37
|
}
|
31
38
|
|
@@ -42,12 +49,12 @@
|
|
42
49
|
height: 100%;
|
43
50
|
margin: 1rem 0;
|
44
51
|
padding: 1rem 2rem;
|
45
|
-
box-shadow: inset 0px 0px 14px -4px
|
52
|
+
box-shadow: inset 0px 0px 14px -4px var(--c-snippetShadow);
|
46
53
|
transition: $t-smooth;
|
47
54
|
|
48
55
|
&:hover{
|
49
56
|
transform: scale(.99);
|
50
|
-
box-shadow: inset 0px 0px 14px -4px
|
57
|
+
box-shadow: inset 0px 0px 14px -4px var(--c-snippetShadowHover);
|
51
58
|
}
|
52
59
|
}
|
53
60
|
|
@@ -71,6 +78,24 @@
|
|
71
78
|
&__category{
|
72
79
|
text-transform: uppercase;
|
73
80
|
margin: 0;
|
81
|
+
@include flexbox;
|
82
|
+
|
83
|
+
&__title{
|
84
|
+
color: var(--c-noCategoryText);
|
85
|
+
background: var(--c-noCategoryBackground);
|
86
|
+
padding: .2rem .5rem;
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
@include for-size('tablet'){
|
91
|
+
flex-direction: column;
|
92
|
+
|
93
|
+
p{
|
94
|
+
text-align: center;
|
95
|
+
width: 100%;
|
96
|
+
margin: 0;
|
97
|
+
}
|
98
|
+
}
|
74
99
|
}
|
75
100
|
|
76
101
|
&__date{
|
@@ -89,6 +114,7 @@
|
|
89
114
|
|
90
115
|
&__header{
|
91
116
|
margin: 1rem 0 0 0;
|
117
|
+
color: var(--c-articleHeading);
|
92
118
|
|
93
119
|
@include for-size('tablet'){
|
94
120
|
margin: 1rem 0 0 0;
|
@@ -98,12 +124,14 @@
|
|
98
124
|
|
99
125
|
&__text{
|
100
126
|
|
127
|
+
color: var(--c-snippetHeading);
|
101
128
|
margin: 1rem 0 0 0;
|
102
129
|
}
|
103
130
|
|
104
131
|
&__author{
|
105
132
|
|
106
133
|
margin: 1.5rem 0 0 0;
|
134
|
+
color: var(--c-snippetAuthor);
|
107
135
|
|
108
136
|
@include flexbox{
|
109
137
|
flex-direction: row;
|