jekyll-theme-simplex 0.9.1 → 0.9.5.1

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: 9b400558017dc9880481571e324445166a8441f42023c7ae3b6fc9ff4fb1ca73
4
- data.tar.gz: 3f0d9d83445582964ec0aea747926aab7c18dd3c90cc60c7b42d160fe01dd398
3
+ metadata.gz: '018a6a5f2af74af998326fc1916d92c5064a6225a1488ed6e7d89efbcf643caa'
4
+ data.tar.gz: 63ede6dc44bc801e35e7bb7db32135004f78fd55f0b6099c99cf0f63f532455a
5
5
  SHA512:
6
- metadata.gz: 750a553751a456607cbe2dfb022b8fd718a9e331d383624a8eaea4c222c16afa0a69d701391e3ec1fa0b0f3111f4d29eee61b6d24886bbe149bc8961ec132328
7
- data.tar.gz: 04f8f930c2a4861d08b9392bbb01656f4f25b09e4bf9fc0fc8f9caecb3a1de1075d0822129552c36bcc73dad1328fc140377877c28579176d78b83ddd919bb46
6
+ metadata.gz: b42d2ba7eb31fc8df60ff8c299a6e8a48f511e3261307f0eba3eb583df676e2c8e519f9239a8dea9e4b659f2cdfefaec7b9bca4d0d8ca9a828828b2c72c9a4b5
7
+ data.tar.gz: fcf9a760f971c3f98c7133432962d84bb94960cbff3b2c5489f7c693b37f1fdb1f73e3a8ba6cfdf413b787018691b644e43b9e9abaa2c68a4b4da56057de3543
data/README.md CHANGED
@@ -1,10 +1,21 @@
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
+
8
19
  ## ℹ Installation
9
20
 
10
21
  Add this line to your Jekyll site's `Gemfile`:
@@ -29,10 +40,119 @@ Or install it yourself as:
29
40
 
30
41
  ## ✔ Usage
31
42
 
32
- TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
43
+ ### Setting up the template
44
+ Replace the contents of the _config.yml file with the following:
45
+ ```yaml
46
+ title: the Simplex theme #The name of your blog.
47
+ logo_img: /assets/img/icons/golasblog_logo.svg #Absolute path to the logo. If not specified, the title will be displayed instead.
48
+ description: description #Description.
49
+ global_tags: jekyll theme simplex golasblog responsive html5 #Tags.
50
+ copyright: © Golasowski 2020 #Your copyright.
51
+
52
+ collections:
53
+ category:
54
+ output: true
55
+ authors:
56
+ output: false
57
+
58
+ defaults:
59
+ -
60
+ scope:
61
+ path: ""
62
+ type: category
63
+ values:
64
+ layout: "category"
65
+ ```
66
+
67
+ ### ✨ Defining categories
68
+ Create a `_category` folder in the root directory of the blog. Create a `.md` file for every category with the contents:
69
+ ```
70
+ ---
71
+ category: [design] #Category ID.
72
+ hue: var(--c-themeHueOrange) #Category hue. See note [1].
73
+ title: Design #Category title.
74
+ description: Lorem ipsum dolor sit amet.
75
+ ---
76
+ ```
33
77
 
34
- ## 🤝 Contributing
78
+ ### 🤵 Defining authors
79
+ Create a `_authors` folder in the root directory. Create a `.md` file for every author with the contents:
80
+ ```
81
+ ---
82
+ nick: golas #Author's nick.
83
+ full_name: Andrew Golasowski #Author's full name.
84
+ photo_dir: assets/img/authors/golas.png #Path to the author's pic.
85
+ ---
86
+ ```
35
87
 
