jekyll-theme-amethyst 1.2.1 → 2.1.0

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: dd713f104c3f11d0bbf936b256059ac16abed6d63e3bfe4d3641cf1d7bd0cf9d
4
- data.tar.gz: 9eb9b32ecd778b4a10ffa708c3ef3176bc574b4a540dd90682a404aec69aaa9f
3
+ metadata.gz: 2fac70f56f1769603d1d784c69d33c9fa40b9a200ef8eee0a8d126eb5c8178b1
4
+ data.tar.gz: a59c9b8182e67c571ac5ef59488eef8dec691bec4f802ee966876cd1a0d33770
5
5
  SHA512:
6
- metadata.gz: 88ea9945ef9a71a0f3bdb14cfdf932c90a5a6c7209e687fcd19377be5b3099eb74fcea5d066cf23b20964bdee42b683a3e06ba332cd92f9b9523aa1a064b7241
7
- data.tar.gz: ca19314005d3446128363a3c5b24475a1cbf1f8443f6c98dd5928ebc10d25b54a584dce38e4e2fa8318b76438057a945e0f9f94fa68bfdabcf7e46116da49ad7
6
+ metadata.gz: fd6693f94f8f0c67f85dce79533fc0ac9b6fcc95d96e2cb3ec06afb60745e42c1b1f270c0fb27b6dd0361b6278383346a3e69f2f1a98cf2d94c81ed9bf0baeca
7
+ data.tar.gz: 31ac837f404e4c5d2592b9c0034038f02db666c7c9de294002a8aaf73ba89b1e11d13adfc1554c558e55a1c5d7837c055ea2e88a11ea79a4575c5cce87749bc1
@@ -0,0 +1,6 @@
1
+ {%- assign author_page = site.pages | where: "layout", "posts-author" | where: "author", include.author | first -%}
2
+ {%- if author_page -%}
3
+ {{ author_page.title | escape }}
4
+ {%- else -%}
5
+ {{ include.author | escape }}
6
+ {%- endif -%}
@@ -45,11 +45,16 @@
45
45
  {% endif %}
46
46
  <meta name="twitter:card" content="summary_large_image">
47
47
 
48
-
49
48
  {% if layout.amethyst.pagetype == "navigation" %}
50
49
  <meta name="robots" content="{{ page.amethyst.robots | default: layout.amethyst.robots | default: 'noindex,follow' }}">
51
50
  <meta name="docsearch:amethyst_pagetype_navigation" content="1">
52
51
  {% endif %}
53
52
 
53
+ {% if page.layout == "post" and page.date and page.author %}
54
+ <meta property="og:type" content="article">
55
+ <meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
56
+ <meta name="author" content="{% include author-text.html author=page.author %}">
57
+ {% endif %}
58
+
54
59
  {% endcapture -%}
55
60
  {{ opengraph | strip_newlines }}
@@ -4,3 +4,25 @@
4
4
  <input type="hidden" name="sites" value="{{ site.url | remove_first: 'http://' | remove_first: 'https://' }}">
5
5
  </form>
6
6
  </typesense-minibar>
7
+ {%- if jekyll.environment == "development" %}
8
+ <script type="module">
9
+ /* global Response, URL */
10
+ // Override URLs in search results to be relative to localhost,
11
+ // by replacing "https://production.example/path" with "/path",
12
+ // in any responses that look like they are from Typesense.
13
+ const parent = Response.prototype.json;
14
+ Response.prototype.json = function () {
15
+ return parent.call(this).then(function (obj) {
16
+ if (obj && obj.grouped_hits) {
17
+ for (const group of obj.grouped_hits) {
18
+ for (const hit of group.hits) {
19
+ const url = new URL(hit.document.url);
20
+ hit.document.url = url.pathname + url.hash;
21
+ }
22
+ }
23
+ }
24
+ return obj;
25
+ });
26
+ };
27
+ </script>
28
+ {%- endif %}
@@ -65,6 +65,8 @@ Block data:
65
65
  {%- assign block_contents = site.posts | slice: 0, 5 -%}
