jekyll-theme-zer0 0.1.5 → 0.1.6

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: 54143764fa2227d99167438eb1a68c6e98e5133e0d01f2b2633acd88be6a3a00
4
- data.tar.gz: 4d5ccc9af8f8aaf8d478789588419732268637965a655609bdad43c8d214c768
3
+ metadata.gz: 4cbcddfefa953a659a707422e7dbe3722543f7e29bef44945d8713fb89c3c7e5
4
+ data.tar.gz: 1127eb03bcfda032c18ec2d80c96d823bb0dae832576b7806e4ec48a945305d6
5
5
  SHA512:
6
- metadata.gz: 319dce277549bc6825dde7174f75000c04fef3c77ebba798d8a0041c761fe31da2690eb6d1c90c0d6b515192333bb1e5f42b00a2f6f065f9ce0479999ddf4d2b
7
- data.tar.gz: 8b0f559ed7a5a01314a0f02a392d63700f10fc17d179741297e6ac751a9cd02c01571eeac2fdab82ea8e42b23b809319b181e9bf99b3bc54f04571a09a5ac178
6
+ metadata.gz: 69590a14f340c8cdbf199852588875fba1475481747667a8bdd34bc6a068a680f704002b66a89a6a686f5266ab4c5fe3804f0f70babf370cd2096dff01a2d9cd
7
+ data.tar.gz: a5a0fd1a835d6fa746d600d34f0ebf3b73f7dadf06bd16a2d6a98c576d35e50421c461f7308057e38d39a83e375362510b9c1a0231825de20a66459a3d360127
@@ -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,6 +14,27 @@
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>
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.6
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-06-29 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