type-on-strap 2.4.8 → 2.4.9

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: dba3ab6a8c633aac793ffc8297817c5e43c8d3178d60379b2fd93158a61e063f
4
- data.tar.gz: 3a63ffd7c2a16ca9d784b14703c60405f68a4bdf19a2a8589b58a60864015954
3
+ metadata.gz: 15dad5d590b48fae536490341e7833281b3771118b682275f86fd96128e0db5e
4
+ data.tar.gz: 3f6937d0f9c733be27b4e966ac9d6aba2222c6e0abcac690d3c93a3d171437d7
5
5
  SHA512:
6
- metadata.gz: 159db5d9f28dcc7ce897b4a7cf4e36116f7a6d61e772096f7fd86fc5296b25757991c076106c2076cae10bf0684e753ac4508a420d23c0cd5c980f9c6b5c63ad
7
- data.tar.gz: 077ebef49c8f68ed554d23075ff34ab66002fe6aa9fc28982805dde020feab142e922b6fbc05018395c4c49418b27099c968f92b85fd8fc44c3113f395b546f7
6
+ metadata.gz: 8f55e245d44102ba315df41b0353451afabc9458e00fb62eed47fce19350699626a27ba1db562b6f1dcf28aded39c7d8aff9d5a9a765918bd58061552cd08315
7
+ data.tar.gz: b1298b3bd7bdb9e8f3b7ec97c4f4ae24cd5c5d34b035693d1d08567a2be85e3cecc36a4563eb1ae14a59769fb2842835fdec2cf521d5c24631a0ca9c5adc6b57
data/README.md CHANGED
@@ -167,6 +167,8 @@ You can find all the properties in `_data/language.yml`.
167
167
 
168
168
  By default, it is in English, but you can easily add your own language.
169
169
 
170
+ Here you also can set the date format, e.g., set `str_date_format: '%B %-d, %Y'` for "January, 13, 2024", `str_date_format: '%Y-%m-%d'` for 2024-01-13, or `str_date_format: '%d.%m.%Y'` for 13.01.2024.
171
+
170
172
  ### Google Analytics
171
173
 