88
+ ### 📰 Defining the menu
89
+ Create a `_data` folder in the root directory. In the folder, create a `nav.yaml` file. Here's an example:
90
+ ```yaml
91
+ - title: Programming #Menu item title.
92
+ url: category/programming.html #Menu item url.
93
+ icon: assets/img/icons/programming.svg #Menu item icon.
94
+ hue: "var(--c-themeHueRed)" #Menu item hue - see note [1].
95
+ subnav: #Subnav. See note [2].
96
+ - title: C++ #Submenu item title.
97
+ url: cpp.html #Submenu item url.
98
+ hue: "var(--c-themeHueOrange)" #Submenu item hue.
99
+ subnav: #Another subnav
100
+ - title: Libraries
101
+ url: libs.html
102
+ hue: "var(--c-themeHueBlue)"
103
+ - title: Design
104
+ url: design.html
105
+ icon: assets/img/icons/design.svg
106
+ hue: "var(--c-themeHueRed)"
107
+ ```
108
+ #### Pro tip:
109
+ Use color icons with the same hue as the menu items. Icons will be black and on hover the color will be shown.
110
+
111
+ ### ✒ Creating posts
112
+ Posts are created in the `_posts` directory. Following front matter attributes are supported:
113
+ ```
114
+ ---
115
+ layout: post #Do not change.
116
+ category: [programming, testing] #One, more categories or no at all.
117
+ title: "Lorem ipsum" #Article title.
118
+ author: andy #Author's nick.
119
+ ---
120
+ Your markdown content here.
121
+ ```
122
+
123
+ ### Syntax highlighting
124
+ The theme uses Pygments CSS files 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).
125
+
126
+ Note - `@media` is used to supply different styles for light and dark browser mode. See `_variables.scss` file for details.
127
+
128
+ ### ℹ Notes
129
+ [1] Hue can be either one of the predefined colors or any of the CSS `color` attribute supported values (hex, rgb...).
130
+
131
+ [2] Submenus are generated recursively, so any menu (and submenu) can have its own submenu.
132
+
133
+ #### Predefined colors
134
+ You can use following predefined colors:
135
+ ```scss
136
+ --c-themePrimaryLight: #EFEFEF;
137
+ --c-themePrimaryDark: #101010;
138
+ --c-themeSecondaryLight: #DADADA;
139
+ --c-themeSecondaryDark: #252525;
140
+ --c-themeTerniaryLight: #AEAEAE;
141
+ --c-themeTerniaryDark: #515151;
142
+ --c-themeQuaternaryLight: #919191;
143
+ --c-themeQuaternaryDark: #888888;
144
+
145
+ --c-themeHueRed: #C02717;
146
+ --c-themeHueGreen: #8EA604;
147
+ --c-themeHueBlue: #2E86AB;
148
+ --c-themeHueOrange: #E59500;
149
+ --c-themeHuePurple: #9F00CE;
150
+ --c-themeHueBrown: #230007;
151
+ ```
152
+ These colors are CSS variables, usage: `var(--var-name)`
153
+
154
+ ## 🤝 Contributing
155
+
36
156
  Bug reports and pull requests are welcome on [GitHub](https://github.com/andreondra/jekyll-theme-simplex).
37
157
 
38
158
  ## ⚙ Development
@@ -44,7 +164,9 @@ Your theme is setup just like a normal Jekyll site! To test your theme, run `bun
44
164
  When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
45
165
  To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-simplex.gemspec` accordingly.
46
166
 
47
- ## ⚖ License
167
+ ## Credit
168
+ Includes icons by [uxwing](https://uxwing.com/).
48
169
 
49
- The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
170
+ ## License
171
+ © Ondrej Golasowski. The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
50
172
 
@@ -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 %}
@@ -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>
@@ -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>
@@ -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>
@@ -0,0 +1,26 @@
1
+ module Jekyll
2
+ class ButtonTagBlock < Liquid::Block
3
+
4
+ def initialize(tag_name, text, tokens)
5
+ super
6
+ @input = text
7
+ end
8
+
9
+ def render(context)
10
+
11
+ input_split = split_params(@input)
12
+ theme = input_split[0].strip
13
+ link = input_split[1].strip
14
+ icon = input_split[2].strip
15
+
16
+ text = super
17
+ "<div class='sx-button'><a href='#{link}' class='sx-button__content #{theme}'><img src='#{icon}'/>#{text}</a></div>"
18
+ end
19
+
20
+ def split_params(params)
21
+ params.split("|")
22
+ end
23
+ end
24
+ end
25
+
26
+ Liquid::Template.register_tag('button', Jekyll::ButtonTagBlock)
@@ -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;
@@ -7,6 +7,8 @@
7
7
 
8
8
  @include flexbox;
9
9
  padding: 1rem 0 0 0;
10
+ margin-top: auto;
11
+ color: var(--c-footerText);
10
12
 
11
13
  &__about{
12
14
 
@@ -35,6 +37,7 @@
35
37
  height: 1.25rem;
36
38
  margin: 0 .5rem;
37
39
  transition: $t-smooth;
40
+ filter: var(--c-footerImageFilter);
38
41
 
39
42
  &:hover{
40
43
  transform: scale(1.05) rotate(-5deg);