jekyll-theme-zer0 0.1.5 → 0.1.7

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: 54143764fa2227d99167438eb1a68c6e98e5133e0d01f2b2633acd88be6a3a00
4
- data.tar.gz: 4d5ccc9af8f8aaf8d478789588419732268637965a655609bdad43c8d214c768
3
+ metadata.gz: 0bcceab691e9812667c8a77b3cfbfbe58008790d0916b4307262e643e7858d16
4
+ data.tar.gz: 4218ec0c56073c7eac24338b76505cdcac5881d1364d9070d5a109fa571b470a
5
5
  SHA512:
6
- metadata.gz: 319dce277549bc6825dde7174f75000c04fef3c77ebba798d8a0041c761fe31da2690eb6d1c90c0d6b515192333bb1e5f42b00a2f6f065f9ce0479999ddf4d2b
7
- data.tar.gz: 8b0f559ed7a5a01314a0f02a392d63700f10fc17d179741297e6ac751a9cd02c01571eeac2fdab82ea8e42b23b809319b181e9bf99b3bc54f04571a09a5ac178
6
+ metadata.gz: a3ddb660d01c5cd57f08cc29f8995334a83a91658b03a5160d58158d845b89e21509be50d48b5233af0056ea6228bc5e5fe35c628de90a2f23020c4f98874913
7
+ data.tar.gz: f6717c5b254222de1ae9c3aec6cef82e51bd3f5f2dc5f33d5c4925b54e2e43cedfc8ce1770968c6dc010aa9b49a91f2b627ec3289d9d7f02ea9ccae5a54ce8e3
@@ -0,0 +1,19 @@
1
+ - icon: world
2
+ url: /posts/world/
3
+ title: World
4
+ - title: Technology
5
+ icon: tech
6
+ url: /posts/tech/
7
+ - title: Business
8
+ icon: cash
9
+ url: /posts/business/
10
+ - title: Science
11
+ icon: flask
12
+ url: /posts/science/
13
+ - title: Health
14
+ icon: heart
15
+ url: /posts/health/
16
+ - title: Politics
17
+ icon: politics
18
+ url: /posts/politics/
19
+
data/_includes/intro.html CHANGED
@@ -14,10 +14,31 @@
14
14
  <div class="bd-intro pt-5 ps-lg-2 position-relative" style="
15
15
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('{{ page.preview | relative_url | default: site.info_banner }}') no-repeat center center / cover;
16
16
  color: #fff;">
17
+ <!-- Share Icon with Popover for Multiple Sharing Options -->
18
+ <div class="position-absolute top-0 end-0 m-3">
19
+ <a href="#" class="btn btn-info" data-bs-toggle="popover" data-bs-html="true" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="<div class='d-flex flex-column'><a href='https://reddit.com/submit?url={{ page.url | absolute_url | url_encode }}&amp;title={{ page.title | url_encode }}' target='_blank'>Share on Reddit</a><button class='btn btn-link' onclick='navigator.clipboard.writeText(&quot;{{ page.url | absolute_url }}&quot;);'>Copy Link</button></div>" title="Share Options">
20
+ <i class="bi bi-share"></i>
21
+ </a>
22
+ </div>
23
+
24
+ <script>
25
+ document.addEventListener('DOMContentLoaded', function () {
26
+ var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
27
+ var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
28
+ return new bootstrap.Popover(popoverTriggerEl);
29
+ });
30
+
31
+ // Optional: Check if the clipboard API is supported
32
+ if (!navigator.clipboard) {
33
+ console.warn('Clipboard API not supported');
34
+ }
35
+ });
36
+ </script>
37
+
17
38
  <br>
18
39
  <h1>{{ page.title }}</h1>
19
40
  <p>By {{ page.author | default: site.author.name }}</p>
20
- <p>{{ page.excerpt }}</p>
41
+ <p>{{ page.description }}</p>
21
42
  <p>Estimated reading time: {{ content | number_of_words | divided_by:200 }} minutes</p>
