hematite 0.0.2 → 0.0.5

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: 99a302547aa561ab8e022bf2cd59b829ee611735c9638975635115b31cdb8fd7
4
- data.tar.gz: cbe5585d1a263c0e1662aaa9b6d6454754e1407f23522243ad7cb8a20a7c2636
3
+ metadata.gz: c0b7b551f58a7671eec46167c18919a8ed1fe53f9c38eed9f15085c1db25cd9e
4
+ data.tar.gz: 755475373480a27f8f8a1fe4bc89b7368b40c76213c521995170f46cf5e16647
5
5
  SHA512:
6
- metadata.gz: 82982d7db6a0d8a375e7d634760b6dc576739e509ba9bc3c21ef1796c6631331581572f0f187299510cfff473672dc5ba98a815eb6db874dbb6439c3f3af15e0
7
- data.tar.gz: 0a63ca11e9ab1c4a5a9057e6d2ab5e97937be8ca5bd649bbbae0ff85536fca80e19fdafb58a8ec5e278981c5fd5923963369d016745a29edbf30bfafaf6f12e5
6
+ metadata.gz: e2553c11c574e33d7e40c575e4282493444e9a0594d509537f1379fc10bb4531474f0ac67e1ea24a4564235a67fcc99612ad4e4da598086220397b92611933a4
7
+ data.tar.gz: d3985945ba30a12d51bc72e3110fc92dbe31747759971d4f958c763a3669b102916689c3ed8084f405a074464c68929f6a66656a61f62bfd9dbe1d764f3d0994
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: Untitled
3
+ ---
4
+
1
5
  <!DOCTYPE html>
2
6
  <html lang="{{ page.lang | default: site.lang | default: "en-US" }}">
3
7
  <head>
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: default
3
+ title: Home
4
+ sidebarindex: 1
5
+ ---
6
+
7
+ <main>
8
+ {{ content }}
9
+ </main>
data/_layouts/page.html CHANGED
@@ -2,4 +2,8 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
+ <h1>{{page.title}}</h1>
6
+
7
+ <main>
5
8
  {{ content }}
9
+ </main>
data/_sass/_calendar.scss CHANGED
@@ -58,6 +58,6 @@
58
58
  }
59
59
 
60
60
  &.today {
61
- box-shadow: inset 1px -2px 3px var(--shadow-color-light);
61
+ box-shadow: inset 1px -1px 5px var(--shadow-color-light);
62
62
  }
63
63
  }
@@ -27,13 +27,22 @@ function getCalendarData(elem, formatElemLabels) {
27
27
  let tagName = child.tagName.toLowerCase();
28
28
 
29
29
  if (tagName == DATE_SPEC_ELEM_TAG) {
30
- // Remove '-rd' and '-th' suffixes.
30
+ let errored = false;
31
+
31
32
  try {
32
33
  lastDate = DateUtil.parse(child.innerText);
33
- lastHeaderId = child.getAttribute("id");
34
+ if (isNaN(lastDate)) {
35
+ errored = true;
36
+ } else {
37
+ lastHeaderId = child.getAttribute("id");
38
+ }
34
39
  }
35
40
  catch (e) {
36
- child.innerText = stringLookup(`invalid_date`, dateText);
41
+ errored = true;
42
+ }
43
+
44
+ if (errored) {
45
+ child.innerText = stringLookup(`invalid_date`, child.innerText);
37
46
  lastDate = null;
38
47
  }
39
48
  }
data/assets/js/search.mjs CHANGED
@@ -116,13 +116,13 @@ class Searcher {
116
116
  for (const page of data) {
117
117
  // Remove HTML tags.
118
118
  let content = this.filterContent_(page.content);
119
- content += '\n' + page.title;
119
+ content += '\n' + (page.title ?? "");
120
120
 
121
121
  let pageData = {
122
122
  title: page.title,
123
123
  url: page.url,
124
124
  numMatches: 0,
125
- titleMatches: (page.title.toLowerCase().indexOf(query) != -1)
125
+ titleMatches: (page.title?.toLowerCase()?.indexOf(query) != -1)
126
126
  };
127
127
 
128
128
 
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.0.2
4
+ version: 0.0.5
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-05-18 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -43,6 +43,7 @@ files:
43
43
  - _includes/nav/sidebar.html
44
44
  - _layouts/calendar.html
45
45
  - _layouts/default.html
46
+ - _layouts/home.html
46
47
  - _layouts/page.html
47
48
  - _layouts/post.html
48
49
  - _sass/_animations.scss