awesome-jekyll-theme 0.2.0 → 0.2.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: 3ab076a5da391e511bf7ebe46d524a8b813d049986c128b6b48acdd0e94649c2
4
- data.tar.gz: 79585bc48f6330c4f32974cf611f6e6d28daa39f16cd768914abe66b3be0654f
3
+ metadata.gz: 29214929f1e545c15094e3acbcd753f5b6e478426caee98981f7fc2d71520197
4
+ data.tar.gz: 7188655771ea95645968e25fbf14d7b05b05ba1dc8c044f41f289662f04b6edb
5
5
  SHA512:
6
- metadata.gz: 1782db45f1bbc9b80fc6fc0744b88666da934d34a06613926437a282aa9c7797e10e7ff355aa67afe5dd5f0088b0af5d8795d8f96cf61625c4e223e9f8632491
7
- data.tar.gz: 87f563432395c64692c4aeea46956dc2fce2978cc3336b35a037b06c7cd79ca7d6fcd369eafb7ce4d74762c528f4cede8db1dce89daef640514e011acb1e4e54
6
+ metadata.gz: bb9cd39bdc029afed688e854918ee632a7db24416ccee8ab018445f8711dd31d66baa34b43026e5ae3df8c181b684404f890b9102b719936858fe720fcddb3f8
7
+ data.tar.gz: 1c1fc4665fcbff92bcd79d67e6cb03b0ff66e055c16058ccc98e5c7e447e70332c1d4a18a0abbe6230e2b5b0fc9facfd690f6185a2328437b2c6e47e9426d3bc
@@ -2,7 +2,7 @@
2
2
  <div class="flex flex-col justify-between max-w-lg">
3
3
  <a href="{{include.post.url | relative_url}}" aria-label="Post Url">
4
4
  <div class="hover:opacity-90 transition duration-300 w-full h-60 bg-cover bg-center"
5
- style="background-image: url('{{post.image}}')">
5
+ style="background-image: url('{{ post.image | default: 'https://picsum.photos/600/400/?blur' }}')">
6
6
  </div>
7
7
  </a>
8
8
  <div class="pt-6">
data/_layouts/home.html CHANGED
@@ -2,18 +2,23 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
- <section id="main" class="flex flex-col md:flex-row items-center justify-center py-16 md:h-screen border-b-2">
5
+ <section
6
+ id="main"
7
+ class="flex flex-col md:flex-row items-center justify-center py-16 md:h-screen border-b-2"
8
+ >
6
9
  <div class="md:mx-2">
7
- <img class="object-cover w-full h-full sm:w-80 sm:h-80 sm:rounded-full" src="{{ page.image | relative_url }}"
8
- alt="{{ page.description }}">
10
+ <img
11
+ class="object-cover w-full h-full sm:w-80 sm:h-80 sm:rounded-full"
12
+ src="{{ page.image | relative_url | default: 'https://ik.imagekit.io/ikmedia/avif_samples/photo3_avif_6O32dW2NT.png' }}"
13
+ alt="{{ page.description }}"
14
+ />
9
15
  </div>
10
16
  <div class="fadeIn mx-4 w-4/5 md:w-2/5 text-center md:text-left mt-6 md:mt-0">
11
- <div class="prose prose-h1:mb-1">
12
- {{ page.main_content | markdownify }}
13
- </div>
17
+ <div class="prose prose-h1:mb-1">{{ page.main_content | markdownify }}</div>
14
18
 
15
- <p class="mt-4 ">
16
- {{ site.data[site.active_lang].strings.home.contact_me | default: site.data['en'].strings.home.contact_me}}
19
+ <p class="mt-4">
20
+ {{ site.data[site.active_lang].strings.home.contact_me | default:
21
+ site.data['en'].strings.home.contact_me}}
17
22
  </p>
18
23
 
19
24
  {%include contact_channels.html %}
@@ -21,109 +26,139 @@ layout: default
21
26
  </section>
22
27
 
23
28
  {% if site.posts.size > 0 %}
24
- <section id="blog" class="container mx-auto flex flex-col items-center justify-center min-h-screen">
29
+ <section
30
+ id="blog"
31
+ class="container mx-auto flex flex-col items-center justify-center min-h-screen"
32
+ >
25
33
  <div class="py-16">
