whiteblog-theme 0.1.1 → 0.1.2

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: 38c979633be7410fafccfad24c895c5f95641dcd469da8350aabcb291318bdc5
4
- data.tar.gz: b50142446c66d293839b3dea0dfd8147be7788851f0dc87819ae31708e8df6a7
3
+ metadata.gz: 422e320ab9cb4988ded7dd26db917e6a3ed7322426c4b65ca13b356df46a9f61
4
+ data.tar.gz: 2c06876ced4cc891039b0680b24e6799338d8efbdb7aaf75f24e9cdd9b691040
5
5
  SHA512:
6
- metadata.gz: ad5295bd99a265f9d51b9d9d79ae9ec643f86881ef9437d720b9313e9d3ccf2b826d02fb9e5e34465d1e4d267959f5bf7b043c9c71aad18272d8de148fad42ba
7
- data.tar.gz: 28a844fc1647e4a39a30c81cb72f06f9b013a9bf3b6440507e4d08fa67af6f7e0571623e5517accaf32468f53a73efa36e012e4ba554efa7269937e6b43c4d18
6
+ metadata.gz: 454fc210a5bc2d53e7f048ae23c8904e5549d845d427e6b661bc52c6da039bc00f7f737543dabe8c4acd8421900278f19a614565d348461bce1066618d5007a6
7
+ data.tar.gz: 5ca06af7e36dd982ae5c4b2a9f1b6ffefe2f16b783b85f1d56b1a0d8b3e88ac386ea76cef32b8fa140eab149201c0f9c570b17b3ebd540d589bc30b36a186214
@@ -0,0 +1,12 @@
1
+ {% if site.comments.disqus.shortname %}
2
+ <!--Every article has a id, but special pages don't unless you set manually.
3
+ This prevents Cusdis from appear everywhere-->
4
+ <div id="cusdis_thread"
5
+ data-host="https://cusdis.com"
6
+ data-app-id="{{ site.comments.cusdis.appId }}"
7
+ data-page-id="{{ page.id }}"
8
+ data-page-url="{{ site.url }}{{ page.baseurl }}{{ page.url }}"
9
+ data-page-title="{{ page.title }}"
10
+ ></div>
11
+ <script defer src="https://cusdis.com/js/cusdis.es.js"></script>
12
+ {% endif %}
@@ -3,5 +3,8 @@
3
3
  {% when "disqus" %}
4
4
  <h4>Comments</h4>
5
5
  <section id="disqus_thread"></section>
6
+ {% when "cusdis" %}
7
+ <h4>Comments</h4>
8
+ {% include comments-providers/cusdis.html %}
6
9
  {% endcase %}
7
10
  </div>
@@ -3,7 +3,7 @@
3
3
  <a id="blog-title" class="navbar-brand" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
4
4
  <div class="navbar-links">
5
5
  <span class="nav-toggle" id="js-nav-toggle">
6
- <svg viewBox="0 0 100 80" width="20" height="20">
6
+ <svg viewBox="0 0 100 80" width="20" height="20" fill="currentColor">
7
7
  <rect width="100" height="18" rx="8"></rect>
8
8
  <rect y="30" width="100" height="18" rx="8"></rect>
9
9
  <rect y="60" width="100" height="18" rx="8"></rect>
@@ -21,6 +21,7 @@
21
21
  {% endif %}
22
22
  {% endfor %}
23
23
  {% endif %}
24
+ <li><button id="theme-toggle" aria-label="Change theme" title="Change theme"></button></li>
24
25
  </ul>
25
26
  </div>
26
27
  </div>
@@ -1,3 +1,12 @@
1
+ <script>
2
+ (function() {
3
+ const saved = localStorage.getItem('whiteblog-theme');
4
+ const theme = saved || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
5
+ document.documentElement.setAttribute('data-theme', theme);
6
+ })();
7
+ </script>
8
+
9
+ <script src="{{ '/assets/js/theme-toggle.js' | relative_url }}"></script>
1
10
  <script src="{{ '/assets/js/main.js' | relative_url }}"></script>
2
11
 
3
12
  {% if site.analytics %}
@@ -12,13 +12,24 @@
12
12
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
13
13
  <path
14
14
  d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"
15
- fill="#000000" />
15
+ fill="currentColor" />
16
16
  </svg>
