type-on-strap 2.4.13 → 2.5.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: 2420c122c17be2f45cf263d4e7339bd1bb193f985446014de4d8aab3f23bd8be
4
- data.tar.gz: 26de41669add59557ccfed11db3a3b0ef67ff18d348132c3f703d06fd31f6ff3
3
+ metadata.gz: c7b245eafb6465e6bd1a012032498fb81901591c09680290587ec232ea579643
4
+ data.tar.gz: f81e6aaf2e9ef2dc13f6275da54a05143cb305a88dbd4e6b3af6cad085555e2c
5
5
  SHA512:
6
- metadata.gz: f3b2c6aca18ecf499017e741cf309ec687f971b1a93668d6ecd9caebe038fcd1707d240d2d351c12466982480c05bfaf75830862c78451a9b5760902f5d4fc5f
7
- data.tar.gz: c26e9a0672a93316ec4b305fe567ba9769ad40a15eb78eb2cc3899817676aabd7dc88a97584fe1cd2e034498dcf61106d2ba51420678c65983784e9492e61c8b
6
+ metadata.gz: ca5de0fb72854009a6ede7a395e65c572c2100a80d6f338f90dd6cc0b8f08199aca694f54a1be26f01231681673173662caa4b1bc7c277f736b9d14d4569aeef
7
+ data.tar.gz: 44fe3825598c76e401b010c7b9630b4b7c1a83309c609ef7cff81efaeded6e78242447664e0c567ca88b0cac361fc9ca02da921d944f64a24f6d301d71680c1c
data/README.md CHANGED
@@ -40,8 +40,6 @@ Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme)
40
40
 