22
43
  <!-- Edit on Github Button -->
23
44
  <a href="https://github.com/{{ site.repository }}/blob/master/{{ page_dir }}/{{ page.path }}" class="btn btn-dark position-absolute bottom-0 end-0 m-3">
data/_includes/seo.html CHANGED
@@ -10,8 +10,8 @@
10
10
 
11
11
  {%- assign seo_url = site.url | append: site.baseurl -%}
12
12
  {%- assign canonical_url = site.url %}
13
- {%- assign seo_title = page.title | default: site.title | append: " " | append: title_separator | append: " " | append: site.title -%}
14
13
  {% assign title_separator = site.title_separator | default: '-' %}
14
+ {%- assign seo_title = page.title | default: site.title | append: " " | append: title_separator | append: " " | append: site.title -%}
15
15
  {%- assign seo_description = page.description | default: site.description -%}
16
16
 
17
17
  {%- assign author = page.author | default: site.author -%}
@@ -35,7 +35,7 @@
35
35
  {%- assign og_type = "website" -%}
36
36
  {%- endif -%}
37
37
 
38
- <title>{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %}</title>
38
+ <title>{{ seo_title | default: site.title }} {% if paginator %}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %}</title>
39
39
  <meta name="description" content="{{ seo_description }}">
40
40
  <meta name="author" content="{{ author.name | default: author }}">
41
41
 
data/_layouts/blog.html CHANGED
@@ -22,62 +22,53 @@ source: "https://getbootstrap.com/docs/5.3/examples/blog/#"
22
22
  </header>
23
23
 
24
24
  <div class="nav-scroller py-1 mb-3 border-bottom">
25
- <nav class="nav nav-underline justify-content-between">
26
- <a class="nav-item nav-link link-body-emphasis active" href="#">World</a>
27
- <a class="nav-item nav-link link-body-emphasis" href="#">U.S.</a>
28
- <a class="nav-item nav-link link-body-emphasis" href="#">Technology</a>
29
- <a class="nav-item nav-link link-body-emphasis" href="#">Business</a>
30
- <a class="nav-item nav-link link-body-emphasis" href="#">Politics</a>
31
- <a class="nav-item nav-link link-body-emphasis" href="#">Science</a>
32
- <a class="nav-item nav-link link-body-emphasis" href="#">Travel</a>
33
- </nav>
25
+ <nav class="nav nav-underline justify-content-between">
26
+ {% for item in site.data.navigation.posts %}
27
+ <a class="nav-item nav-link link-body-emphasis" href="{{ item.url }}">{{ item.title }}</a>
28
+ {% endfor %}
29
+ </nav>
34
30
  </div>
35
31
  </div>
36
32
 
37
33
  <main class="container">
34
+
35
+ {% assign breaking_news_posts = site.posts | where: "categories", "breaking" %}
36
+ {% assign most_recent_post = breaking_news_posts | first %}
37
+
38
38
  <div class="p-4 p-md-5 mb-4 rounded text-body-emphasis bg-body-secondary">
39
- <div class="col-lg-6 px-0">
40
- <h1 class="display-4 fst-italic">Title of a longer featured blog post</h1>
41
- <p class="lead my-3">Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.</p>
42
- <p class="lead mb-0"><a href="#" class="text-body-emphasis fw-bold">Continue reading...</a></p>
39
+ <div class="row">
40
+ <div class="col-lg-6">
41
+ <h1 class="display-4 fst-italic">{{ most_recent_post.title }}</h1>
42
+ <p class="lead my-3">{{ most_recent_post.excerpt }}</p>
43
+ <p class="lead mb-0"><a href="{{ site.baseurl }}{{ most_recent_post.url }}" class="text-body-emphasis fw-bold">Continue reading...</a></p>
44
+ </div>
45
+ <div class="col-lg-6">
46
+ <img src="{{ site.baseurl }}{{ most_recent_post.preview }}" alt="Preview image" class="img-fluid">
47
+ </div>
43
48
  </div>