17
17
  <p>{{ site.author.location }}</p>
18
18
  </span>
19
19
  </li>
20
20
  {% endif %}
21
21
  <ul class="horizontal">
22
+ {% if site.author.uri %}
23
+ <li>
24
+ <a class="link" href="{{ site.author.uri }}" target="_blank" rel="noopener"
25
+ title="Website">
26
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
27
+ class="social-networks-icons" viewBox="0 0 16 16">
28
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" d="M8 14.5c.23 0 .843-.226 1.487-1.514.306-.612.563-1.37.742-2.236H5.771c.179.866.436 1.624.742 2.236C7.157 14.274 7.77 14.5 8 14.5ZM5.554 9.25a14.444 14.444 0 0 1 0-2.5h4.892a14.452 14.452 0 0 1 0 2.5H5.554Zm6.203 1.5c-.224 1.224-.593 2.308-1.066 3.168a6.525 6.525 0 0 0 3.2-3.168h-2.134Zm2.623-1.5h-2.43a16.019 16.019 0 0 0 0-2.5h2.429a6.533 6.533 0 0 1 0 2.5Zm-10.331 0H1.62a6.533 6.533 0 0 1 0-2.5h2.43a15.994 15.994 0 0 0 0 2.5Zm-1.94 1.5h2.134c.224 1.224.593 2.308 1.066 3.168a6.525 6.525 0 0 1-3.2-3.168Zm3.662-5.5h4.458c-.179-.866-.436-1.624-.742-2.236C8.843 1.726 8.23 1.5 8 1.5c-.23 0-.843.226-1.487 1.514-.306.612-.563 1.37-.742 2.236Zm5.986 0h2.134a6.526 6.526 0 0 0-3.2-3.168c.473.86.842 1.944 1.066 3.168ZM5.31 2.082c-.473.86-.842 1.944-1.066 3.168H2.109a6.525 6.525 0 0 1 3.2-3.168ZM8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Z"/>
29
+ </svg>
30
+ </a>
31
+ </li>
32
+ {% endif %}
22
33
  {% if site.author.x %}
23
34
  <li>
24
35
  <a class="link" href="https://x.com/{{ site.author.x }}" target="_blank" rel="noopener"
@@ -47,10 +58,10 @@
47
58
  <li>
48
59
  <a class="link" href="mailto: {{ site.author.email}}" target="_blank" rel="noopener" title="Email">
49
60
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
50
- class="social-networks-icons" viewBox="0 0 24 24">
61
+ class="social-networks-icons" viewBox="0 0 23 23">
51
62
  <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"
52
- fill="none" stroke="#000000" stroke-width="2" />
53
- <path d="M22 6l-10 7L2 6" fill="none" stroke="#000000" stroke-width="2"
63
+ fill="none" stroke="currentColor" stroke-width="2" />
64
+ <path d="M22 6l-10 7L2 6" fill="none" stroke="currentColor" stroke-width="2"
54
65
  stroke-linecap="round" />
55
66
  </svg>
56
67
  </a>
@@ -59,13 +70,22 @@
59
70
  {% if site.author.github %}
60
71
  <li>
61
72
  <a class="link" href="https://github.com/{{ site.author.github}}" target="_blank" rel="noopener" title="GitHub">
62
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#000000"
73
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
63
74
  class="social-networks-icons" viewBox="0 0 24 24">
64
75
  <path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path>
65
76
  </svg>
66
77
  </a>
67
78
  </li>
68
79
  {% endif %}
80
+ {% if site.author.stackoverflow %}
81
+ <li>
82
+ <a class="link" href="https://stackoverflow.com/users/{{ site.author.stackoverflow }}" target="_blank" rel="noopener" title="Stack Overflow">
83
+ <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="25px" height="25px" viewBox="0 0 35 35">
84
+ <path d="M 19.59375 2.84375 L 17.96875 3.96875 L 23.5625 12.1875 L 25.1875 11.0625 Z M 15.375 6.53125 L 14.0625 8.03125 L 21.5625 14.53125 L 22.875 13.03125 Z M 12.375 10.90625 L 11.46875 12.6875 L 20.3125 17.1875 L 21.21875 15.40625 Z M 10.65625 15.4375 L 10.21875 17.375 L 19.875 19.65625 L 20.3125 17.71875 Z M 6 18 L 6 29 L 24 29 L 24 18 L 22 18 L 22 27 L 8 27 L 8 18 Z M 10.09375 19.6875 L 9.96875 21.6875 L 19.875 22.25 L 20 20.25 Z M 10 23 L 10 25 L 19.9375 25 L 19.9375 23 Z"/>
85
+ </svg>
86
+ </a>
87
+ </li>
88
+ {% endif %}
69
89
  </ul>