66
66
  {%- elsif block_type == "archive" -%}
67
67
  {%- assign block_contents = site.pages | where: "layout", "posts-year" | sort_natural: 'date' | reverse -%}
68
+ {%- assign group_page = site.pages | where: "layout", "posts-archive" | first -%}
69
+ {%- assign block_url = block.url | default: group_page.url -%}
68
70
  {%- elsif block_type == "tags" -%}
69
71
  {%- assign block_contents = site.pages | where: "layout", "posts-tag" | sort_natural: 'title' -%}
70
72
  {%- elsif block_type == "link" -%}
data/_layouts/post.html CHANGED
@@ -8,7 +8,12 @@ layout: wrapper
8
8
  <header>
9
9
  <h1>{{ page.title | escape }}</h1>
10
10
  {%- assign date_format = site.amethyst.date_format | default: "%e %B %Y" -%}
11
- <p class="post-meta byline">Posted on <a href="{{ page.url | relative_url }}" rel="bookmark"><time itemprop="pubdate" datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: date_format }}</time></a>{% if page.author %} by <span class="vcard"><span class="fn n" rel="author">{{ page.author | escape }}</span></span>{% endif %}</p>
11
+ <p class="post-meta byline">Posted on <a href="{{ page.url | relative_url }}" rel="bookmark"><time itemprop="pubdate" datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: date_format }}</time></a>{% if page.author %} by <span class="vcard"><span class="fn n" rel="author">
12
+ {%- assign author_page = site.pages | where: "layout", "posts-author" | where: "author", page.author | first -%}
13
+ {%- if author_page -%}
14
+ <a href="{{ author_page.url | relative_url }}">{{ author_page.title | escape }}</a>
15
+ {%- else -%}{{ page.author | escape }}
16
+ {%- endif -%}</span></span>{% endif %}</p>
12
17
  </header>
13
18
  {{ content }}
14
19
  </article>
@@ -12,7 +12,7 @@ amethyst:
12
12
  {%- for post in posts -%}
13
13
  <div class="post-row">
14
14
  <h2><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h2>
15
- <p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {{ post.author | escape }}{% endif %}</p>
15
+ <p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {% include author-text.html author=post.author %}{% endif %}</p>
16
16
  <div class="post">
17
17
  {{- post.excerpt -}}
18
18
  {%- if post.excerpt != post.content %}
@@ -12,7 +12,7 @@ amethyst:
12
12
  {%- for post in posts -%}
13
13
  <div class="post-row">
14
14
  <h2><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h2>
15
- <p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {{ post.author | escape }}{% endif %}</p>
15
+ <p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {% include author-text.html author=post.author %}{% endif %}</p>
16
16
  <div class="post">
17
17
  {{- post.excerpt -}}
18
18
  {%- if post.excerpt != post.content %}
data/_layouts/posts.html CHANGED
@@ -13,7 +13,7 @@ amethyst:
13
13
  {% for post in posts -%}
14
14
  <div class="post-row">
15
15
  <h2><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h2>
16
- <p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {{ post.author | escape }}{% endif %}</p>
16
+ <p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {% include author-text.html author=post.author %}{% endif %}</p>
17
17
  <div class="post">
18
18
  {{- post.excerpt -}}
19
19
  {%- if post.excerpt != post.content %}
@@ -0,0 +1,21 @@
1
+ @forward "amethyst-variables";
2
+
3
+ $size-sm: 0.8rem;
4
+ $size-1: 1rem;
5
+ $size-2: 1.333rem;
6
+ $size-3: 1.777rem;
7
+ $size-4: 2.369rem;
8
+ $size-5: 3.157rem;
9
+ $size-spacing: $size-2;
10
+ $box-spacing: $size-1;
11
+
12
+ $color-white: #fff;
13
+ $color-light: #f4f4f4;
14
+ $color-off-white: #cdcdcd;
15
+ $color-darkgrey: #63676d; // based on 2015 api.jquery.com design
16
+ $color-black: #333;
17
+
18
+ $screen-s: 480px;
19
+ $screen-m: 768px;
20
+ $screen-l: 992px;
21
+ $screen-xl: 1200px;
@@ -1,4 +1,5 @@
1
1
  // Amethyst theme variables