41
41
  Check out this tutorial: [Use as Ruby Gem](#use-as-ruby-gem-)
42
42
 
43
- [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#/https://github.com/sylhare/Type-On-Strap)
44
-
45
43
  ## Structure
46
44
 
47
45
  Here are the main files of the template
@@ -1,9 +1,9 @@
1
- <div class="posts">
1
+ <div class="posts" data-testid="blog-posts">
2
2
  {% unless paginator.posts %}
3
3
  <article><section class="post-content"><p>There are no blog posts</p></section></article>
4
4
  {% endunless %}
5
5
  {% for post in paginator.posts %}
6
- <div class="post-teaser">
6
+ <div class="post-teaser" data-testid="blog-post-teaser">
7
7
  {% if post.thumbnail %}
8
8
  <div class="post-img">
9
9
  <a aria-label="{{ post.title }}" href="{{ post.url | relative_url }}">
@@ -14,7 +14,7 @@
14
14
  <span>
15
15
  <header>
16
16
  <h1>
17
- <a aria-label="{{ post.title }}" class="post-link" href="{{ post.url | relative_url }}">
17
+ <a aria-label="{{ post.title }}" class="post-link" data-testid="blog-post-link" href="{{ post.url | relative_url }}">
18
18
  {{ post.title }}
19
19
  </a>
20
20
  </h1>
@@ -1,5 +1,5 @@
1
1
  {% if paginator.total_pages > 1 %}
2
- <div class="pagination">
2
+ <div class="pagination" data-testid="blog-pagination">
3
3
  <div class="previous">
4
4
 
5
5
  {% if paginator.previous_page and paginator.previous_page != 1%}
@@ -13,6 +13,7 @@
13
13
  .post-content a { color: {{ color }} !important; }
14
14
  .share-buttons a { color: {{ color }} !important; }
15
15
  .tag-list a:not(:hover) { color: {{ color }} !important; }
16
+ .category-list a:not(:hover) { color: {{ color }} !important; }
16
17
  div#post-nav a { color: {{ color }} !important; }
17
18
  footer a { color: {{ color }} !important; }
18
19
  .site-header nav a:hover { color: {{ color }} !important; }
@@ -0,0 +1,22 @@
1
+ {% assign categories = include.categories | split:'|' | sort | uniq %}
2
+
3
+ {% if categories.size > 0 %}
4
+ <div class="category-list" data-testid="category-list">
5
+ <ul>
6
+ {% if categories.size == 1 %}
7
+ <li class="meta">Category</li>
8
+ {% else %}
9
+ <li class="meta">Categories</li>
10
+ {% endif %}
11
+
12
+ {% for category in categories %}
13
+ <li><a class="button" data-testid="category-link" href="{{ site.baseurl }}/categories#{{ category | cgi_escape }}">
14
+ <p><i class="fas fa-folder fa-fw fa-sm"></i> {{ category }}</p>
15
+ </a></li>
16
+ {% endfor %}
17
+ </ul>
18
+ </div>
19
+ {% else %}
20
+ <div class="category-list"></div>
21
+ {% endif %}
22
+
@@ -24,6 +24,11 @@
24
24
  <!--Favicon-->
25
25
  <link rel="shortcut icon" href="{{ site.favicon | relative_url }}" type="image/x-icon">
26
26
 
27
+ <!-- Preconnect to Cusdis for faster loading when comments become visible -->
28
+ {% if site.data.comments.cusdis.app_id or site.comments.cusdis_app_id or site.cusdis_app_id %}
29
+ <link rel="preconnect" href="https://cusdis.com">
30
+ {% endif %}
31
+
27
32
  {% if page.bootstrap %}
28
33
  <!-- Bootstrap-4.1.3 isolation CSS -->
29
34
  <link rel="stylesheet" type="text/css" href="{{ '/assets/css/vendor/bootstrap-iso.min.css' | relative_url }}">
@@ -35,18 +40,18 @@
35
40
  <script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
36
41
  {% endif %}
37
42
 
38
- <!-- KaTeX 0.16.25 -->
43
+ <!-- KaTeX 0.16.28 -->
39
44
  {% if site.katex or site.theme_settings.katex %}
40
45
  <script defer src="{{ '/assets/js/vendor/katex.min.js' | relative_url }}"></script>
41
46
  <script defer src="{{ '/assets/js/vendor/katex.auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
42
47
  {% endif %}
43
48
 
44
- <!-- Mermaid 11.12.0 -->
49
+ <!-- Mermaid 11.12.2 -->
45
50
  {% if site.mermaid %}
46
51
  <script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}"></script>
47
52
  {% endif %}
48
53
 
49
- <!-- Simple Jekyll Search 1.10.0 -->
54
+ <!-- Simple Jekyll Search 2.1.1 -->
50
55
  <script src="{{ '/assets/js/vendor/simple-jekyll-search.min.js' | relative_url }}" type="text/javascript"></script>
51
56
 
52
57
  <!-- Google Analytics / Cookie Consent -->
@@ -1,7 +1,7 @@
1
1
  {% assign tags = include.tags | split:'|' | sort | uniq %}
2
2
 
3
3
  {% if tags.size > 0 %}
4
- <div class="tag-list">
4
+ <div class="tag-list" data-testid="tag-list">
5
5
  <ul>
6
6
  {% if tags.size == 1 %}
7
7
  <li class="meta">Tag</li>
@@ -10,7 +10,7 @@
10
10
  {% endif %}
11
11
 
12
12
  {% for tag in tags %}
13
- <li><a class="button" href="{% unless 'Tags' == page.title %}{{ site.baseurl }}/tags{% endunless %}#{{ tag | cgi_escape }}">
13
+ <li><a class="button" data-testid="tag-link" href="{% unless 'Tags' == page.title %}{{ site.baseurl }}/tags{% endunless %}#{{ tag | cgi_escape }}">
14
14
  <p><i class="fas fa-tag fa-fw fa-sm"></i> {{ tag }}</p>
15
15
  </a></li>
16
16
  {% endfor %}
@@ -1,14 +1,14 @@
1
1
  <!-- Portfolio Grid Section -->
2
- <div class="portfolio-grid">
2
+ <div class="portfolio-grid" data-testid="portfolio-grid">
3
3
  {% for item in site.portfolio %}
4
- <div class="portfolio-cell">
5
- <a class="portfolio-link" data-keyboard="true" href="{{ item.url | relative_url }}">
6
- <div class="caption" title="{{ item.title }}">
4
+ <div class="portfolio-cell" data-testid="portfolio-item">
5
+ <a class="portfolio-link" data-testid="portfolio-item-link" data-keyboard="true" href="{{ item.url | relative_url }}">
6
+ <div class="caption" data-testid="portfolio-item-caption" title="{{ item.title }}">
7
7
  <div class="caption-content">
8
8
  <i class="fas fa-search-plus fa-3x"></i>
9
9
  </div>
10
10
  </div>
11
- <img alt="" class="" src="{{ item.img | relative_url }}">
11
+ <img alt="" class="" data-testid="portfolio-item-image" src="{{ item.img | relative_url }}">
12
12
  </a>
13
13
  </div>
14
14
  {% endfor %}
@@ -5,9 +5,9 @@
5
5
  data-page-url="{{ page.url | absolute_url }}"
6
6
  data-page-title="{{ page.title }}"
7
7
  data-theme="{{ site.color_theme }}"
8
+ data-lazy-load="true"
9
+ {% if site.data.comments.cusdis.lang or site.data.language.cusdis_lang %}
10
+ data-lang="{% if site.data.comments.cusdis.lang %}{{ site.data.comments.cusdis.lang }}{% else %}{{ site.data.language.cusdis_lang }}{% endif %}"
11
+ {% endif %}
8
12
  ></div>
9
-
10
- {% if site.data.comments.cusdis.lang or site.data.language.cusdis_lang %}
11
- <script defer src="https://cusdis.com/js/widget/lang/{% if site.data.comments.cusdis.lang %}{{ site.data.comments.cusdis.lang }}{% else %}{{ site.data.language.cusdis_lang }}{% endif %}.js"></script>
12
- {% endif %}
13
- <script defer src="https://cusdis.com/js/cusdis.es.js"></script>
13
+ <script defer src="{{ '/assets/js/comments-lazy-load.min.js' | relative_url }}"></script>
@@ -1,12 +1,7 @@
1
- <div class="comments">
2
- <div id="disqus_thread"></div>
3
- <script type="text/javascript">
4
- var disqus_shortname = '{{ site.data.comments.disqus.shortname }}' || '{{ site.comments.disqus_shortname }}' || '{{ site.disqus_shortname }}';
5
- (function() {
6
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
7
- dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
8
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
9
- })();
10
- </script>
11
- <noscript>{{ site.data.language.str_javascript_required_disqus | default: "Please enable JavaScript to view comments." }}</noscript>
1
+ <div class="comments" id="disqus_thread"
2
+ data-lazy-load="true"
3
+ data-shortname="{% if site.data.comments.disqus.shortname %}{{ site.data.comments.disqus.shortname }}{% elsif site.comments.disqus_shortname %}{{ site.comments.disqus_shortname }}{% else %}{{ site.disqus_shortname }}{% endif %}"
4
+ >
5
+ <noscript>{{ site.data.language.str_javascript_required_disqus | default: "Please enable JavaScript to view comments." }}</noscript>
12
6
  </div>
7
+ <script defer src="{{ '/assets/js/comments-lazy-load.min.js' | relative_url }}"></script>
@@ -1,17 +1,17 @@
1
- <script src="https://giscus.app/client.js"
2
- data-repo="{{ site.data.comments.giscus.repo }}"
3
- data-repo-id="{{ site.data.comments.giscus.repo-id }}"
4
- {% if site.data.comments.giscus.category %}data-category="{{ site.data.comments.giscus.category }}"{% endif %}
5
- data-category-id="{{ site.data.comments.giscus.category-id }}"
6
- data-mapping="{{ site.data.comments.giscus.mapping }}"
7
- {% if site.data.comments.giscus.term %}data-term="{{ site.data.comments.giscus.term }}"{% endif %}
8
- data-strict="{% if site.data.comments.giscus.strict %}{{ site.data.comments.giscus.strict }}{% else %}0{% endif %}"
9
- data-reactions-enabled="{% if site.data.comments.giscus.reactions-enabled %}{{ site.data.comments.giscus.reactions-enabled }}{% else %}1{% endif %}"
10
- data-emit-metadata="{% if site.data.comments.giscus.emit-metadata %}{{ site.data.comments.giscus.emit-metadata }}{% else %}0{% endif %}"
11
- data-input-position="{% if site.data.comments.giscus.input-position %}{{ site.data.comments.giscus.input-position }}{% else %}bottom{% endif %}"
12
- data-theme="{% if site.data.comments.giscus.theme %}{{ site.data.comments.giscus.theme }}{% elsif site.color_theme == 'dark' %}dark{% else %}light{% endif %}"
13
- data-lang="{% if site.data.comments.giscus.lang %}{{ site.data.comments.giscus.lang }}{% else %}en{% endif %}"
14
- {% if site.data.comments.giscus.loading %}data-loading="{{ site.data.comments.giscus.loading }}"{% endif %}
15
- crossorigin="anonymous"
16
- async>
17
- </script>
1
+ <div id="giscus_thread"
2
+ data-lazy-load="true"
3
+ data-repo="{{ site.data.comments.giscus.repo }}"
4
+ data-repo-id="{{ site.data.comments.giscus.repo-id }}"
5
+ {% if site.data.comments.giscus.category %}data-category="{{ site.data.comments.giscus.category }}"{% endif %}
6
+ data-category-id="{{ site.data.comments.giscus.category-id }}"
7
+ data-mapping="{{ site.data.comments.giscus.mapping }}"
8
+ {% if site.data.comments.giscus.term %}data-term="{{ site.data.comments.giscus.term }}"{% endif %}
9
+ data-strict="{% if site.data.comments.giscus.strict %}{{ site.data.comments.giscus.strict }}{% else %}0{% endif %}"
10
+ data-reactions-enabled="{% if site.data.comments.giscus.reactions-enabled %}{{ site.data.comments.giscus.reactions-enabled }}{% else %}1{% endif %}"
11
+ data-emit-metadata="{% if site.data.comments.giscus.emit-metadata %}{{ site.data.comments.giscus.emit-metadata }}{% else %}0{% endif %}"
12
+ data-input-position="{% if site.data.comments.giscus.input-position %}{{ site.data.comments.giscus.input-position }}{% else %}bottom{% endif %}"
13
+ data-theme="{% if site.data.comments.giscus.theme %}{{ site.data.comments.giscus.theme }}{% elsif site.color_theme == 'dark' %}dark{% else %}light{% endif %}"
14
+ data-lang="{% if site.data.comments.giscus.lang %}{{ site.data.comments.giscus.lang }}{% else %}en{% endif %}"
15
+ {% if site.data.comments.giscus.loading %}data-loading="{{ site.data.comments.giscus.loading }}"{% endif %}
16
+ ></div>
17
+ <script defer src="{{ '/assets/js/comments-lazy-load.min.js' | relative_url }}"></script>
@@ -1,8 +1,8 @@
1
- <script src="https://utteranc.es/client.js"
2
- repo='{% if site.data.comments.utterances.repo %}{{ site.data.comments.utterances.repo }}{% else %}{{ site.comments.utterances.repo }}{% endif %}'
3
- issue-term="{% if site.data.comments.utterances.issue-term %}{{ site.data.comments.utterances.issue-term }}{% else %}{{ site.comments.utterances.issue-term }}{% endif %}"
4
- theme="{% if site.data.comments.utterances.theme %}{{ site.data.comments.utterances.theme }}{% elsif site.comments.utterances.theme %}{{ site.comments.utterances.theme }}{% elsif site.color_theme == 'dark' %}github-dark{% else %}github-light{% endif %}"
5
- {% if site.data.comments.utterances.label or site.comments.utterances.label %}label="{% if site.data.comments.utterances.label %}{{ site.data.comments.utterances.label }}{% else %}{{ site.comments.utterances.label }}{% endif %}"{% endif %}
6
- crossorigin="anonymous"
7
- async>
8
- </script>
1
+ <div id="utterances_thread"
2
+ data-lazy-load="true"
3
+ data-repo="{% if site.data.comments.utterances.repo %}{{ site.data.comments.utterances.repo }}{% else %}{{ site.comments.utterances.repo }}{% endif %}"
4
+ data-issue-term="{% if site.data.comments.utterances.issue-term %}{{ site.data.comments.utterances.issue-term }}{% else %}{{ site.comments.utterances.issue-term }}{% endif %}"
5
+ data-theme="{% if site.data.comments.utterances.theme %}{{ site.data.comments.utterances.theme }}{% elsif site.comments.utterances.theme %}{{ site.comments.utterances.theme }}{% elsif site.color_theme == 'dark' %}github-dark{% else %}github-light{% endif %}"
6
+ {% if site.data.comments.utterances.label or site.comments.utterances.label %}data-label="{% if site.data.comments.utterances.label %}{{ site.data.comments.utterances.label }}{% else %}{{ site.comments.utterances.label }}{% endif %}"{% endif %}
7
+ ></div>
8
+ <script defer src="{{ '/assets/js/comments-lazy-load.min.js' | relative_url }}"></script>
@@ -5,17 +5,24 @@ layout: page
5
5
  <div class="home">
6
6
  <div id="categories">
7
7
  <section class="bg"></section>
8
- <ul class="category-clouds">
9
- {% for category in site.categories %}
10
- <a href="#{{ category | first | cgi_escape }}" class="category-anchor">
11
- <li>
12
- {{ category | first }}
13
- <!-- {{ category | last | size | times: 100 | divided_by: site.tags.size | plus: 50 | divided_by: 100.0 }} -->
14
- <!-- <span class="category-number">{{ category | last | size }}</span> -->
15
- </li>
16
- </a>
17
- {% endfor %}
18
- </ul>
8
+ <div class="category-list">
9
+ <p class="category-links">
10
+ {% for category in site.categories %}
11
+ <a href="#{{ category | first | cgi_escape }}" class="category-link">{{ category | first }}</a> {{ category | last | size }}{% unless forloop.last %}<span class="separator"> / </span>{% endunless %}
12
+ {% endfor %}
13
+
14
+ {% assign uncategorized_count = 0 %}
15
+ {% for post in site.posts %}
16
+ {% if post.categories.size == 0 %}
17
+ {% assign uncategorized_count = uncategorized_count | plus: 1 %}
18
+ {% endif %}
19
+ {% endfor %}
20
+ {% if uncategorized_count > 0 %}
21
+ <span class="separator"> / </span>
22
+ <a href="#uncategorized" class="category-link">Uncategorized</a> {{ uncategorized_count }}
23
+ {% endif %}
24
+ </p>
25
+ </div>
19
26
  <div class="category-groups">
20
27
  {% for category in site.categories %}
21
28
  <div class="category-group">
@@ -28,16 +35,71 @@ layout: page
28
35
  </h4>
29
36
  <div class="items">
30
37
  {% for post in site.categories[group] %}
31
- <a href="{{ post.url | relative_url }}" class="category-post-link">
32
- <div class="item">
33
- <p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
34
- <p class="title">{{ post.title }}</p>
35
- </div>
36
- </a>
38
+ <div class="item-wrapper">
39
+ <a href="{{ post.url | relative_url }}" class="category-post-link">
40
+ <div class="item">
41
+ <div class="item-content">
42
+ <p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
43
+ <p class="title">{{ post.title }}</p>
44
+ </div>
45
+ </div>
46
+ </a>
47
+ {% if post.tags.size > 0 %}
48
+ <div class="item-tags">
49
+ {% for tag in post.tags %}
50
+ <a href="{{ site.baseurl }}/tags#{{ tag | cgi_escape }}" class="tag-link">
51
+ <span class="tag">{{ tag }}</span>
52
+ </a>
53
+ {% endfor %}
54
+ </div>
55
+ {% endif %}
56
+ </div>
37
57
  {% endfor %}
38
58
  </div>
39
59
  </div>
40
60
  {% endfor %}
61
+
62
+ <!-- Uncategorized posts -->
63
+ {% assign uncategorized_posts = "" | split: "" %}
64
+ {% for post in site.posts %}
65
+ {% if post.categories.size == 0 %}
66
+ {% assign uncategorized_posts = uncategorized_posts | push: post %}
67
+ {% endif %}
68
+ {% endfor %}
69
+
70
+ {% if uncategorized_posts.size > 0 %}
71
+ <div class="category-group">
72
+ <h4 id="uncategorized" class="title">
73
+ Uncategorized
74
+ {% if page.showCounts %}
75
+ ({{uncategorized_posts.size}})
76
+ {% endif %}
77
+ </h4>
78
+ <div class="items">
79
+ {% for post in uncategorized_posts %}
80
+ <div class="item-wrapper">
81
+ <a href="{{ post.url | relative_url }}" class="category-post-link">
82
+ <div class="item">
83
+ <div class="item-content">
84
+ <p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
85
+ <p class="title">{{ post.title }}</p>
86
+ </div>
87
+ </div>
88
+ </a>
89
+ {% if post.tags.size > 0 %}
90
+ <div class="item-tags">
91
+ {% for tag in post.tags %}
92
+ <a href="{{ site.baseurl }}/tags#{{ tag | cgi_escape }}" class="tag-link">
93
+ <span class="tag">{{ tag }}</span>
94
+ </a>
95
+ {% endfor %}
96
+ </div>
97
+ {% endif %}
98
+ </div>
99
+ {% endfor %}
100
+ </div>
101
+ </div>
102
+ {% endif %}
41
103
  </div>
42
104
  </div>
43
105
  </div>
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <!--
3
- Type on Strap jekyll theme v2.4.13
3
+ Type on Strap jekyll theme v2.5.0
4
4
  Theme free for personal and commercial use under the MIT license
5
5
  https://github.com/sylhare/Type-on-Strap/blob/master/LICENSE
6
6
  -->
@@ -10,9 +10,9 @@
10
10
  <body>
11
11
  {% capture _navbar %}{% include default/navbar.liquid %}{% endcapture %}
12
12
  {{ _navbar | split: " " | join: " "}}
13
- <div class="content">
13
+ <main class="content">
14
14
  {{ content }}
15
- </div>
15
+ </main>
16
16
  {% capture _footer %}{% include default/footer.liquid %}{% endcapture %}
17
17
  {{ _footer | split: " " | join: " "}}
18
18
  </body>
data/_layouts/page.liquid CHANGED
@@ -23,8 +23,14 @@ layout: default
23
23
  </div>
24
24
  {% endif %}
25
25
  </section>
26
- <!-- Tag list for portfolio -->
27
- {% capture tag_list %}{{ page.tags | join: "|" }}{% endcapture %}
28
- {% capture _tags %}{% include default/tags_list.liquid tags=tag_list %}{% endcapture %}
29
- {{ _tags | split: " " | join: " " }}
26
+ <!-- Category and Tag list -->
27
+ <div class="tag-category-container">
28
+ <!-- Category list -->
29
+ {% capture category_list %}{{ page.categories | join: "|" }}{% endcapture %}
30
+ {% include default/category_list.liquid categories=category_list %}
31
+
32
+ <!-- Tag list for portfolio -->
33
+ {% capture tag_list %}{{ page.tags | join: "|" }}{% endcapture %}
34
+ {% include default/tags_list.liquid tags=tag_list %}
35
+ </div>
30
36
  </article>
data/_layouts/post.liquid CHANGED
@@ -22,9 +22,16 @@ layout: default
22
22
  <!-- Social media shares -->
23
23
  {% include social/share_buttons.liquid %}
24
24
 
25
- <!-- Tag list -->
26
- {% capture tag_list %}{{ page.tags | join: "|" }}{% endcapture %}
27
- {% include default/tags_list.liquid tags=tag_list %}
25
+ <!-- Category and Tag list -->
26
+ <div class="tag-category-container">
27
+ <!-- Category list -->
28
+ {% capture category_list %}{{ page.categories | join: "|" }}{% endcapture %}
29
+ {% include default/category_list.liquid categories=category_list %}
30
+
31
+ <!-- Tag list -->
32
+ {% capture tag_list %}{{ page.tags | join: "|" }}{% endcapture %}
33
+ {% include default/tags_list.liquid tags=tag_list %}
34
+ </div>
28
35
 
29
36
  </article>
30
37
 
@@ -14,11 +14,18 @@ layout: page
14
14
  searchInput: document.getElementById('search-input'),
15
15
  resultsContainer: document.getElementById('results-container'),
16
16
  json: '{{ "/assets/data/search.liquid" | relative_url }}',
17
- searchResultTemplate: '<div class="search-title"><a href="{url}"><h3> {title}</h3></a><div class="meta">{date} <div class="right"><i class="fas fa-tag"></i> {tags}</div></div><p>{excerpt}</p></div><hr> ',
17
+ searchResultTemplate: '<div class="search-title" data-testid="search-result-item"><a href="{url}" data-testid="search-result-link"><h3>{title}</h3></a><div class="meta">{date} <div class="right"><i class="fas fa-tag"></i> {tags}</div></div><p>{content}</p></div><hr>',
18
18
  noResultsText: '{{ site.data.language.str_no_result_found | default: "No result found" }}',
19
19
  limit: 10,
20
- strategy: 'wildcard',
21
- exclude: []
20
+ strategy: {
21
+ type: 'hybrid',
22
+ },
23
+ exclude: [],
24
+ templateMiddleware: window.createHighlightTemplateMiddleware({
25
+ className: 'search-highlight',
26
+ maxLength: 100,
27
+ contextLength: 150
28
+ })
22
29
  })