26
34
  <h2 class="text-3xl font-bold text-center md:text-left">
27
35
  {{ site.data[site.active_lang].strings.home.blog_title | default:
28
36
  site.data['en'].strings.home.blog_title}}
29
37
  </h2>
30
- <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-x-12 gap-y-16 py-8 md:py-16">
31
- {% for post in site.posts limit:3 %}
32
- {% include post_card.html post=post %}
33
- {% endfor %}
38
+ <div
39
+ class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-x-12 gap-y-16 py-8 md:py-16"
40
+ >
41
+ {% for post in site.posts limit:3 %} {% include post_card.html post=post
42
+ %} {% endfor %}
34
43
  </div>
44
+
45
+ {% assign blog_page = site.pages | where: 'layout', 'blog' | where_exp:
46
+ 'page', "page.path contains '/category/'" | first %} {% if blog_page %}
35
47
  <div class="pt-4 text-center">
36
- <a class="font-mulish text-lg hover:text-sky-400 hover:underline font-bold" href="{{'/blog' | relative_url }}">
48
+ <a
49
+ class="font-mulish text-lg hover:text-sky-400 hover:underline font-bold"
50
+ href="{{ blog_page.url | relative_url }}"
51
+ >
37
52
  {{ site.data[site.active_lang].strings.home.see_more_posts | default:
38
53
  site.data['en'].strings.home.see_more_posts}}
39
54
  </a>
40
55
  </div>
56
+ {% endif %}
41
57
  </div>
42
58
  </section>
43
- {% endif %}
44
-
45
-
46
- {% if site.projects.size > 0 %}
47
- <section id="projects" class="container mx-auto flex flex-col items-center justify-center min-h-screen">
59
+ {% endif %} {% if site.projects.size > 0 %}
60
+ <section
61
+ id="projects"
62
+ class="container mx-auto flex flex-col items-center justify-center min-h-screen"
63
+ >
48
64
  <div class="py-16">
49
65
  <h2 class="text-3xl font-bold text-center md:text-left">
50
66
  {{ site.data[site.active_lang].strings.home.projects_title | default:
51
67
  site.data['en'].strings.home.projects_title}}
52
68
  </h2>
53
69
  <div class="grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-16 py-8 md:py-16">
54
- {% for project in site.projects limit:2 %}
55
- {% include project_card.html project=project%}
56
- {% endfor %}
70
+ {% for project in site.projects limit:2 %} {% include project_card.html
71
+ project=project%} {% endfor %}
57
72
  </div>
58
- <div class="pt-4 text-center ">
59
- <a class="font-mulish text-lg hover:text-sky-400 hover:underline font-bold"
60
- href="{{'/projects' | relative_url }}">
73
+ <div class="pt-4 text-center">
74
+ <a
75
+ class="font-mulish text-lg hover:text-sky-400 hover:underline font-bold"
76
+ href="{{'/projects' | relative_url }}"
77
+ >
61
78
  {{ site.data[site.active_lang].strings.home.see_more_projects | default:
62
79
  site.data['en'].strings.home.see_more_projects }}
63
80
  </a>
64
81
  </div>
65
82
  </div>
66
83
  </section>
67
- {% endif %}
68
-
69
- <section id="content" class="container mx-auto flex flex-col items-center justify-center min-h-screen">
70
- <article class="prose mx-auto py-16">
71
- {{content}}
72
- </article>
84
+ {% endif %} {% assign trimmed_content = content | strip | replace: "\n", "" |
85
+ replace: "\r", "" | replace: "\t", "" %} {% if trimmed_content != "" %}
86
+ <section
87
+ id="content"
88
+ class="container mx-auto flex flex-col items-center justify-center min-h-screen"
89
+ >
90
+ <article class="prose mx-auto py-16">{{content}}</article>
73
91
  </section>
92
+ {% endif %}
74
93
 