172
174
  To enable Google Analytics (GA4), add your [Measurement ID](https://support.google.com/analytics/answer/12270356?hl=en&sjid=1593376271608310401-NA)
@@ -258,15 +260,13 @@ mermaid: default # Enable mermaid-js for diagrams, use theme: base, forest, dark
258
260
  ```
259
261
 
260
262
  Find all the help you need on the official [mermaid documentation](https://mermaid-js.github.io/mermaid/).
261
- You can create with ease diagrams. Add your mermaid script inside two mermaid divs (default Kramdown does not yet support mermaid).
262
- With the `class="mermaid"` inside the `<div>`:
263
+ Use `mermaid` as color highlighter language to render the diagram or with the `class="mermaid"` inside the `<div>`:
263
264
 
264
- ```html
265
- <div class="mermaid">
265
+ ```markdown
266
+ ```mermaid
266
267
  sequenceDiagram
267
268
  Alice->>John: Hello John, how are you?
268
269
  John-->>Alice: Great!
269
- </div>
270
270
  ```
271
271
 
272
272
  ### Social icons
data/_data/language.yml CHANGED
@@ -17,6 +17,7 @@ str_cookie_disclaimer: "We would like to use third party cookies and scripts to
17
17
  str_months: [January, February, March, April, May, June, July, August, September, October, November, December]
18
18
  str_dark: 'Dark'
19
19
  str_light: 'Light'
20
+ str_date_format: '%B %-d, %Y'
20
21
 
21
22
  # Localization settings
22
23
  cusdis_lang: # zh-cn, es, tr, pt-BR
@@ -1,5 +1,5 @@
1
1
  {% assign author = site.data.authors[include.author] %}
2
- {% assign date = include.date | default: "today" | date: "%B %-d, %Y" %}
2
+ {% assign date = include.date | default: "today" | date: site.data.language.str_date_format | default: '%B %-d, %Y' %}
3
3
 
4
4
  <div class="post-info">
5
5
  {%- if author.url -%}<a href="{{ author.url | relative_url }}" target="_blank" rel="noopener">{%- endif -%}
@@ -1,12 +1,18 @@
1
1
  <footer class="site-footer">
2
2
  <p class="text">
3
3
  {{ site.footer_text | default: "Powered by <a href='https://jekyllrb.com/'>Jekyll</a> with <a href='https://github.com/sylhare/Type-on-Strap'>Type on Strap</a>" }}</p>
4
- <div class="footer-icons">
5
- <ul>
6
- <!-- Social icons from Font Awesome, if enabled -->
7
- {% include social/icons.liquid %}
8
- </ul>
9
- </div>
4
+ <div class="footer-icons">
5
+ <ul>
6
+ <!-- Social icons from Font Awesome, if enabled -->
7
+ {% include social/icons.liquid %}
8
+ </ul>
9
+ </div>
10
+ {% if site.mermaid %}
11
+ <script type="module">
12
+ mermaid.initialize({ startOnLoad: false, theme: "default" });
13
+ mermaid.run({ nodes: [...document.querySelectorAll('.language-mermaid'), ...document.querySelectorAll('.mermaid')] });
14
+ </script>
15
+ {% endif %}
10
16
  </footer>
11
17
 
12
18
 
@@ -41,12 +41,9 @@
41
41
  <script defer src="{{ '/assets/js/vendor/katex.auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
42
42
  {% endif %}
43
43
 
44
- <!-- Mermaid 10.6.1 -->
44
+ <!-- Mermaid 10.8.0 -->
45
45
  {% if site.mermaid %}
46
- <script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}" onload="mermaid.initialize({
47
- startOnLoad:true,
48
- theme: '{{ site.mermaid }}',
49
- });"></script>
46
+ <script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}"></script>
50
47
  {% endif %}
51
48
 
52
49
  <!-- Simple Jekyll Search 1.10.0 -->
@@ -1,3 +1,4 @@
1
+ {% assign dateFormat = site.data.language.str_date_format | default: '%B %-d, %Y' %}
1
2
  [
2
3
  {% for post in site.posts %}
3
4
  {
@@ -6,7 +7,7 @@
6
7
  "category" : "{{ post.category }}",
7
8
  "tags" : "{{ post.tags | join: ', ' | prepend: " " }}",
8
9
  "url" : "{{ post.url | relative_url }}",
9
- "date" : "{{ post.date | date: "%B %-d, %Y" }}",
10
+ "date" : "{{ post.date | date: dateFormat }}",
10
11
  "excerpt" : {{ post.content | strip_html | strip_newlines | strip | escape | truncate: '250' | escape | jsonify }},
11
12
  "content" : {{ post.content | strip_html | strip_newlines | strip | escape | jsonify }}
12
13
  {% endunless %}
@@ -20,7 +21,7 @@
20
21
  "category" : "{{ page.category }}",
21
22
  "tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
22
23
  "url" : "{{ page.url | relative_url }}",
23
- "date" : "{{ page.date | date: "%B %-d, %Y" | default: "N/A" }}",
24
+ "date" : "{{ page.date | date: dateFormat | default: "N/A" }}",
24
25
  "excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | escape | jsonify }},
25
26
  "content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
26
27
  {% endunless %}
@@ -36,7 +37,7 @@
36
37
  "category" : "{{ page.category }}",
37
38
  "tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
38
39
  "url" : "{{ page.url | relative_url }}",
39
- "date" : "{{ page.date | date: "%B %-d, %Y" | default: "N/A" }}",
40
+ "date" : "{{ page.date | date: dateFormat | default: "N/A" }}",
40
41
  "excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | jsonify }},
41
42
  "content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
42
43
  {% endif %}
@@ -0,0 +1,33 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+ <div class="home">
6
+ <div id="archive">
7
+ {% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %}
8
+ <ul class="archive-clouds">
9
+ {% for year in postsByYear %}
10
+ <a href="#archive-{{ year.name | cgi_escape }}" class="archive-anchor">
11
+ <li>
12
+ {{ year.name | cgi_escape }} ({{year.items.size}})
13
+ </li>
14
+ </a>
15
+ {% endfor %}
16
+ </ul>
17
+ {% for year in postsByYear %}
18
+ <div class="archive-group">
19
+ <h4 id="archive-{{year.name}}" class="title">{{ year.name }} ({{year.items.size}})</h4>
20
+ <div class="items">
21
+ {% for post in year.items %}
22
+ <a href="{{ post.url | relative_url }}" class="archive-post-link">
23
+ <div class="item">
24
+ <p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
25
+ <p class="title">{{ post.title }}</p>
26
+ </div>
27
+ </a>
28
+ {% endfor %}
29
+ </div>
30
+ </div>
31
+ {% endfor %}
32
+ </div>
33
+ </div>
@@ -25,7 +25,7 @@ layout: page
25
25
  {% for post in site.categories[group] %}
26
26
  <a href="{{ post.url | relative_url }}" class="category-post-link">
27
27
  <div class="item">
28
- <p class="meta">{{ post.date | date: "%B %-d, %Y" }}</p>
28
+ <p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
29
29
  <p class="title">{{ post.title }}</p>
30
30
  </div>
31
31
  </a>
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <!--
3
- Type on Strap jekyll theme v2.4.8
3
+ Type on Strap jekyll theme v2.4.9
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
  -->
@@ -269,7 +269,7 @@ details {
269
269
  }
270
270
 
271
271
  // Mermaid
272
- .mermaid {
272
+ .mermaid, .language-mermaid {
273
273
  background-color: rgba(255, 255, 255, 0.9);
274
274
  border-radius: 2%;
275
275
 
@@ -1,4 +1,6 @@
1
+ #archive,
1
2
  #categories {
3
+ .archive-clouds,
2
4
  .category-clouds {
3
5
  margin: 30px 0 30px;
4
6
 
@@ -30,12 +32,14 @@
30
32
  color: var(--header-text);
31
33
  }
32
34
 
35
+ .archive-anchor:hover,
33
36
  .category-anchor:hover {
34
37
  text-decoration: none !important;
35
38
  filter: none;
36
39
  }
37
40
  }
38
41
 
42
+ .archive-group,
39
43
  .category-group {
40
44
  padding: 15px 0 10px;
41
45
 
@@ -71,6 +75,7 @@
71
75
  height: 100%;
72
76
  }
73
77
 
78
+ .archive-post-link:hover,
74
79
  .category-post-link:hover {
75
80
  text-decoration: none;
76
81