70
90
  </ul>
71
91
  </section>
data/_layouts/home.html CHANGED
@@ -2,7 +2,7 @@
2
2
  layout: default
3
3
  ---
4
4
  <div class="container">
5
- <div id="navigation-space" class="row">
5
+ <div id="navigation-space" class="row-grid">
6
6
  </div>
7
7
  <article class="post">
8
8
  <div id="content">
@@ -10,17 +10,17 @@ layout: default
10
10
  <ul>
11
11
  {% assign date_format = "%b %-d, %Y" %}
12
12
  {% for post in paginator.posts %}
13
- <li class="post-resume">
14
- <h1 class="post-resume-title">
15
- <a href="{{ post.url | relative_url }}">
16
- <span class="underline">{{ post.title | escape }}</span>
17
- </a>
18
- </h1>
19
- <span class="text-secondary">{{ post.date | date: date_format }}</span>
20
- <div>
21
- {{ post.excerpt }}
22
- </div>
23
- </li>
13
+ <li class="post-resume">
14
+ <h1 class="post-resume-title">
15
+ <a href="{{ post.url | relative_url }}">
16
+ <span class="underline">{{ post.title | escape }}</span>
17
+ </a>
18
+ </h1>
19
+ <span class="text-secondary">{{ post.date | date: date_format }}</span>
20
+ <div>
21
+ {{ post.excerpt }}
22
+ </div>
23
+ </li>
24
24
  {% endfor %}
25
25
  </ul>
26
26
  {% if paginator.total_pages > 1 %}
@@ -29,71 +29,71 @@ layout: default
29
29
  <ul>
30
30
  {% comment %} Link for previous page {% endcomment %}
31
31
  {% if paginator.previous_page %}
32
- {% if paginator.previous_page == 1 %}
33
- <li>
34
- <a href="{{ first_page_path }}">
35
- <span class="chevron left"></span>
36
- </a>
37
- </li>
38
- {% else %}
39
- <li>
40
- <a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | absolute_url }}">
41
- <span class="chevron left"></span>
42
- </a>
43
- </li>
44
- {% endif %}
32
+ {% if paginator.previous_page == 1 %}
33
+ <li>
34
+ <a href="{{ first_page_path }}">
35
+ <span class="chevron left"></span>
36
+ </a>
37
+ </li>
38
+ {% else %}
39
+ <li>
40
+ <a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | absolute_url }}">
41
+ <span class="chevron left"></span>
42
+ </a>
43
+ </li>
44
+ {% endif %}
45
45
  {% else %}
46
46
  <li><a href="#" class="disabled"><span id="previous-page" aria-hidden="true"></span></a></li>
47
47
  {% endif %}
48
48
  {% comment %} First page {% endcomment %}
49
49
  {% if paginator.page == 1 %}
50
- <li><a href="#" class="disabled current">1</a></li>
50
+ <li><a href="#" class="disabled current">1</a></li>
51
51
  {% else %}
52
- <li><a href="{{ first_page_path }}">1</a></li>
52
+ <li><a href="{{ first_page_path }}">1</a></li>
53
53
  {% endif %}
54
54
  {% assign page_start = 2 %}
55
55
  {% if paginator.page > 4 %}
56
- {% assign page_start = paginator.page | minus: 2 %}
57
- {% comment %} Ellipsis for truncated links {% endcomment %}
58
- <li><a href="#" class="disabled">&hellip;</a></li>
56
+ {% assign page_start = paginator.page | minus: 2 %}
57
+ {% comment %} Ellipsis for truncated links {% endcomment %}
58
+ <li><a href="#" class="disabled">&hellip;</a></li>
59
59
  {% endif %}
60
60
  {% assign page_end = paginator.total_pages | minus: 1 %}
61
61
  {% assign pages_to_end = paginator.total_pages | minus: paginator.page %}
