jekyll-theme-simplex-v2 0.9.8.15
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 +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +240 -0
- data/_includes/footer.html +5 -0
- data/_includes/head.html +49 -0
- data/_includes/header.html +20 -0
- data/_includes/nav.html +30 -0
- data/_includes/scripts.html +3 -0
- data/_includes/snippet.html +38 -0
- data/_layouts/category.html +25 -0
- data/_layouts/default.html +20 -0
- data/_layouts/home.html +16 -0
- data/_layouts/page.html +7 -0
- data/_layouts/post.html +60 -0
- data/_sass/_feed.scss +173 -0
- data/_sass/_footer.scss +52 -0
- data/_sass/_global.scss +157 -0
- data/_sass/_header.scss +308 -0
- data/_sass/_index.scss +8 -0
- data/_sass/_mixins.scss +67 -0
- data/_sass/_page.scss +21 -0
- data/_sass/_post.scss +138 -0
- data/_sass/_variables.scss +290 -0
- data/assets/fonts/Roboto-Bold.ttf +0 -0
- data/assets/fonts/Roboto-Bold.woff +0 -0
- data/assets/fonts/Roboto-Bold.woff2 +0 -0
- data/assets/fonts/Roboto-Regular.ttf +0 -0
- data/assets/fonts/Roboto-Regular.woff +0 -0
- data/assets/fonts/Roboto-Regular.woff2 +0 -0
- data/assets/fonts/RobotoMono-Bold.ttf +0 -0
- data/assets/fonts/RobotoMono-Bold.woff +0 -0
- data/assets/fonts/RobotoMono-Bold.woff2 +0 -0
- data/assets/fonts/RobotoMono-Regular.ttf +0 -0
- data/assets/fonts/RobotoMono-Regular.woff +0 -0
- data/assets/fonts/RobotoMono-Regular.woff2 +0 -0
- data/assets/fonts/RobotoSlab-Bold.ttf +0 -0
- data/assets/fonts/RobotoSlab-Bold.woff +0 -0
- data/assets/fonts/RobotoSlab-Bold.woff2 +0 -0
- data/assets/fonts/RobotoSlab-Regular.ttf +0 -0
- data/assets/fonts/RobotoSlab-Regular.woff +0 -0
- data/assets/fonts/RobotoSlab-Regular.woff2 +0 -0
- data/assets/fonts/fonts.css +54 -0
- data/assets/img/icons/arrow_left.svg +1 -0
- data/assets/img/icons/arrow_right.svg +1 -0
- data/assets/img/icons/simplex_logo.svg +96 -0
- data/assets/js/jquery.slim.min.js +2 -0
- data/assets/js/lity.min.css +3 -0
- data/assets/js/lity.min.js +5 -0
- data/assets/js/tools.js +14 -0
- data/assets/style.scss +31 -0
- metadata +136 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d81becaac9b2f6c39464859f7ec03926b57cd43915e2d323380a1d4b6bca093e
|
4
|
+
data.tar.gz: 99f650990efebf6a94b404a20f12f7e483cafcda7da1d607d5ec40e73fd074d0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 523c3f09549a8347f3ada47c229605c357d5fa623e016d513f731c6469b49956b1962f50b8f7b81527577b69d0ae11ea5df895f4f7d7c83d634834be3d361914
|
7
|
+
data.tar.gz: bc24b3368fc939bb09852c0053d7367b23c303c4fae7078229e7ec64ccc8a9b40ec35b74452a231aa873afe4dfa39b26ea80c66e679292f86f3e7420dc0578db
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,240 @@
|
|
1
|
+
[](https://golas.blog/)
|
2
|
+
[](https://simplex-demo.golas.systems/)
|
3
|
+
|
4
|
+
The source of the generic demo is available here: https://github.com/andreondra/simplex-demo
|
5
|
+
|
6
|
+
# <img src="assets/img/icons/simplex_logo.svg" alt="Simplex" height="50"/>
|
7
|
+
|
8
|
+
A *simple* yet neat blogging theme. Developed for the [golas blog](https://golas.blog/) project.
|
9
|
+
|
10
|
+
|
11
|
+
## 👓 Preview
|
12
|
+

|
13
|
+
|
14
|
+
## 💎 Features
|
15
|
+
### Responsive
|
16
|
+

|
17
|
+
|
18
|
+
### Dark mode
|
19
|
+

|
20
|
+
|
21
|
+
### Buttons
|
22
|
+

|
23
|
+
|
24
|
+
### Lity Lightbox
|
25
|
+
Supports images, videos, iFrames and more. See below for syntax.
|
26
|
+
|
27
|
+
### Open Graph tags
|
28
|
+
|
29
|
+
## ℹ Installation
|
30
|
+
|
31
|
+
Add this line to your Jekyll site's `Gemfile`:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
gem "jekyll-theme-simplex"
|
35
|
+
```
|
36
|
+
|
37
|
+
And add this line to your Jekyll site's `_config.yml`:
|
38
|
+
|
39
|
+
```yaml
|
40
|
+
theme: jekyll-theme-simplex
|
41
|
+
```
|
42
|
+
|
43
|
+
And then execute:
|
44
|
+
|
45
|
+
$ bundle
|
46
|
+
|
47
|
+
Or install it yourself as:
|
48
|
+
|
49
|
+
$ gem install jekyll-theme-simplex
|
50
|
+
|
51
|
+
## ✔ Usage
|
52
|
+
|
53
|
+
### ⚙ Setting up the template
|
54
|
+
Add following to the `_config.yml`:
|
55
|
+
```yaml
|
56
|
+
logo_img: /assets/img/icons/golasblog_logo.svg #Absolute path to the logo. If not specified, the title will be displayed instead.
|
57
|
+
copyright: © Golasowski 2020 #Your copyright.
|
58
|
+
|
59
|
+
collections:
|
60
|
+
category:
|
61
|
+
output: true
|
62
|
+
authors:
|
63
|
+
output: false
|
64
|
+
|
65
|
+
defaults:
|
66
|
+
-
|
67
|
+
scope:
|
68
|
+
path: ""
|
69
|
+
type: category
|
70
|
+
values:
|
71
|
+
layout: "category"
|
72
|
+
```
|
73
|
+
|
74
|
+
### ✨ Defining categories
|
75
|
+
Create a `_category` folder in the root directory of the blog. Create a `.md` file for every category with the contents:
|
76
|
+
```
|
77
|
+
---
|
78
|
+
category: [design] #Category ID.
|
79
|
+
hue: var(--c-themeHueOrange) #Category hue. See note [1].
|
80
|
+
title: Design #Category title.
|
81
|
+
description: Lorem ipsum dolor sit amet.
|
82
|
+
---
|
83
|
+
```
|
84
|
+
|
85
|
+
### 🤵 Defining authors
|
86
|
+
Create a `_authors` folder in the root directory. Create a `.md` file for every author with the contents:
|
87
|
+
```
|
88
|
+
---
|
89
|
+
nick: golas #Author's nick.
|
90
|
+
full_name: Andrew Golasowski #Author's full name.
|
91
|
+
photo_dir: assets/img/authors/golas.png #Path to the author's pic.
|
92
|
+
---
|
93
|
+
```
|
94
|
+
|
95
|
+
### 📰 Defining the menu
|
96
|
+
Create a `_data` folder in the root directory. In the folder, create a `nav.yaml` file. Here's an example:
|
97
|
+
```yaml
|
98
|
+
- title: Programming #Menu item title.
|
99
|
+
url: category/programming.html #Menu item url.
|
100
|
+
icon: assets/img/icons/programming.svg #Menu item icon.
|
101
|
+
hue: "var(--c-themeHueRed)" #Menu item hue - see note [1].
|
102
|
+
subnav: #Subnav. See note [2].
|
103
|
+
- title: C++ #Submenu item title.
|
104
|
+
url: category/cpp.html #Submenu item url.
|
105
|
+
hue: "var(--c-themeHueOrange)" #Submenu item hue.
|
106
|
+
subnav: #Another subnav
|
107
|
+
- title: Libraries
|
108
|
+
url: libs.html
|
109
|
+
hue: "var(--c-themeHueBlue)"
|
110
|
+
- title: Design
|
111
|
+
url: category/design.html
|
112
|
+
icon: assets/img/icons/design.svg
|
113
|
+
hue: "var(--c-themeHueRed)"
|
114
|
+
```
|
115
|
+
#### Pro tip:
|
116
|
+
Use color icons with the same hue as the menu items. Icons will be black and on hover the color will be shown.
|
117
|
+
|
118
|
+
### ✒ Creating posts
|
119
|
+
Posts are created in the `_posts` directory. Following front matter attributes are supported:
|
120
|
+
```
|
121
|
+
---
|
122
|
+
layout: post #Do not change.
|
123
|
+
category: [programming, testing] #One, more categories or no at all.
|
124
|
+
title: "Lorem ipsum" #Article title.
|
125
|
+
author: andy #Author's nick.
|
126
|
+
nextPart: _posts/2021-01-30-example.md #Next part.
|
127
|
+
prevPart: _posts/2021-01-30-example.md #Previous part.
|
128
|
+
og_image: assets/example.png #Open Graph preview image.
|
129
|
+
og_description: "Example description." #Open Graph description.
|
130
|
+
fb_app_id: example
|
131
|
+
---
|
132
|
+
Your markdown content here.
|
133
|
+
```
|
134
|
+
|
135
|
+
### ⚡ Syntax highlighting
|
136
|
+
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).
|
137
|
+
|
138
|
+
Note - `@media` is used to manage different styles for light and dark web browser mode. See `_variables.scss` file for details.
|
139
|
+
|
140
|
+
### 📷 Inserting pictures
|
141
|
+
Classic Markdown syntax is supported. However, to be able to use the lightbox feature, you have to use HTML syntax. Minimal example:
|
142
|
+
```html
|
143
|
+
<a href="/assets/example.jpg" data-lity>
|
144
|
+
<img src="/assets/example_thumbnail.jpg"/>
|
145
|
+
</a>
|
146
|
+
```
|
147
|
+
|
148
|
+
To provide image description use this syntax:
|
149
|
+
```html
|
150
|
+
<div class="sx-picture">
|
151
|
+
<a href="/assets/example.jpg" data-lity>
|
152
|
+
<img src="/assets/example_thumbnail.jpg"/>
|
153
|
+
</a>
|
154
|
+
<span class="sx-subtitle">My picture description.</span>
|
155
|
+
</div>
|
156
|
+
```
|
157
|
+
|
158
|
+
**Do not forget the `data-lity` attribute.**
|
159
|
+
|
160
|
+
#### ↔ Centering
|
161
|
+
To center pictures, put the code inside a `div` with `sx-center` class like this:
|
162
|
+
```html
|
163
|
+
<div markdown=1 class="sx-center">
|
164
|
+

|
165
|
+
</div>
|
166
|
+
```
|
167
|
+
|
168
|
+
### 🔘 Buttons
|
169
|
+
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.
|
170
|
+
```html
|
171
|
+
<div class='sx-button'>
|
172
|
+
<a href='https://your.link.here.example.com/' class='sx-button__content theme'>
|
173
|
+
<img src='/assets/img/icons/example_icon.svg'/>#{text}
|
174
|
+
</a>
|
175
|
+
</div>
|
176
|
+
```
|
177
|
+
|
178
|
+
Markdown attribute can be omitted if you don't use markdown inside the block (e.g. by using the lightbox syntax).
|
179
|
+
|
180
|
+
### ℹ Notes
|
181
|
+
[1] Hue can be either one of the predefined colors or any of the CSS `color` attribute supported values (hex, rgb...).
|
182
|
+
|
183
|
+
[2] Submenus are generated recursively, so any menu (and submenu) can have its own submenu.
|
184
|
+
|
185
|
+
#### Predefined colors
|
186
|
+
You can use following predefined colors:
|
187
|
+
```scss
|
188
|
+
--c-themePrimaryLight: #EFEFEF;
|
189
|
+
--c-themePrimaryDark: #101010;
|
190
|
+
--c-themeSecondaryLight: #DADADA;
|
191
|
+
--c-themeSecondaryDark: #252525;
|
192
|
+
--c-themeTerniaryLight: #AEAEAE;
|
193
|
+
--c-themeTerniaryDark: #515151;
|
194
|
+
--c-themeQuaternaryLight: #919191;
|
195
|
+
--c-themeQuaternaryDark: #888888;
|
196
|
+
|
197
|
+
--c-themeHueRed: #C02717;
|
198
|
+
--c-themeHueGreen: #8EA604;
|
199
|
+
--c-themeHueBlue: #2E86AB;
|
200
|
+
--c-themeHueOrange: #E59500;
|
201
|
+
--c-themeHuePurple: #9F00CE;
|
202
|
+
--c-themeHueBrown: #230007;
|
203
|
+
```
|
204
|
+
These colors are CSS variables, usage: `var(--var-name)`
|
205
|
+
|
206
|
+
## Add-ons
|
207
|
+
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.
|
208
|
+
|
209
|
+
### Buttons (button.rb)
|
210
|
+
Adds a tag to simplify insertion of buttons:
|
211
|
+
```
|
212
|
+
{% button red|https://www.example.com/|/assets/img/icons/cog.svg %}
|
213
|
+
Download binary
|
214
|
+
{% endbutton %}
|
215
|
+
```
|
216
|
+
|
217
|
+
## 🤝 Contributing
|
218
|
+
|
219
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/andreondra/jekyll-theme-simplex).
|
220
|
+
|
221
|
+
## ⚙ Development
|
222
|
+
|
223
|
+
To set up your environment to develop this theme, run `bundle install`.
|
224
|
+
|
225
|
+
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
226
|
+
If you recieve an error stating, `"require': cannot load such file -- webrick (LoadError)'` Simply run `bundle add webrick` and this will install the dependencies for running the Jekyll and then you may repeat Step 2!
|
227
|
+
|
228
|
+
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
229
|
+
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-simplex.gemspec` accordingly.
|
230
|
+
|
231
|
+
## Credits
|
232
|
+
Includes icons by [uxwing](https://uxwing.com/).
|
233
|
+
|
234
|
+
The lightbox feature is provided by [Lity](https://github.com/jsor/lity) licensed under the [MIT License](https://opensource.org/licenses/MIT).
|
235
|
+
|
236
|
+
Uses [jQuery](https://github.com/jquery/jquery) JavaScript plugin licensed under the [MIT License](https://opensource.org/licenses/MIT).
|
237
|
+
|
238
|
+
## ⚖ License
|
239
|
+
© Ondrej Golasowski. The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
240
|
+
|
data/_includes/head.html
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
<link rel="stylesheet" href="{{ site.url }}/assets/fonts/fonts.css"/>
|
2
|
+
<link rel="stylesheet" href="{{ site.url }}/assets/style.css"/>
|
3
|
+
<link rel="stylesheet" href="{{ site.url }}/assets/js/lity.min.css"/>
|
4
|
+
|
5
|
+
{% if site.favicon != nil %}
|
6
|
+
<link rel='shortcut icon' type='image/x-icon' href='{{ site.favicon }}' />
|
7
|
+
{% endif %}
|
8
|
+
|
9
|
+
<meta charset="UTF-8">
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
11
|
+
|
12
|
+
<meta property="og:site_name" content="{{ site.title }}" />
|
13
|
+
<meta
|
14
|
+
property="og:title"
|
15
|
+
content="
|
16
|
+
{% if page.title != nil %}
|
17
|
+
{{page.title}}
|
18
|
+
{% else %}
|
19
|
+
{{site.title}}
|
20
|
+
{% endif %}
|
21
|
+
"
|
22
|
+
/>
|
23
|
+
{% if page.og_description != nil %}
|
24
|
+
<meta property="og:description" content="{{ page.og_description }}" />
|
25
|
+
{% endif %}
|
26
|
+
<meta property="og:url" content="{{ site.url }}/{{ page.url }}" />
|
27
|
+
{% if page.og_type != nil %}
|
28
|
+
<meta property="og:type" content="{{ page.og_type }}" />
|
29
|
+
{% else %}
|
30
|
+
<meta property="og:type" content="article" />
|
31
|
+
{% endif %}
|
32
|
+
{% if page.og_image != nil %}
|
33
|
+
<meta property="og:image" content="{{ site.url }}/{{ page.og_image }}" />
|
34
|
+
<meta property="og:image:secure_url" content="{{ site.url }}/{{ page.og_image }}" />
|
35
|
+
{% endif %}
|
36
|
+
{% if page.fb_app_id != nil %}
|
37
|
+
<meta property="fb:app_id" content="{{ page.fb_app_id }}" />
|
38
|
+
{% else if site.fb_app_id != nil %}
|
39
|
+
<meta property="fb:app_id" content="{{ site.fb_app_id }}" />
|
40
|
+
{% endif %}
|
41
|
+
|
42
|
+
|
43
|
+
<title>
|
44
|
+
{% if page.title != nil %}
|
45
|
+
{{page.title}}
|
46
|
+
{% else %}
|
47
|
+
{{site.title}}
|
48
|
+
{% endif %}
|
49
|
+
</title>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<header class="header">
|
2
|
+
<section class="logo">
|
3
|
+
<a href="{{ site.url }}/" class="logo__link">
|
4
|
+
{% if site.logo_img != nil %}
|
5
|
+
<h1 style="display: none;">{{ site.title }}</h1>
|
6
|
+
<img class="logo__link__img" src="{{site.logo_img}}" />
|
7
|
+
{% else %}
|
8
|
+
<h1>{{ site.title }}</h1>
|
9
|
+
{% endif %}
|
10
|
+
</a>
|
11
|
+
</section>
|
12
|
+
<button id="menuToggle">
|
13
|
+
<div></div>
|
14
|
+
<div></div>
|
15
|
+
<div></div>
|
16
|
+
</button>
|
17
|
+
<nav class="menu">
|
18
|
+
{% include nav.html nav=site.data.nav %}
|
19
|
+
</nav>
|
20
|
+
</header>
|
data/_includes/nav.html
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
{% if include.embedded != nil %}
|
2
|
+
<ul class="list">
|
3
|
+
{% else %}
|
4
|
+
<ul class="list primary">
|
5
|
+
{% endif %}
|
6
|
+
{% for item in include.nav %}
|
7
|
+
<li class="item">
|
8
|
+
|
9
|
+
<div class="item-controls">
|
10
|
+
<a href="{{ site.url }}/{{ item.url }}">
|
11
|
+
{% if item.icon != nil %}
|
12
|
+
<img src="{{ site.url }}/{{ item.icon }}"/>
|
13
|
+
{% endif %}
|
14
|
+
{% if item.hue != nil %}
|
15
|
+
<p style="color: {{ item.hue }}">{{ item.title }}</p>
|
16
|
+
{% else %}
|
17
|
+
<p>{{ item.title }}</p>
|
18
|
+
{% endif%}
|
19
|
+
</a>
|
20
|
+
|
21
|
+
{% if item.subnav %}
|
22
|
+
<a class="button-submenu" href="#"><i class="arrow"></i></a>
|
23
|
+
</div>
|
24
|
+
{% include nav.html nav=item.subnav embedded=true %}
|
25
|
+
{% else %}
|
26
|
+
</div>
|
27
|
+
{% endif %}
|
28
|
+
</li>
|
29
|
+
{% endfor %}
|
30
|
+
</ul>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<style>
|
2
|
+
.snippet_{{ post.id | slugify: "ascii" }}::after {
|
3
|
+
|
4
|
+
background-image:
|
5
|
+
radial-gradient(ellipse closest-side, var(--c-snippetBackgroundExternal), var(--c-snippetBackgroundInternal)),
|
6
|
+
url(
|
7
|
+
{% if post.image_dir == "default" %}
|
8
|
+
{% assign url = post.path | split: "." | first | split: "/" | last %}
|
9
|
+
{{ site.url }}/assets/posts/{{ url }}/background_image.png
|
10
|
+
{% else if post.image_dir != nil %}
|
11
|
+
{{ site.url }}/{{ post.image_dir }}
|
12
|
+
{% endif %}
|
13
|
+
);
|
14
|
+
}
|
15
|
+
</style>
|
16
|
+
<a class="snippet__link" href="{{ post.url }}">
|
17
|
+
<section class="snippet__data">
|
18
|
+
<section class="snippet__data__metadata">
|
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"}}">{{ site.category | where: "category", category | map: "title"}}</p>
|
22
|
+
{% else %}
|
23
|
+
<p class="snippet__data__metadata__category__title">No category</p>
|
24
|
+
{% endfor %}
|
25
|
+
</section>
|
26
|
+
<p class="snippet__data__metadata__date">{{ post.date | date: '%B %d, %Y' }}</p>
|
27
|
+
</section>
|
28
|
+
<h2 class="snippet__data__header">{{post.title }}</h2>
|
29
|
+
<p class="snippet__data__text">{{ post.excerpt | strip_html }}</p>
|
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 %}
|
37
|
+
</section>
|
38
|
+
</a>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<section class="feed">
|
6
|
+
<section class="feed__description">
|
7
|
+
{% if page.title != nil %}
|
8
|
+
<h1>{{ page.title }}</h1>
|
9
|
+
{% endif %}
|
10
|
+
{% if page.description != nil %}
|
11
|
+
<p>{{ page.description }}</p>
|
12
|
+
{% endif %}
|
13
|
+
</section>
|
14
|
+
|
15
|
+
{% for post in site.posts %}
|
16
|
+
<section class="snippet snippet_{{ post.id | slugify: "ascii" }}">
|
17
|
+
{% for category in post.category %}
|
18
|
+
{% if page.category contains category %}
|
19
|
+
{% include snippet.html post=post %}
|
20
|
+
{% break %}
|
21
|
+
{% endif %}
|
22
|
+
{% endfor %}
|
23
|
+
</section>
|
24
|
+
{% endfor %}
|
25
|
+
</section>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
---
|
4
|
+
|
5
|
+
<!DOCTYPE html>
|
6
|
+
<html lang="en">
|
7
|
+
<head>
|
8
|
+
{% include head.html %}
|
9
|
+
</head>
|
10
|
+
<body class="index">
|
11
|
+
|
12
|
+
{% include header.html %}
|
13
|
+
|
14
|
+
{{content}}
|
15
|
+
|
16
|
+
{% include footer.html %}
|
17
|
+
|
18
|
+
{% include scripts.html %}
|
19
|
+
</body>
|
20
|
+
</html>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<section class="feed">
|
6
|
+
<section class="feed__description">
|
7
|
+
<h1>{{ site.title }}</h1>
|
8
|
+
<p>{{ site.description }}</p>
|
9
|
+
</section>
|
10
|
+
|
11
|
+
{% for post in site.posts %}
|
12
|
+
<section class="snippet snippet_{{ post.id | slugify: "ascii" }}">
|
13
|
+
{% include snippet.html post=post %}
|
14
|
+
</section>
|
15
|
+
{% endfor %}
|
16
|
+
</section>
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
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"}}">{{ site.category | where: "category", category | map: "title"}}</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>
|