44
49
  </div>
45
50
 
46
51
  <div class="row mb-2">
47
- <div class="col-md-6">
48
- <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
49
- <div class="col p-4 d-flex flex-column position-static">
50
- <strong class="d-inline-block mb-2 text-primary-emphasis">World</strong>
51
- <h3 class="mb-0">Featured post</h3>
52
- <div class="mb-1 text-body-secondary">Nov 12</div>
53
- <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
54
- <a href="#" class="icon-link gap-1 icon-link-hover stretched-link">
55
- Continue reading
56
- <svg class="bi"><use xlink:href="#chevron-right"/></svg>
57
- </a>
58
- </div>
59
- <div class="col-auto d-none d-lg-block">
60
- <svg class="bd-placeholder-img" width="200" height="250" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Thumbnail" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#55595c"/><text x="50%" y="50%" fill="#eceeef" dy=".3em">Thumbnail</text></svg>
52
+ {% assign featured_posts = site.posts | where: "featured", true %}
53
+ {% for post in featured_posts %}
54
+ <div class="col-md-6">
55
+ <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
56
+ <div class="col p-4 d-flex flex-column position-static">
57
+ <strong class="d-inline-block mb-2 text-primary-emphasis">{{ post.categories[0] }}</strong>
58
+ <h3 class="mb-0">{{ post.title }}</h3>
59
+ <div class="mb-1 text-body-secondary">{{ post.date | date: "%b %d" }}</div>
60
+ <p class="card-text mb-auto">{{ post.excerpt | strip_html | truncate: 200 }}</p>
61
+ <a href="{{ site.baseurl }}{{ post.url }}" class="icon-link gap-1 icon-link-hover stretched-link">
62
+ Continue reading
63
+ <svg class="bi"><use xlink:href="#chevron-right"/></svg>
64
+ </a>
65
+ </div>
66
+ <div class="col-md-6 d-none d-lg-block">
67
+ <img src="{{ site.baseurl }}{{ post.preview }}" alt="Post preview image" class="img-fluid">
68
+ </div>
61
69
  </div>
62
70
  </div>
63
- </div>
64
- <div class="col-md-6">
65
- <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
66
- <div class="col p-4 d-flex flex-column position-static">
67
- <strong class="d-inline-block mb-2 text-success-emphasis">Design</strong>
68
- <h3 class="mb-0">Post title</h3>
69
- <div class="mb-1 text-body-secondary">Nov 11</div>
70
- <p class="mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
71
- <a href="#" class="icon-link gap-1 icon-link-hover stretched-link">
72
- Continue reading
73
- <svg class="bi"><use xlink:href="#chevron-right"/></svg>
74
- </a>
75
- </div>
76
- <div class="col-auto d-none d-lg-block">
77
- <svg class="bd-placeholder-img" width="200" height="250" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Thumbnail" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#55595c"/><text x="50%" y="50%" fill="#eceeef" dy=".3em">Thumbnail</text></svg>
78
- </div>
79
- </div>
80
- </div>
71
+ {% endfor %}
81
72
  </div>
82
73
 
83
74
  <div class="row g-5">
@@ -90,67 +81,6 @@ source: "https://getbootstrap.com/docs/5.3/examples/blog/#"
90
81
  {{ content }}
91
82
  </article>
92
83
 
