whiteblog-theme 0.1.1 → 0.1.3

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: a5cf4b9505de2ecabd8f208f57d0addcf2ea36fda1360656c27d847b82dc32db
4
+ data.tar.gz: 3d243726fcc0cb637d73911ea48674b90131e7d713195ec10d516e45d80b038f
5
5
  SHA512:
6
- metadata.gz: ad5295bd99a265f9d51b9d9d79ae9ec643f86881ef9437d720b9313e9d3ccf2b826d02fb9e5e34465d1e4d267959f5bf7b043c9c71aad18272d8de148fad42ba
7
- data.tar.gz: 28a844fc1647e4a39a30c81cb72f06f9b013a9bf3b6440507e4d08fa67af6f7e0571623e5517accaf32468f53a73efa36e012e4ba554efa7269937e6b43c4d18
6
+ metadata.gz: 29fe9de47e74be0e1b46da42ed42869a5b00805bf7aa55e65b645ac0afb830ce96fb188cd561127f1b9baac848516203f631ceb6cafa8a9bba6eb4ac1c10a68c
7
+ data.tar.gz: 279c6d8e00f2880881cb7a9bf12977e3560e806c43df74e25e487394dfce36767c23894e99df307f6b7f70359ce768794eefdf3acdcb9c88e3da6f69ac918090
@@ -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}}">
@@ -26,23 +26,39 @@ layout: default
26
26
  <h1>
27
27
  <span class="underline">{{ page.title | escape }}</span>
28
28
  </h1>
29
- <p class="text-secondary">
30
- <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
31
- {% assign date_format = site.theme.date_format | default: "%b %-d, %Y" %}
32
- {{ page.date | date: date_format }}
33
- </time><span style="display:inline-block; width: 6px;"></span>
34
- {% if post %}
35
- {% assign categories = post.categories %}
36
- {% else %}
37
- {% assign categories = page.categories %}
38
- {% endif %}
39
- <h5 id="category-badge">
40
- {% for category in categories %}
41
- <a href="{{site.baseurl}}/categories/#{{category|slugize}}" class="badge" >{{category}}</a>
42
- {% unless forloop.last %}&nbsp;{% endunless %}
43
- {% endfor %}
44
- </h5>
45
- </p>
29
+ <div class="text-secondary">
30
+ <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
31
+ {% assign date_format = site.theme.date_format | default: "%b %-d, %Y" %}
32
+ {{ page.date | date: date_format }}
33
+ </time>
34
+ {% if site.addons.old_post_warning %}
35
+ {% assign current_timestamp = 'now' | date: '%s' | plus: 0 %}
36
+ {% assign one_year_ago = current_timestamp | minus: 31536000 %}
37
+ {% assign post_date = page.date | date: '%s' | plus: 0 %}
38
+ {% if post_date < one_year_ago %}
39
+ <div class="warning-container">
40
+ <div class="warning-badge">
41
+ <span class="warning-icon"></span>
42
+ <span class="warning-text">This post is over a year old and may be outdated.</span>
43
+ </div>
44
+ </div>
45
+ {% endif %}
46
+ {% endif %}
47
+ </div>
48
+ <div>
49
+ <!--<span style="display:inline-block; width: 6px;"></span> -->
50
+ {% if post %}
51
+ {% assign categories = post.categories %}
52
+ {% else %}
53
+ {% assign categories = page.categories %}
54
+ {% endif %}
55
+ <h5 id="category-badge">
56
+ {% for category in categories %}
57
+ <a href="{{site.baseurl}}/categories/#{{category|slugize}}" class="badge" >{{category}}</a>
58
+ {% unless forloop.last %}&nbsp;{% endunless %}
59
+ {% endfor %}
60
+ </h5>
61
+ </div>
46
62
  </header>
47
63
 
48
64
  <div class="text-justify" id="content">
@@ -72,4 +88,4 @@ layout: default
72
88
  </div>
73
89
 
74
90
  </article>
75
- </div>
91
+ </div>
data/_pages/about.md CHANGED
@@ -5,11 +5,11 @@ 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
- <img class="about-image" src="{{ site.author.avatar }}" alt="{{ site.author.name }}" />
13
+ <img class="about-image" src="{{ site.author.about-photo }}" alt="{{ site.author.name }}" />
14
14
  </div>