23
30
  </script>
24
31
  </section>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * KaTeX v0.16.25
2
+ * KaTeX v0.16.28
3
3
  * Plus added customizations for the theme
4
4
  */
5
5
 
@@ -154,7 +154,7 @@ $katex-font-path: "../../assets/fonts/katex" !default;
154
154
  border-color: currentColor;
155
155
  }
156
156
  .katex .katex-version::after {
157
- content: "0.16.25";
157
+ content: "0.16.28";
158
158
  }
159
159
  .katex .katex-mathml {
160
160
  /* Accessibility hack to only show to screen readers
@@ -1,41 +1,29 @@
1
1
  #archive,
2
2
  #categories {
3
- .archive-clouds,
4
- .category-clouds {
5
- margin: 30px 0 30px;
3
+ .category-list {
4
+ width: 100%;
5
+ padding-bottom: $padding-x-small;
6
+ text-align: center;
6
7
 
7
- li {
8
- background-color: var(--link);
9
- display: inline-block;
10
- margin-bottom: 10px;
11
- margin-right: 3px;
12
- padding: 0 15px;
13
- border-radius: 20px;
14
- color: var(--header-text);
15
- font-weight: 600;
16
- font-size: 0.8rem;
17
- line-height: 35px;
18
- letter-spacing: -0.03rem;
19
-
20
- .category-number {
21
- vertical-align: super;
22
- font-size: 0.625rem;
23
- }
24
-
25
- .p {
26
- opacity: 1;
27
- }
8
+ .category-links {
9
+ margin: 30px 0;
10
+ color: var(--meta);
11
+ font-size: 0.9em;
28
12
  }
29
13
 
30
- li:hover {
31
- background-color: var(--header-background) !important;
32
- color: var(--header-text);
14
+ .category-link {
15
+ color: var(--meta);
16
+ text-decoration: underline;
17
+ transition: color 0.2s ease;
18
+
19
+ &:hover {
20
+ color: var(--link);
21
+ text-decoration: underline;
22
+ }
33
23
  }
34
24
 
35
- .archive-anchor:hover,
36
- .category-anchor:hover {
37
- text-decoration: none !important;
38
- filter: none;
25
+ .separator {
26
+ color: var(--meta);
39
27
  }
40
28
  }
41
29
 
@@ -50,9 +38,26 @@
50
38
  .items {
51
39
  padding-left: $padding-medium;
52
40
 
53
- .item {
41
+ .item-wrapper {
54
42
  position: relative;
55
43
  margin: 25px 0;
44
+ display: flex;
45
+ justify-content: space-between;
46
+ align-items: center;
47
+ gap: 15px;
48
+ }
49
+
50
+ .category-post-link {
51
+ flex: 1;
52
+ min-width: 0;
53
+ text-decoration: none;
54
+ }
55
+
56
+ .item {
57
+ .item-content {
58
+ flex: 1;
59
+ min-width: 0;
60
+ }
56
61
 
57
62
  .meta {
58
63
  color: var(--meta);
@@ -65,7 +70,32 @@
65
70
  }
66
71
  }
67
72
 
68
- .item::before {
73
+ .item-tags {
74
+ display: flex;
75
+ flex-wrap: wrap;
76
+ gap: 5px;
77
+ align-items: center;
78
+ justify-content: flex-end;
79
+
80
+ .tag-link {
81
+ text-decoration: none;
82
+ }
83
+
84
+ .tag {
85
+ background-color: var(--selection);
86
+ color: var(--text);
87
+ padding: 3px 10px;
88
+ border-radius: 12px;
89
+ font-size: 0.75rem;
90
+ font-weight: 500;
91
+ white-space: nowrap;
92
+ transition: background-color 0.2s ease, color 0.2s ease, border 0.2s ease;
93
+ cursor: pointer;
94
+ border: 1px solid transparent;
95
+ }
96
+ }
97
+
98
+ .item-wrapper::before {
69
99
  content: "";
70
100
  position: absolute;
71
101
  left: -5%;
@@ -75,17 +105,28 @@
75
105
  height: 100%;
76
106
  }
77
107
 
78
- .archive-post-link:hover,
108
+ .item-wrapper:hover::before {
109
+ background-color: var(--link);
110
+ }
111
+
79
112
  .category-post-link:hover {
80
113
  text-decoration: none;
81
114
 
82
115
  .meta, .title {
83
- color: var(--header-background);
116
+ color: var(--link);
84
117
  }
118
+ }
85
119
 
86
- .item::before {
87
- background-color: var(--link);
88
- }
120
+ .item-wrapper:hover .tag {
121
+ background-color: var(--link);
122
+ color: var(--header-text);
123
+ border-color: transparent;
124
+ }
125
+
126
+ .item-wrapper:hover .tag:hover {
127
+ background-color: var(--page-background);
128
+ color: var(--link);
129
+ border-color: var(--link);
89
130
  }
90
131
  }
91
132
  }