62
62
  {% if pages_to_end > 4 %}
63
- {% assign page_end = paginator.page | plus: 2 %}
63
+ {% assign page_end = paginator.page | plus: 2 %}
64
64
  {% endif %}
65
65
  {% for index in (page_start..page_end) %}
66
- {% if index == paginator.page %}
67
- <li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li>
68
- {% else %}
69
- {% comment %} Distance from current page and this link {% endcomment %}
70
- {% assign dist = paginator.page | minus: index %}
71
- {% if dist < 0 %}
72
- {% comment %} Distance must be a positive value {% endcomment %}
73
- {% assign dist = 0 | minus: dist %}
74
- {% endif %}
75
- <li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li>
66
+ {% if index == paginator.page %}
67
+ <li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li>
68
+ {% else %}
69
+ {% comment %} Distance from current page and this link {% endcomment %}
70
+ {% assign dist = paginator.page | minus: index %}
71
+ {% if dist < 0 %}
72
+ {% comment %} Distance must be a positive value {% endcomment %}
73
+ {% assign dist = 0 | minus: dist %}
74
+ {% endif %}
75
+ <li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li>
76
76
  {% endif %}
77
- {% endfor %}
78
- {% comment %} Ellipsis for truncated links {% endcomment %}
79
- {% if pages_to_end > 3 %}
77
+ {% endfor %}
78
+ {% comment %} Ellipsis for truncated links {% endcomment %}
79
+ {% if pages_to_end > 3 %}
80
80
  <li><a href="#" class="disabled">&hellip;</a></li>
81
- {% endif %}
82
- {% if paginator.page == paginator.total_pages %}
81
+ {% endif %}
82
+ {% if paginator.page == paginator.total_pages %}
83
83
  <li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
84
- {% else %}
84
+ {% else %}
85
85
  <li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | absolute_url }}">{{ paginator.total_pages }}</a></li>
86
- {% endif %}
87
- {% comment %} Link next page {% endcomment %}
88
- {% if paginator.next_page %}
86
+ {% endif %}
87
+ {% comment %} Link next page {% endcomment %}
88
+ {% if paginator.next_page %}
89
89
  <li>
90
90
  <a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | absolute_url }}">
91
91
  <span class="chevron right"></span>
92
92
  </a>
93
93
  </li>
94
- {% else %}
94
+ {% else %}
95
95
  <li><a href="#" class="disabled"><span class="chevron right" aria-hidden="true"></span></a></li>
96
- {% endif %}
96
+ {% endif %}
97
97
  </ul>
98
98
  </nav>
99
99
  {% endif %}
@@ -13,7 +13,7 @@
13
13
  <div class="main-wrapper">
14
14
  <main>
15
15
  <div class="container">
16
- <div id="navigation-space" class="row">
16
+ <div id="navigation-space" class="row-grid">
17
17
  </div>
18
18
  <article class="post">
19
19
  <header>
data/_layouts/page.html CHANGED
@@ -3,7 +3,7 @@ layout: default
3
3
  ---
4
4
  <div class="container">
5
5
  <article class="post">
6
- <div id="navigation-space" class="row">
6
+ <div id="navigation-space" class="row-grid">
7
7
  </div>
8
8
  <header>
9
9
  <h1>
data/_layouts/post.html CHANGED
@@ -4,7 +4,7 @@ layout: default
4
4
  <div class="container">
5
5
  <article class="post">
6
6
 
7
- <div id="navigation-space" class="row">
7
+ <div id="navigation-space" class="row-grid">
8
8
  <div class="previous">
9
9
  {% if page.previous.url %}
10
10
  <a href="{{page.previous.url}}" class="nav-btn prev-btn" title="{{page.previous.title}}">
data/_pages/about.md CHANGED
@@ -5,9 +5,9 @@ layout: page-wide
5
5
  permalink: /about/
6
6
  ---
7
7
 
8
- <div class="row">
8
+ <div class="row-grid">
9
9
  <div class="center">
