hematite 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a65a76e006bbd87ea26a66325be19c7acb2308d195f05763874847ed12e57b45
4
- data.tar.gz: 1236b78bc5fc3da5b7135690276bb054aad7fe0c83f8dcf0cfe94ced4fce401d
3
+ metadata.gz: 47d41c5ad077de2f9a92abb5b1b7cf4de0b161579c77de474ffaf112a859c412
4
+ data.tar.gz: 6115ed1ddb55c51ff476305b0ffe2b8d13df1ad66e2062b1ea35fd776e467a69
5
5
  SHA512:
6
- metadata.gz: 4dd620ed3184b4d68aaa698f8fe9d5266e1f75dd9dc8daaa397a8d8ce107d95d32dd18efb85a7646bbe28e25d108b8e5ac6e7597c82879eced10e15d9c5ccfc3
7
- data.tar.gz: ddc863b0e58fc4386c43a6d421de74f538d581aa4956875e25afc8a27f9d651de1c5116f75e3d5cc6bd7f2812458b64fedb2788c612382c9d9a99c13418674be
6
+ metadata.gz: d0089e6c81f4cceb7940a7de6bd305a554182d807cd9443264261bfd35ecb99016377e00dcf1b3523f84ea2e6330b16214b18bb87a439bca870b9fd6b4e9d7ed
7
+ data.tar.gz: 0ba240c05e96ffae702be804c3aef4d2f7785fa1192543836f69cf54c1ac726d58d5ca44a6578f5e3bf1eedd8a3b07be68a628048d46e12f759d11cb284fa93d
@@ -0,0 +1,24 @@
1
+
2
+ {% assign recent_post_limit = recent_post_limit | default: site.hematite.recent_post_limit | default: 8 %}
3
+
4
+ <ul class="recent-posts recent-posts-grid">
5
+ {% for post in site.posts limit:recent_post_limit %}
6
+ <li>
7
+ <h2>
8
+ <a href="{{ post.url }}">{{ post.title }}</a>
9
+ <span class="post-date">{{ post.date | date_to_string }}</span>
10
+ </h2>
11
+ <p class="post-description">{{ post.content | strip_html | truncate: 200 }}</p>
12
+ <div class="tags">
13
+ {% for tag in post.tags %}
14
+ <a
15
+ href="{{ 'assets/html/all_tags.html' | relative_url }}#tag__{{ tag | uri_escape }}"
16
+ class="post-tag"
17
+ >
18
+ {{ tag }}
19
+ </a>
20
+ {% endfor %}
21
+ </div>
22
+ </li>
23
+ {% endfor %}
24
+ </ul>
data/_sass/_elements.scss CHANGED
@@ -197,10 +197,6 @@ a.settings-btn {
197
197
  }
198
198
  }
199
199
 
200
- :root.darkTheme main img.auto-invert {
201
- @include img-invert;
202
- }
203
-
204
200
  // Users can `include' this to invert images automatically in dark mode.
205
201
  @mixin auto-invert-images {
206
202
  @media (prefers-color-scheme: dark) {
@@ -209,7 +205,9 @@ a.settings-btn {
209
205
  }
210
206
  }
211
207
 
212
- :root.darkTheme main img:not(.no-invert) {
213
- @include img-invert;
208
+ :root.darkTheme, :root.veryDarkTheme {
209
+ main img:not(.no-invert) {
210
+ @include img-invert;
211
+ }
214
212
  }
215
213
  }
data/_sass/_layout.scss CHANGED
@@ -141,7 +141,7 @@ nav#post_next_prev {
141
141
  .linkToHeaderContainer {
142
142
  cursor: pointer;
143
143
  position: absolute;
144
- opacity: 0;
144
+ opacity: 0.2;
145
145
 
146
146
  a {
147
147
  margin-left: -1em;
data/_sass/_nav.scss CHANGED
@@ -257,3 +257,86 @@ nav.sidebar {
257
257
  .main-container * {
258
258
  scroll-margin-top: 2.5em;
259
259
  }
260
+
261
+
262
+ .recent-posts {
263
+ display: flex;
264
+ flex-direction: column;
265
+ padding-left: 0;
266
+ align-items: center;
267
+
268
+ flex-wrap: wrap;
269
+ overflow-x: auto;
270
+
271
+ li {
272
+ ::before {
273
+ content: "";
274
+ }
275
+
276
+ list-style: none;
277
+
278
+ border: 1px solid var(--line-color-light);
279
+ border-radius: 4px;
280
+ padding-left: 12px;
281
+ padding-right: 12px;
282
+ margin-bottom: 4px;
283
+
284
+ h2 {
285
+ font-variant: small-caps;
286
+ }
287
+
288
+ .post-date {
289
+ float: right;
290
+ color: var(--text-color-faint);
291
+
292
+ // Ensure that there is space between the date and
293
+ // the post title.
294
+ margin-left: 30px;
295
+ }
296
+
297
+ .post-description {
298
+ color: var(--text-color-faint);
299
+ font-style: italic;
300
+ font-weight: 200;
301
+ }
302
+
303
+ .tags {
304
+ opacity: 0.7;
305
+ font-size: 0.8em;
306
+ }
307
+ }
308
+ }
309
+
310
+ // Scrollable grid layout for the recent posts widget.
311
+ .recent-posts-grid {
312
+ max-height: 500px;
313
+
314
+ li {
315
+ max-width: Min(50vw, 500px);
316
+ }
317
+
318
+ @media screen and (max-width: 500px) {
319
+ max-height: 100vh;
320
+
321
+ li {
322
+ max-width: unset;
323
+ }
324
+ }
325
+ }
326
+
327
+ @media print {
328
+ .recent-posts {
329
+ display: none;
330
+
331
+ // Should we decide to show the recent posts,
332
+ // ensure that they're in a list format.
333
+ max-height: unset;
334
+ max-width: unset;
335
+ overflow-x: hidden;
336
+
337
+ li {
338
+ max-width: unset;
339
+ border: none;
340
+ }
341
+ }
342
+ }
@@ -43,7 +43,7 @@ function getCalendarData(elem, formatElemLabels, dateHeaderTag) {
43
43
  }
44
44
  }
45
45
  catch (e) {
46
- errored = true;
46
+ errored = true;
47
47
  }
48
48
 
49
49
  if (errored) {
@@ -277,7 +277,7 @@ class Calendar {
277
277
  return this.data_[i];
278
278
  }
279
279
 
280
- return null;
280
+ return this.data_[this.data_.length - 1] ?? null;
281
281
  }
282
282
 
283
283
  /// Get an item in [data_] from [date], if [searchDate]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hematite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Heino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-05 00:00:00.000000000 Z
11
+ date: 2022-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -47,6 +47,7 @@ files:
47
47
  - _includes/nav/pages_list.html
48
48
  - _includes/nav/pinned_page.html
49
49
  - _includes/nav/sidebar.html
50
+ - _includes/recent_posts.html
50
51
  - _includes/scss/_fonts.scss
51
52
  - _includes/settings.html
52
53
  - _layouts/calendar.html