93
- <article class="blog-post">
94
- <h2 class="display-5 link-body-emphasis mb-1">Another blog post</h2>
95
- <p class="blog-post-meta">December 23, 2020 by <a href="#">Jacob</a></p>
96
-
97
- <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p>
98
- <blockquote>
99
- <p>Longer quote goes here, maybe with some <strong>emphasized text</strong> in the middle of it.</p>
100
- </blockquote>
101
- <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p>
102
- <h3>Example table</h3>
103
- <p>And don't forget about tables in these posts:</p>
104
- <table class="table">
105
- <thead>
106
- <tr>
107
- <th>Name</th>
108
- <th>Upvotes</th>
109
- <th>Downvotes</th>
110
- </tr>
111
- </thead>
112
- <tbody>
113
- <tr>
114
- <td>Alice</td>
115
- <td>10</td>
116
- <td>11</td>
117
- </tr>
118
- <tr>
119
- <td>Bob</td>
120
- <td>4</td>
121
- <td>3</td>
122
- </tr>
123
- <tr>
124
- <td>Charlie</td>
125
- <td>7</td>
126
- <td>9</td>
127
- </tr>
128
- </tbody>
129
- <tfoot>
130
- <tr>
131
- <td>Totals</td>
132
- <td>21</td>
133
- <td>23</td>
134
- </tr>
135
- </tfoot>
136
- </table>
137
-
138
- <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p>
139
- </article>
140
-
141
- <article class="blog-post">
142
- <h2 class="display-5 link-body-emphasis mb-1">New feature</h2>
143
- <p class="blog-post-meta">December 14, 2020 by <a href="#">Chris</a></p>
144
-
145
- <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p>
146
- <ul>
147
- <li>First list item</li>
148
- <li>Second list item with a longer description</li>
149
- <li>Third list item to close it out</li>
150
- </ul>
151
- <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p>
152
- </article>
153
-
154
84
  <nav class="blog-pagination" aria-label="Pagination">
155
85
  <a class="btn btn-outline-primary rounded-pill" href="#">Older</a>
156
86
  <a class="btn btn-outline-secondary rounded-pill disabled" aria-disabled="true">Newer</a>
@@ -167,19 +97,19 @@ source: "https://getbootstrap.com/docs/5.3/examples/blog/#"
167
97
 
168
98
  <div>
169
99
  <h4 class="fst-italic">Recent posts</h4>
170
- <ul class="list-unstyled">
171
- {% for post in site.posts limit:3 %}
172
- <li>
173
- <a class="d-flex flex-column flex-lg-row gap-3 align-items-start align-items-lg-center py-3 link-body-emphasis text-decoration-none border-top" href="{{ post.url }}">
174
- <img class="bd-placeholder-img" src="{{ page.preview | default: site.og_image }}" width="100%" height="96" alt="Preview image">
175
- <div class="col-lg-8">
176
- <h6 class="mb-0">{{ post.title }}</h6>
177
- <small class="text-body-secondary">{{ post.date | date: "%B %d, %Y" }}</small>
178
- </div>
179
- </a>
180
- </li>
181
- {% endfor %}
182
- </ul>
100
+ <ul class="list-unstyled">
101
+ {% for post in site.posts limit:3 %}
102
+ <li>
103
+ <a class="d-flex flex-column flex-lg-row gap-3 align-items-start align-items-lg-center py-3 link-body-emphasis text-decoration-none border-top" href="{{ post.url }}">
104
+ <img class="bd-placeholder-img" src="{{ page.preview | default: site.og_image }}" width="50%" alt="Preview image">
105
+ <div class="col-lg-8">
106
+ <h6 class="mb-0">{{ post.title }}</h6>
107
+ <small class="text-body-secondary">{{ post.date | date: "%B %d, %Y" }}</small>
108
+ </div>
109
+ </a>
110
+ </li>
111
+ {% endfor %}
112
+ </ul>
183
113
  </div>
184
114
 
185
115
  <div class="p-4">
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-zer0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amr Abdel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-15 00:00:00.000000000 Z
11
+ date: 2024-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -65,6 +65,7 @@ files:
65
65
  - _data/navigation/about.yml
66
66
  - _data/navigation/docs.yml
67
67
  - _data/navigation/main.yml
68
+ - _data/navigation/posts.yml
68
69
  - _includes/branding.html
69
70
  - _includes/breadcrumbs.html
70
71
  - _includes/dev-shortcuts.html