10
- <p>Hi, I'm Victor Silva, a software engineer with a passion for development and security. I'm currently working at <a href="https://www.mercadolibre.com">Mercado Libre</a> as a Cloud Security Engineer. You can check out my personal blog at <a href="https://blog.victorsilva.com.uy">Victor Silva Blog</a></p>
10
+ <p>Hi, I'm <b><i>Victor Silva</i></b>, a software engineer with a passion for development and security. I'm currently working at <a class="bounce-link" href="https://www.mercadolibre.com">Mercado Libre</a> as a Cloud Security Engineer. You can check out my personal blog <a class="bounce-link" href="https://blog.victorsilva.com.uy">$blogTopics | % {echo $_}</a></p>
11
11
  </div>
12
12
  <div class="center">
13
13
  <img class="about-image" src="{{ site.author.avatar }}" alt="{{ site.author.name }}" />
@@ -15,6 +15,21 @@
15
15
  --transition-default: all 0.3s ease-in-out;
16
16
  }
17
17
 
18
+ [data-theme="dark"] {
19
+ --color-bg: #231633;
20
+ --color-accent: #44318D;
21
+ --color-primary: #C266E8;
22
+ --color-text: #E8E8E8;
23
+ --color-dark: #CCCCCC;
24
+ --color-highlight: #D83F87;
25
+ --color-code: #FF6B9D;
26
+ --color-code-bg: #2a2a2a;
27
+ --color-notice: #4A3B5C;
28
+ --font-main: 'Space Grotesk', system-ui, -apple-system, sans-serif;
29
+ --container-width: 90%;
30
+ --transition-default: all 0.3s ease-in-out;
31
+ }
32
+
18
33
  *,
19
34
  *::before,
