jekyll-theme-simplex 0.9.2 → 0.9.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20d4911b78605ef916527f0e628dec8da5ac56cc89d3a5ce7f8ca6abd05dbe81
4
- data.tar.gz: aacc42d2226b5b07520e4b2bc6b26f40ec5743882b7102473f5bd3418707dfc3
3
+ metadata.gz: 1251d5010926fa8ab805effd541c8e71dbbcac4a1ccfa269c6b6135a8cf5c385
4
+ data.tar.gz: cfd4c10677d13731ee0613356daf35086dbac9e0c850d3882be9f6c60a03c880
5
5
  SHA512:
6
- metadata.gz: 98c0b72bbe1b57418cedb5788e35f7de089c777caf454a35c185bef44b3992583c094059df3662fc75d1d679798ce8365a282cdc3e4f108d671f0537173123ac
7
- data.tar.gz: a98b1e4066d42a214885838db9cb195820b43b4c851907cc0254acbe23bef190bd138daee6cb101b69448dbba0a4bb41b8fb1fd315d98992bcd403afbc4ea264
6
+ metadata.gz: f08231a46883310d187e14de416fc8977361512d339ddae28d8885758c061cc58c00619d2d7ca815c3cd973844ce79b6e8c0db65f902bddba374a27f4d432ec4
7
+ data.tar.gz: 7ea776e9e5bf9f0e179c4b391f7b9a04994b07f4aaff967fa93a4e8082ca6afb6d3567d6e35cece214266fb5c3508d3ad2fb4e52c01a0182510e8653036c53b0
data/README.md CHANGED
@@ -1,10 +1,27 @@
1
- ![GitHub](https://img.shields.io/github/license/andreondra/jekyll-theme-simplex?style=flat-square)
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
- TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
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
- ## 🤝 Contributing
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
- ## ⚖ License
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
- The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
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
 
@@ -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">
@@ -1,6 +1,13 @@
1
1
  <header class="header">
2
2
  <section class="logo">
3
- <h1>golasblog</h1>
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>
@@ -8,11 +8,9 @@
8
8
 
9
9
  <div class="item-controls">
10
10
  <a href="{{ site.url }}/{{ item.url }}">
11
- {% for img in site.static_files %}
12
- {% if img.name == item.icon and img.path contains "img/icons" %}
13
- <img src="{{ site.url }}/{{ img.path }}"/>
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 %}
@@ -1,2 +1,3 @@
1
1
  <script src="{{ site.url }}/assets/js/jquery.slim.min.js"></script>
2
+ <script src="{{ site.url }}/assets/js/lity.min.js"></script>
2
3
  <script src="{{ site.url }}/assets/js/tools.js"></script>
@@ -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 == nil %}
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 != "null" %}
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
- <p class="snippet__data__metadata__category" style="color: {{ site.category | where: "category", post.category | map: "hue" }}">{{ post.category | join: " · " }}</p>
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
- <div class="snippet__data__author">
25
- {% assign author = site.authors | where: "nick", post.author | first %}
26
- <img src="{{ site.url }}/{{ author.photo_dir }}"/>
27
- <p>{{ author.full_name }}</p>
28
- </div>
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>
@@ -2,4 +2,6 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
- {{ content }}
5
+ <main class="page">
6
+ {{ content }}
7
+ </main>
@@ -2,6 +2,59 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
- <section class="post">
6
- {{ content }}
7
- </section>
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>
@@ -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 rgba(0, 0, 0, 0);
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 rgba(0,0,0,0.5);
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;