15
- </div>
15
+ </div>
@@ -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: #282a36;
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,44 @@ 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
+ text-decoration: none;
167
+ background-image: linear-gradient(var(--color-bg) 50%, var(--color-accent) 50%);
168
+ background-size: auto 175%;
169
+ transition: background .3s ease-in-out;
170
+
171
+ &:hover {
172
+ background-position-y: 100%;
173
+ }
174
+ }
175
+
123
176
  .link {
124
177
  position: relative;
125
178
  font-weight: bold;
@@ -287,7 +340,8 @@ a#blog-title:focus::before {
287
340
  .nav-list {
288
341
  display: flex;
289
342
  align-items: center;
290
- z-index: 1;
343
+ z-index: 2;
344
+ padding-bottom: 0rem;
291
345
  }
292
346
 
293
347
  .nav-list li {
@@ -325,11 +379,76 @@ a#blog-title:focus::before {
325
379
  min-height: 4rem;
326
380
  }
327
381
 
382
+ img {
383
+ max-width: 85%;
384
+ height: auto;
385
+ }
386
+
387
+ figure {
388
+ display: -webkit-box;
389
+ display: flex;
390
+ -webkit-box-pack: justify;
391
+ justify-content: space-between;
392
+ -webkit-box-align: start;
393
+ align-items: flex-start;
394
+ flex-wrap: wrap;
395
+ margin: 2em 0;
396
+ }
397
+
398
+ figure img,
399
+ figure iframe,
400
+ figure .fluid-width-video-wrapper {
401
+ margin-bottom: 1em
402
+ }
403
+
404
+ figure img {
405
+ width: 100%;
406
+ border-radius: 4px;
407
+ -webkit-transition: all 0.2s ease-in-out;
408
+ transition: all 0.2s ease-in-out
409
+ }
410
+
411
+ figure>a {
412
+ display: block
413
+ }
414
+
415
+ @media (min-width: 37.5em) {
416
+ figure.half > a,
417
+ figure.half > img {
418
+ width: calc(50% - 0.5em)
419
+ }
420
+ }
421
+
422
+ figure.half figcaption {
423
+ width: 100%
424
+ }
425
+
426
+ @media (min-width: 37.5em) {
427
+ figure.third > a,
428
+ figure.third > img {
429
+ width: calc(33.3333% - 0.5em);
430
+ }
431
+ }
432
+
433
+ figure.third figcaption {
434
+ width: 100%
435
+ }
436
+
437
+ figcaption {
438
+ margin-bottom: 0.5em;
439
+ font-size: 1em;
440
+ }
441
+
442
+ figcaption a {
443
+ -webkit-transition:all 0.2s ease-in-out;
444
+ transition:all 0.2s ease-in-out
445
+ }
446
+
328
447
  p {
329
448
  margin-bottom: 1rem;
330
449
  }
331
450
 
332
- .row {
451
+ .row-grid {
333
452
  display: grid;
334
453
  grid-template-columns: 1fr 1fr;
335
454
  font-size: 20px;
@@ -339,6 +458,14 @@ p {
339
458
  }
340
459
  }
341
460
 
461
+ .row {
462
+ font-size: 20px;
463
+
464
+ * {
465
+ color: var(--color-dark);
466
+ }
467
+ }
468
+
342
469
  .next {
343
470
  text-align: right;
344
471
  }
@@ -354,8 +481,12 @@ p {
354
481
  }
355
482
 
356
483
  .text-secondary {
484
+ min-height: 28px;
357
485
  font-weight: 700;
358
486
  margin-bottom: 8px !important;
487
+ display: flex;
488
+ align-items: center;
489
+ gap: 12px;
359
490
  }
360
491
 
361
492
  .text-justify {
@@ -368,6 +499,7 @@ p {
368
499
 
369
500
  code {
370
501
  font-size: .9em;
502
+ font-family: 'Fira Code', monospace;
371
503
  color: var(--color-code);
372
504
  word-wrap: break-word;
373
505
  }
@@ -379,7 +511,7 @@ blockquote {
379
511
  border-bottom: 1px solid #F39237;
380
512
  font-style: italic;
381
513
  font-weight: 700;
382
- font-size: 1.5rem;
514
+ font-size: 1.1rem;
383
515
  width: 85%;
384
516
  margin: 2rem auto;
385
517
  height: 80px;
@@ -391,20 +523,23 @@ blockquote p {
391
523
  margin-bottom: 0;
392
524
  }
393
525
 
526
+ .highlight {
527
+ margin: 1.3rem 0;
528
+ }
529
+
394
530
  .highlight pre {
395
531
  border-radius: 0.25rem;
396
532
  padding: 1rem 1rem;
397
- margin: 0.75rem 0;
398
533
  overflow: auto;
399
- white-space: pre-wrap;
400
534
  background-color: var(--color-code-bg) !important;
535
+ white-space: pre-wrap;
536
+ min-width: 100%;
401
537
  }
402
538
 
403
539
  .highlight pre button {
404
540
  position: absolute;
405
541
  top: 0.5rem;
406
542
  right: 0.5rem;
407
- color: var(--color-bg);
408
543
  background: none;
409
544
  border: none;
410
545
  cursor: pointer;
@@ -413,6 +548,7 @@ blockquote p {
413
548
 
414
549
  ul {
415
550
  list-style: none;
551
+ padding-bottom: 1rem;
416
552
  }
417
553
 
418
554
  .archive-group th {
@@ -522,6 +658,57 @@ svg {
522
658
  }
523
659
  }
524
660
 
661
+ .warning-container {
662
+ position: relative;
663
+ }
664
+
665
+ .warning-badge {
666
+ display: flex;
667
+ align-items: center;
668
+ gap: 4px;
669
+ background-color: #fff3cd;
670
+ color: #856404;
671
+ padding: 4px 8px;
672
+ border: 1px solid #ffeaa7;
673
+ border-radius: 4px;
674
+ font-size: 12px;
675
+ font-weight: 500;
676
+ transition: all 0.3s ease;
677
+ width: auto;
678
+ min-width: fit-content;
679
+ }
680
+
681
+ .warning-icon {
682
+ display: block;
683
+ width: 12px;
684
+ height: 12px;
685
+ background-color: #ffc107;
686
+ border-radius: 50%;
687
+ position: relative;
688
+ flex-shrink: 0;
689
+ }
690
+
691
+ .warning-icon::before {
692
+ content: "!";
693
+ position: absolute;
694
+ top: 50%;
695
+ left: 50%;
696
+ transform: translate(-50%, -50%);
697
+ color: white;
698
+ font-size: 9px;
699
+ font-weight: bold;
700
+ }
701
+
702
+ .warning-text {
703
+ position: relative;
704
+ white-space: nowrap;
705
+ }
706
+
707
+ .warning-badge:hover .warning-text::after {
708
+ opacity: 1;
709
+ width: auto;
710
+ }
711
+
525
712
  .chevron {
526
713
  color: var(--color-primary);
527
714
  border-style: solid;
@@ -650,6 +837,7 @@ svg {
650
837
  font-size: 16px;
651
838
  line-height: 30px;
652
839
  padding: 0.2em;
840
+ font-family: var(--font-main);
653
841
  }
654
842
 
655
843
  @media screen and (max-width: 949px) {
@@ -677,6 +865,9 @@ svg {
677
865
  text-align: center;
678
866
  padding: 0.5rem 0;
679
867
  border-bottom: 1px solid #ccc;
868
+ a {
869
+ display: block;
870
+ }
680
871
  }
681
872
 
682
873
  .main-wrapper {
@@ -739,3 +930,4 @@ svg {
739
930
  scroll-behavior: auto !important;
740
931
  }
741
932
  }
933
+
Binary file
Binary file
Binary file
Binary file
data/assets/js/main.js CHANGED
@@ -1,4 +1,4 @@
1
- const copyButtonSVG = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">
1
+ const copyButtonSVG = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#FAFAFA" class="bi bi-copy" viewBox="0 0 16 16">
2
2
  <path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"/>
3
3
  </svg>`;
4
4
 
@@ -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.3
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-23 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