20
35
  *::after {
@@ -120,6 +135,57 @@ main {
120
135
  white-space: nowrap;
121
136
  }
122
137
 
138
+ #theme-toggle {
139
+ z-index: 1000;
140
+ background: var(--color-bg);
141
+ border: none;
142
+ border-radius: 50%;
143
+ width: 30px;
144
+ height: 30px;
145
+ font-size: 20px;
146
+ padding-bottom: 5px;
147
+ cursor: pointer;
148
+ align-items: center;
149
+ justify-content: center;
150
+ transition: var(--transition-default);
151
+ color: var(--color-text);
152
+ }
153
+
154
+ #theme-toggle:hover {
155
+ background: var(--color-primary);
156
+ color: var(--color-bg);
157
+ transform: scale(1.1);
158
+ }
159
+
160
+ #theme-toggle:active {
161
+ transform: scale(0.95);
162
+ }
163
+
164
+ .bounce-link {
165
+ font-weight: bold;
166
+ position: relative;
167
+ overflow: hidden;
168
+ text-decoration: none;
169
+ color: var(--color-primary) !important;
170
+ &::after {
171
+ content: "";
172
+ background: #ec407a40;
173
+ position: absolute;
174
+ left: 10px;
175
+ bottom: -5px;
176
+ width: calc(100% - 8px);
177
+ height: calc(100% - 8px);
178
+ // z-index: -1;
179
+ transition: 0.35s cubic-bezier(0.25, 0.1, 0, 2.05);
180
+ }
181
+ &:hover:after {
182
+ left: 0;
183
+ bottom: -2px;
184
+ width: 100%;
185
+ height: 100%;
186
+ }
187
+ }
188
+
123
189
  .link {
124
190
  position: relative;
125
191
  font-weight: bold;
@@ -287,7 +353,8 @@ a#blog-title:focus::before {
287
353
  .nav-list {
288
354
  display: flex;
289
355
  align-items: center;
290
- z-index: 1;
356
+ z-index: 2;
357
+ padding-bottom: 0rem;
291
358
  }
292
359
 
293
360
  .nav-list li {
@@ -325,11 +392,76 @@ a#blog-title:focus::before {
325
392
  min-height: 4rem;
326
393
  }
327
394
 
395
+ img {
396
+ max-width: 85%;
397
+ height: auto;
398
+ }
399
+
400
+ figure {
401
+ display: -webkit-box;
402
+ display: flex;
403
+ -webkit-box-pack: justify;
404
+ justify-content: space-between;
405
+ -webkit-box-align: start;
406
+ align-items: flex-start;
407
+ flex-wrap: wrap;
408
+ margin: 2em 0;
409
+ }
410
+
411
+ figure img,
412
+ figure iframe,
413
+ figure .fluid-width-video-wrapper {
414
+ margin-bottom: 1em
415
+ }
416
+
417
+ figure img {
418
+ width: 100%;
419
+ border-radius: 4px;
420
+ -webkit-transition: all 0.2s ease-in-out;
421
+ transition: all 0.2s ease-in-out
422
+ }
423
+
424
+ figure>a {
425
+ display: block
426
+ }
427
+
428
+ @media (min-width: 37.5em) {
429
+ figure.half > a,
430
+ figure.half > img {
431
+ width: calc(50% - 0.5em)
432
+ }
433
+ }
434
+
435
+ figure.half figcaption {
436
+ width: 100%
437
+ }
438
+
439
+ @media (min-width: 37.5em) {
440
+ figure.third > a,
441
+ figure.third > img {
442
+ width: calc(33.3333% - 0.5em);
443
+ }
444
+ }
445
+
446
+ figure.third figcaption {
447
+ width: 100%
448
+ }
449
+
450
+ figcaption {
451
+ margin-bottom: 0.5em;
452
+ font-size: 1em;
453
+ }
454
+
455
+ figcaption a {
456
+ -webkit-transition:all 0.2s ease-in-out;
457
+ transition:all 0.2s ease-in-out
458
+ }
459
+
328
460
  p {
329
461
  margin-bottom: 1rem;
330
462
  }
331
463
 
332
- .row {
464
+ .row-grid {
333
465
  display: grid;
334
466
  grid-template-columns: 1fr 1fr;
335
467
  font-size: 20px;
@@ -339,6 +471,14 @@ p {
339
471
  }
340
472
  }
341
473
 
474
+ .row {
475
+ font-size: 20px;
476
+
477
+ * {
478
+ color: var(--color-dark);
479
+ }
480
+ }
481
+
342
482
  .next {
343
483
  text-align: right;
344
484
  }
@@ -368,6 +508,7 @@ p {
368
508
 
369
509
  code {
370
510
  font-size: .9em;
511
+ font-family: 'Fira Code', monospace;
371
512
  color: var(--color-code);
372
513
  word-wrap: break-word;
373
514
  }
@@ -379,7 +520,7 @@ blockquote {
379
520
  border-bottom: 1px solid #F39237;
380
521
  font-style: italic;
381
522
  font-weight: 700;
382
- font-size: 1.5rem;
523
+ font-size: 1.1rem;
383
524
  width: 85%;
384
525
  margin: 2rem auto;
385
526
  height: 80px;
@@ -391,20 +532,25 @@ blockquote p {
391
532
  margin-bottom: 0;
392
533
  }
393
534
 
535
+ .highlight {
536
+ margin: 1.3rem 0;
537
+ }
538
+
394
539
  .highlight pre {
395
540
  border-radius: 0.25rem;
396
541
  padding: 1rem 1rem;
397
- margin: 0.75rem 0;
542
+ // margin: 0.75rem 0;
398
543
  overflow: auto;
399
544
  white-space: pre-wrap;
400
- background-color: var(--color-code-bg) !important;
545
+ background-color: #fafafa !important;
546
+ min-width: 100%;
401
547
  }
402
548
 
403
549
  .highlight pre button {
404
550
  position: absolute;
405
551
  top: 0.5rem;
406
552
  right: 0.5rem;
407
- color: var(--color-bg);
553
+ // color: var(--color-bg);
408
554
  background: none;
409
555
  border: none;
410
556
  cursor: pointer;
@@ -413,6 +559,7 @@ blockquote p {
413
559
 
414
560
  ul {
415
561
  list-style: none;
562
+ padding-bottom: 1rem;
416
563
  }
417
564
 
418
565
  .archive-group th {
@@ -650,6 +797,7 @@ svg {
650
797
  font-size: 16px;
651
798
  line-height: 30px;
652
799
  padding: 0.2em;
800
+ font-family: var(--font-main);
653
801
  }
654
802
 
655
803
  @media screen and (max-width: 949px) {
@@ -677,6 +825,9 @@ svg {
677
825
  text-align: center;
678
826
  padding: 0.5rem 0;
679
827
  border-bottom: 1px solid #ccc;
828
+ a {
829
+ display: block;
830
+ }
680
831
  }
681
832
 
682
833
  .main-wrapper {
@@ -738,4 +889,4 @@ svg {
738
889
  transition-duration: 0.01ms !important;
739
890
  scroll-behavior: auto !important;
740
891
  }
741
- }
892
+ }
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,69 @@
1
+ // Theme Toggle Script
2
+ (function() {
3
+ 'use strict';
4
+
5
+ const THEME_KEY = 'whiteblog-theme';
6
+ const LIGHT_THEME = 'light';
7
+ const DARK_THEME = 'dark';
8
+
9
+ function getThemePreference() {
10
+ const saved = localStorage.getItem(THEME_KEY);
11
+ if (saved) return saved;
12
+
13
+ return window.matchMedia('(prefers-color-scheme: dark)').matches
14
+ ? DARK_THEME
15
+ : LIGHT_THEME;
16
+ }
17
+
18
+ function applyTheme(theme) {
19
+ document.documentElement.setAttribute('data-theme', theme);
20
+ localStorage.setItem(THEME_KEY, theme);
21
+
22
+ updateToggleButton(theme);
23
+ }
24
+
25
+ function updateToggleButton(theme) {
26
+ const toggle = document.getElementById('theme-toggle');
27
+ if (!toggle) return;
28
+
29
+ const isDark = theme === DARK_THEME;
30
+ const moonIcon = '<svg id="moon" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path></svg>';
31
+ const sunIcon = '<svg id="sun" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>';
32
+ toggle.innerHTML = isDark ? moonIcon : sunIcon;
33
+
34
+ toggle.setAttribute('aria-label', `Cambiar a tema ${isDark ? 'claro' : 'oscuro'}`);
35
+ toggle.title = `Cambiar a tema ${isDark ? 'claro' : 'oscuro'}`;
36
+ }
37
+
38
+ function toggleTheme() {
39
+ const current = document.documentElement.getAttribute('data-theme') || LIGHT_THEME;
40
+ const newTheme = current === LIGHT_THEME ? DARK_THEME : LIGHT_THEME;
41
+ applyTheme(newTheme);
42
+ }
43
+
44
+ function init() {
45
+ const preference = getThemePreference();
46
+ applyTheme(preference);
47
+
48
+ const toggle = document.getElementById('theme-toggle');
49
+ if (toggle) {
50
+ toggle.addEventListener('click', toggleTheme);
51
+ }
52
+
53
+ window.matchMedia('(prefers-color-scheme: dark)')
54
+ .addEventListener('change', (e) => {
55
+ if (!localStorage.getItem(THEME_KEY)) {
56
+ applyTheme(e.matches ? DARK_THEME : LIGHT_THEME);
57
+ }
58
+ });
59
+ }
60
+
61
+ if (document.readyState === 'loading') {
62
+ document.addEventListener('DOMContentLoaded', init);
63
+ } else {
64
+ init();
65
+ }
66
+
67
+ const initialTheme = getThemePreference();
68
+ document.documentElement.setAttribute('data-theme', initialTheme);
69
+ })();
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whiteblog-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-08 00:00:00.000000000 Z
11
+ date: 2025-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -83,6 +83,7 @@ files:
83
83
  - README.md
84
84
  - _includes/analytics/googleAnalytics.html
85
85
  - _includes/backtotop.html
86
+ - _includes/comments-providers/cusdis.html
86
87
  - _includes/comments-providers/disqus.html
87
88
  - _includes/comments.html
88
89
  - _includes/footer.html
@@ -109,15 +110,17 @@ files:
109
110
  - _sass/whiteblog-theme/_syntax-highlighting.scss
110
111
  - assets/css/main.scss
111
112
  - assets/css/previews.css
113
+ - assets/images/avatar.jpg
112
114
  - assets/images/bio-photo.jpg
113
115
  - assets/images/favicon.ico
116
+ - assets/images/ko-fi.png
114
117
  - assets/images/previews/hello-world.png
115
- - assets/images/previews/otro-post.png
116
118
  - assets/images/previews/test-post.png
117
119
  - assets/images/previews/welcome-jekyll.png
118
120
  - assets/images/previews/yet-another-post.png
119
121
  - assets/js/jekyll-search.min.js
120
122
  - assets/js/main.js
123
+ - assets/js/theme-toggle.js
121
124
  homepage: https://github.com/vmsilvamolina/whiteblog-theme
122
125
  licenses:
123
126
  - MIT
Binary file