2
+ // Override by creating a local `_sass/amethyst-variables.scss` file in your project.
2
3
 
3
4
  // Primary color
4
5
  //
data/_sass/amethyst.scss CHANGED
@@ -2,25 +2,9 @@
2
2
 
3
3
  // Amethyst theme for Jekyll
4
4
 
5
- $size-sm: 0.8rem;
6
- $size-1: 1rem;
7
- $size-2: 1.333rem;
8
- $size-3: 1.777rem;
9
- $size-4: 2.369rem;
10
- $size-5: 3.157rem;
11
- $size-spacing: $size-2;
12
- $box-spacing: $size-1;
13
-
14
- $color-white: #fff;
15
- $color-light: #f4f4f4;
16
- $color-off-white: #cdcdcd;
17
- $color-darkgrey: #63676d; // based on 2015 api.jquery.com design
18
- $color-black: #333;
19
-
20
- $screen-s: 480px;
21
- $screen-m: 768px;
22
- $screen-l: 992px;
23
- $screen-xl: 1200px;
5
+ @use "amethyst-variables-all" as *;
6
+ @use "sass:color";
7
+ @use "sass:string";
24
8
 
25
9
  * {
26
10
  box-sizing: border-box;
@@ -465,13 +449,13 @@ table {
465
449
  /* Search */
466
450
 
467
451
  typesense-minibar {
468
- --tsmb-color-base-background: #{lighten($color-accent, 12%)};
452
+ --tsmb-color-base-background: #{color.adjust($color-accent, $lightness: 12%)};
469
453
  --tsmb-color-primary30: #{$color-accent};
470
454
  --tsmb-color-primary50: #{$color-vibrant};
471
455
  --tsmb-color-primary90: #{$color-bright};
472
456
  --tsmb-color-base30: var(--tsmb-color-primary90);
473
- --tsmb-color-base50: #{change-color($color-bright, $alpha: 0.6)}; // #a98dc1
474
- --tsmb-color-base90: #{change-color($color-bright, $alpha: 0.6)};
457
+ --tsmb-color-base50: #{color.change($color-bright, $alpha: 0.6)}; // #a98dc1
458
+ --tsmb-color-base90: #{color.change($color-bright, $alpha: 0.6)};
475
459
 
476
460
  flex: 1;
477
461
  align-self: center;
@@ -480,7 +464,7 @@ typesense-minibar form {
480
464
  width: auto;
481
465
  }
482
466
  typesense-minibar form:not(:focus-within)::before {
483
- filter: unquote("invert()");
467
+ filter: string.unquote("invert()");
484
468
  }
485
469
  typesense-minibar input[type="search"] {
486
470
  border: none;
@@ -607,8 +591,8 @@ typesense-minibar input[type="search"] {
607
591
 
608
592
  .hero {
609
593
  margin-bottom: $size-spacing;
610
- background-color: darken($color-vibrant, 12%);
611
- background-image: linear-gradient(135deg, darken($color-vibrant, 12%), $color-vibrant );
594
+ background-color: color.adjust($color-vibrant, $lightness: -12%);
595
+ background-image: linear-gradient(135deg, color.adjust($color-vibrant, $lightness: -12%), $color-vibrant );
612
596
  padding: ($size-4 * 2) 0;
613
597
  text-align: center;
614
598
  }
data/_sass/custom.scss CHANGED
@@ -1,2 +1,8 @@
1
1
  // Add custom styles via a local `_sass/custom.scss` file
2
2
  // in your website.
3
+ //
4
+ // To import the same variables as used in amethyst.scss,
5
+ // start your file with this line:
6
+ //
7
+ // @use "amethyst-variables-all" as *;
8
+ //
@@ -1,4 +1,4 @@
1
- /*! https://github.com/jquery/typesense-minibar 1.3.2 */
1
+ /*! https://github.com/jquery/typesense-minibar 1.3.4 */
2
2
  .tsmb-form,
3
3
  typesense-minibar {
4
4
  --tsmb-size-edge: 1px;
@@ -24,6 +24,8 @@ typesense-minibar {
24
24
  --tsmb-color-primary30: #390f39;
25
25
  --tsmb-color-primary50: #9c3493;
26
26
  --tsmb-color-primary90: #fbdbfb;
27
+
28
+ max-width: 100%;
27
29
  }
28
30
 
29
31
  .tsmb-form,
@@ -88,7 +90,7 @@ typesense-minibar form::before {
88
90
  content: '';
89
91
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='654 -372 1664 1664' width='20' height='20'><path d='M1806,332c0-123.3-43.8-228.8-131.5-316.5C1586.8-72.2,1481.3-116,1358-116s-228.8,43.8-316.5,131.5 C953.8,103.2,910,208.7,910,332s43.8,228.8,131.5,316.5C1129.2,736.2,1234.7,780,1358,780s228.8-43.8,316.5-131.5 C1762.2,560.8,1806,455.3,1806,332z M2318,1164c0,34.7-12.7,64.7-38,90s-55.3,38-90,38c-36,0-66-12.7-90-38l-343-342 c-119.3,82.7-252.3,124-399,124c-95.3,0-186.5-18.5-273.5-55.5s-162-87-225-150s-113-138-150-225S654,427.3,654,332 s18.5-186.5,55.5-273.5s87-162,150-225s138-113,225-150S1262.7-372,1358-372s186.5,18.5,273.5,55.5s162,87,225,150s113,138,150,225 S2062,236.7,2062,332c0,146.7-41.3,279.7-124,399l343,343C2305.7,1098.7,2318,1128.7,2318,1164z'/></svg>") 0 50% / contain no-repeat;
90
92
  position: absolute;
91
- top: calc(var(--tsmb-size-sm) + var(--tsmb-size-edge));
93
+ top: calc(var(--tsmb-size-edge) + var(--tsmb-size-sm));
92
94
  left: var(--tsmb-size-sm);
93
95
  width: var(--tsmb-size-base);
94
96
  height: var(--tsmb-size-input);
@@ -104,7 +106,7 @@ typesense-minibar form::before {
104
106
  .tsmb-icon-close {
105
107
  box-sizing: border-box;
106
108
  position: absolute;
107
- top: calc(50% - var(--tsmb-size-base)/2);
109
+ top: calc(var(--tsmb-size-edge) + var(--tsmb-size-sm) + (var(--tsmb-size-input)/2) - (var(--tsmb-size-base)/2));
108
110
  right: var(--tsmb-size-base);
109
111
  width: var(--tsmb-size-base);
110
112
  height: var(--tsmb-size-base);
@@ -115,11 +117,7 @@ typesense-minibar form::before {
115
117
  cursor: pointer;
116
118
  }
117
119
 
118
- .tsmb-form--open .tsmb-icon-close {
119
- display: block !important;
120
- }
121
-
122
- .tsmb-form--slash::after {
120
+ form:not(.tsmb-form--open) .tsmb-icon-close {
123
121
  display: none;
124
122
  }
125
123
 
data/assets/styles.scss CHANGED
@@ -3,7 +3,6 @@
3
3
 
4
4
  @use "typesense-minibar.css";
5
5
 
6
- @import "amethyst-variables";
7
- @import "amethyst";
8
- @import "highlight";
9
- @import "custom";
6
+ @use "amethyst";
7
+ @use "highlight";
8
+ @use "custom";
@@ -1,4 +1,4 @@
1
- /*! https://github.com/jquery/typesense-minibar 1.3.2 */
1
+ /*! https://github.com/jquery/typesense-minibar 1.3.4 */
2
2
  globalThis.tsminibar = function tsminibar (form, dataset = form.dataset) {
3
3
  const cache = new Map();
4
4
  const state = { query: '', cursor: -1, open: false, hits: [] };
@@ -41,7 +41,6 @@ globalThis.tsminibar = function tsminibar (form, dataset = form.dataset) {
41
41
  const query = state.query = input.value;
42
42
  if (!query) {
43
43
  state.hits = [];
44
- state.cursor = -1;
45
44
  return close();
46
45
  }
47
46
  const hits = await search(query);
@@ -62,7 +61,10 @@ globalThis.tsminibar = function tsminibar (form, dataset = form.dataset) {
62
61
  if (!e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey) {
63
62
  if (e.code === 'ArrowDown') moveCursor(1);
64
63
  if (e.code === 'ArrowUp') moveCursor(-1);
65
- if (e.code === 'Escape') close();
64
+ if (e.code === 'Escape') {
65
+ close();
66
+ input.blur();
67
+ }
66
68
  if (e.code === 'Enter') {
67
69
  const url = state.hits[state.cursor]?.url;
68
70
  if (url) location.href = url;
@@ -72,11 +74,12 @@ globalThis.tsminibar = function tsminibar (form, dataset = form.dataset) {
72
74
  form.addEventListener('submit', function (e) {
73
75
  e.preventDefault();
74
76
  });
75
- form.insertAdjacentHTML('beforeend', '<svg viewBox="0 0 12 12" width="20" height="20" aria-hidden="true" class="tsmb-icon-close" style="display: none;"><path d="M9 3L3 9M3 3L9 9"/></svg>');
77
+ form.insertAdjacentHTML('beforeend', '<svg viewBox="0 0 12 12" width="20" height="20" aria-hidden="true" tabindex="-1" class="tsmb-icon-close"><path d="M9 3L3 9M3 3L9 9"/></svg>');
76
78
  form.querySelector('.tsmb-icon-close').addEventListener('click', function () {
77
79
  input.value = '';
78
- input.focus();
80
+ state.hits = [];
79
81
  close();
82
+ input.focus();
80
83
  });
81
84
  connect();
82
85
 
@@ -117,7 +120,7 @@ globalThis.tsminibar = function tsminibar (form, dataset = form.dataset) {
117
120
  let hits = cache.get(query);
118
121
  if (hits) {
119
122
  cache.delete(query);
120
- cache.set(query, hits); // LRU
123
+ cache.set(query, hits);
121
124
  return hits;
122
125
  }
123
126
  searchParams.set('q', query);
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-amethyst
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Tijhof
8
8
  - Trent Willis
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-08-01 00:00:00.000000000 Z
12
+ date: 2025-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -101,13 +101,14 @@ dependencies:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 2.2.1
104
- description:
105
- email:
104
+ description:
105
+ email:
106
106
  executables: []
107
107
  extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
110
  - LICENSE.txt
111
+ - _includes/author-text.html
111
112
  - _includes/opengraph.html
112
113
  - _includes/search.html
113
114
  - _includes/sidebar.html
@@ -124,6 +125,7 @@ files:
124
125
  - _layouts/posts-year.html
125
126
  - _layouts/posts.html
126
127
  - _layouts/wrapper.html
128
+ - _sass/amethyst-variables-all.scss
127
129
  - _sass/amethyst-variables.scss
128
130
  - _sass/amethyst.scss
129
131
  - _sass/custom.scss
@@ -137,7 +139,7 @@ licenses:
137
139
  - MIT
138
140
  metadata:
139
141
  plugin_type: theme
140
- post_install_message:
142
+ post_install_message:
141
143
  rdoc_options: []
142
144
  require_paths:
143
145
  - lib
@@ -152,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
154
  - !ruby/object:Gem::Version
153
155
  version: '0'
154
156
  requirements: []
155
- rubygems_version: 3.3.5
156
- signing_key:
157
+ rubygems_version: 3.4.20
158
+ signing_key:
157
159
  specification_version: 4
158
160
  summary: https://github.com/qunitjs/jekyll-theme-amethyst
159
161
  test_files: []