75
- <div id="dot-nav" class="fixed left-0 top-1/2 transform -translate-y-1/2 space-y-4 bg-white/80 rounded-r-lg p-4">
76
- <a href="#main" aria-label="Jump to main section"
77
- class="dot w-3 h-3 block rounded-full border-2 border-gray-800 bg-gray-800 hover:scale-125"></a>
94
+ <div
95
+ id="dot-nav"
96
+ class="fixed left-0 top-1/2 transform -translate-y-1/2 space-y-4 bg-white/80 rounded-r-lg p-4"
97
+ >
98
+ <a
99
+ href="#main"
100
+ aria-label="Jump to main section"
101
+ class="dot w-3 h-3 block rounded-full border-2 border-gray-800 bg-gray-800 hover:scale-125"
102
+ ></a>
78
103
  {% if site.posts.size > 0 %}
79
- <a href="#blog" aria-label="Jump to blog section"
80
- class="dot w-3 h-3 block rounded-full border-2 border-gray-800 hover:scale-125"></a>
81
- {% endif %}
82
- {% if site.projects.size > 0 %}
83
- <a href="#projects" aria-label="Jump to projects section"
84
- class="dot w-3 h-3 block rounded-full border-2 border-gray-800 hover:scale-125"></a>
104
+ <a
105
+ href="#blog"
106
+ aria-label="Jump to blog section"
107
+ class="dot w-3 h-3 block rounded-full border-2 border-gray-800 hover:scale-125"
108
+ ></a>
109
+ {% endif %} {% if site.projects.size > 0 %}
110
+ <a
111
+ href="#projects"
112
+ aria-label="Jump to projects section"
113
+ class="dot w-3 h-3 block rounded-full border-2 border-gray-800 hover:scale-125"
114
+ ></a>
115
+ {% endif %} {% if trimmed_content != "" %}
116
+ <a
117
+ href="#content"
118
+ aria-label="Jump to content section"
119
+ class="dot w-3 h-3 block rounded-full border-2 border-gray-800 hover:scale-125"
120
+ ></a>
85
121
  {% endif %}
86
- <a href="#content" aria-label="Jump to content section"
87
- class="dot w-3 h-3 block rounded-full border-2 border-gray-800 hover:scale-125"></a>
88
122
  </div>
89
123
 
90
124
  <script>
91
- document.addEventListener('DOMContentLoaded', function () {
92
- const sections = document.querySelectorAll('section');
93
- const navDots = document.querySelectorAll('#dot-nav .dot');
125
+ document.addEventListener("DOMContentLoaded", function () {
126
+ const sections = document.querySelectorAll("section");
127
+ const navDots = document.querySelectorAll("#dot-nav .dot");
94
128
 
95
129
  function onScroll() {
96
- let currentSection = '';
130
+ let currentSection = "";
97
131
 
98
- sections.forEach(section => {
132
+ sections.forEach((section) => {
99
133
  const sectionTop = section.offsetTop;
100
- if (pageYOffset >= sectionTop - 120) { // Ajusta el valor según sea necesario
101
- currentSection = section.getAttribute('id');
134
+ if (pageYOffset >= sectionTop - 120) {
135
+ // Ajusta el valor según sea necesario
136
+ currentSection = section.getAttribute("id");
102
137
  }
103
138
  });
104
139
 
105
- navDots.forEach(dot => {
106
- dot.classList.remove('bg-gray-800');
107
- if (dot.getAttribute('href') === `#${currentSection}`) {
108
- dot.classList.add('bg-gray-800');
140
+ navDots.forEach((dot) => {
141
+ dot.classList.remove("bg-gray-800");
142
+ if (dot.getAttribute("href") === `#${currentSection}`) {
143
+ dot.classList.add("bg-gray-800");
109
144
  }
110
145
  });
111
146
  }
112
147
 
113
148
  function smoothScroll(target) {
114
149
  document.querySelector(target).scrollIntoView({
115
- behavior: 'smooth'
150
+ behavior: "smooth",
116
151
  });
117
152
  }
118
153
 
119
- navDots.forEach(dot => {
120
- dot.addEventListener('click', function (event) {
154
+ navDots.forEach((dot) => {
155
+ dot.addEventListener("click", function (event) {
121
156
  event.preventDefault();
122
- const target = this.getAttribute('href');
157
+ const target = this.getAttribute("href");
123
158
  smoothScroll(target);
124
159
  });
125
160
  });
126
161
 
127
- window.addEventListener('scroll', onScroll);
162
+ window.addEventListener("scroll", onScroll);
128
163
  });
129
164
  </script>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - a-chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-30 00:00:00.000000000 Z
11
+ date: 2024-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll