Skip to content

Commit 9e9d7e2

Browse files
authored
Bump version to 1.2.2, update footer logo, refine tag navigation, and… (#51)
* Bump version to 1.2.2, update footer logo, refine tag navigation, and enhance TOC styles * Add social share buttons and back-to-top functionality; update styles and layout --------- Signed-off-by: Nicolás Georger <[email protected]>
1 parent 33fd54f commit 9e9d7e2

File tree

11 files changed

+142
-20
lines changed

11 files changed

+142
-20
lines changed

assets/built/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/tocbot.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/screen.css

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ article:hover {
107107
/* Paragraph */
108108
section p,
109109
p {
110-
margin-bottom: 1.5rem;
110+
margin-bottom: 0.1rem;
111111
/* Optional margin for spacing */
112112
}
113113

@@ -147,23 +147,22 @@ p {
147147
}
148148

149149
#content h1 {
150-
@apply mb-2 text-4xl;
150+
@apply text-4xl;
151151
font-weight: 500;
152152
line-height: 2;
153153
text-align: center;
154154

155155
}
156156

157157
#content h2 {
158-
@apply mb-2 text-2xl;
158+
@apply text-3xl;
159159
font-weight: 500;
160-
line-height: 1, 5;
160+
line-height: 1.5;
161161
text-align: left;
162-
margin-top: 1.5rem;
163162
}
164163

165164
#content h3 {
166-
@apply text-xl;
165+
@apply text-2xl;
167166
font-weight: 400;
168167
line-height: 1.5;
169168
text-align: left;

assets/css/tocbot.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
.gh-toc .is-active-link::before {
3737
/* background-color: var(--ghost-accent-color); */
38-
@apply bg-dark;
38+
@apply bg-light;
3939
/* Defines TOC accent color based on Accent color set in Ghost Admin */
4040
}
4141

@@ -78,20 +78,20 @@ a.toc-link {
7878
}
7979

8080
.is-active-link {
81-
font-weight: 700
81+
font-weight: 600
8282
}
8383

8484
.toc-link::before {
85-
background-color: #EEE;
85+
@apply bg-dark;
8686
content: ' ';
8787
display: inline-block;
8888
height: inherit;
8989
left: 0;
9090
margin-top: -1px;
9191
position: absolute;
92-
width: 2px
92+
width: 1px
9393
}
9494

9595
.is-active-link::before {
96-
background-color: #54BC4B
96+
@apply bg-lighter
9797
}

assets/js/main.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,29 @@ document.addEventListener("keydown", function (e) {
119119
];
120120
reframe(document.querySelectorAll(sources.join(',')));
121121
})();
122+
123+
124+
// Back to top button
125+
126+
(function () {
127+
const backToTopButton = document.getElementById('back-to-top');
128+
129+
function scrollFunction() {
130+
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
131+
backToTopButton.classList.remove('hidden');
132+
} else {
133+
backToTopButton.classList.add('hidden');
134+
}
135+
}
136+
137+
window.onscroll = function () {
138+
scrollFunction();
139+
};
140+
141+
backToTopButton.onclick = function () {
142+
window.scrollTo({
143+
top: 0,
144+
behavior: "smooth"
145+
});
146+
};
147+
})();

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "sredevopsorg-ghost-theme",
33
"description": "Ghost v5 Theme made for SREDevOps.org (https://sredevops.org) based on Tailwind CSS v3, responsive, dark color schema, SVG icons, sidebar + footer navgation, customized tags and recommendations pages.",
44
"demo": "https://sredevops.org",
5-
"version": "1.2.2",
5+
"version": "1.2.3",
66
"engines": {
77
"ghost": ">=5.0.0"
88
},
@@ -70,6 +70,12 @@
7070
"default": false,
7171
"description": "Enable lazy loading for images",
7272
"group": "homepage"
73+
},
74+
"share_buttons": {
75+
"type": "boolean",
76+
"default": true,
77+
"description": "Enable share buttons on posts",
78+
"group": "post"
7379
}
7480
},
7581
"image_sizes": {

partials/components/footer.hbs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,17 @@
2828
{{navigation type="secondary"}}
2929
</nav>
3030
</section>
31+
<!-- Back to top -->
32+
<div id="back-to-top"
33+
class="fixed bottom-4 right-4 bg-highlight hover:bg-dark text-white font-bold py-2 px-4 rounded-full shadow-lg cursor-pointer transition-colors duration-300 hidden">
34+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
35+
stroke-linecap="round" stroke-linejoin="round" class="w-6 h-6">
36+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
37+
<polyline points="7 10 12 5 17 10"></polyline>
38+
<line x1="12" y1="5" x2="12" y2="19"></line>
39+
</svg>
40+
<span class="sr-only">Back to Top</span>
41+
</div>
42+
43+
3144
</footer>

partials/icons.hbs

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
<path d="M6 15v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1" />
4343
<line x1="12" y1="9" x2="12" y2="12" />
4444
</symbol>
45-
<symbol id="icon-linkedin" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
45+
<symbol id="icon-linkedin" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" class="size-6" stroke-width="1" stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-linejoin="round">
4646
<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" /> <rect x="2" y="9" width="4" height="12" /> <circle cx="4" cy="4" r="2" />
4747
</symbol>
4848
<!-- Mastodon Icon -->
49-
<symbol id="icon-mastodon" viewBox="0 0 24 24">
50-
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
49+
<symbol id="icon-mastodon" viewBox="0 0 448 512" fill="currentColor">
50+
<path d="M433 179.1c0-97.2-63.7-125.7-63.7-125.7-62.5-28.7-228.6-28.4-290.5 0 0 0-63.7 28.5-63.7 125.7 0 115.7-6.6 259.4 105.6 289.1 40.5 10.7 75.3 13 103.3 11.4 50.8-2.8 79.3-18.1 79.3-18.1l-1.7-36.9s-36.3 11.4-77.1 10.1c-40.4-1.4-83-4.4-89.6-54a102.5 102.5 0 0 1 -.9-13.9c85.6 20.9 158.7 9.1 178.8 6.7 56.1-6.7 105-41.3 111.2-72.9 9.8-49.8 9-121.5 9-121.5zm-75.1 125.2h-46.6v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.3V197c0-58.5-64-56.6-64-6.9v114.2H90.2c0-122.1-5.2-147.9 18.4-175 25.9-28.9 79.8-30.8 103.8 6.1l11.6 19.5 11.6-19.5c24.1-37.1 78.1-34.8 103.8-6.1 23.7 27.3 18.4 53 18.4 175z" />
5151
</symbol>
5252

5353
<!-- Google Icon -->
@@ -56,7 +56,7 @@
5656
</symbol>
5757

5858
<!-- X (formerly Twitter) Icon -->
59-
<symbol id="icon-x" viewBox="0 0 24 24">
59+
<symbol id="icon-x" viewBox="0 0 24 24" fill="currentColor">
6060
<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53A4.48 4.48 0 0 0 22.43 2a9.05 9.05 0 0 1-2.88 1.1A4.52 4.52 0 0 0 16.5 1c-2.5 0-4.5 2-4.5 4.5 0 .35.04.7.1 1.03A12.94 12.94 0 0 1 1.64 2.1a4.48 4.48 0 0 0-.61 2.27c0 1.56.8 2.93 2.02 3.73A4.48 4.48 0 0 1 .96 7v.05c0 2.18 1.55 4 3.6 4.42a4.52 4.52 0 0 1-2.04.08 4.52 4.52 0 0 0 4.22 3.13A9.05 9.05 0 0 1 1 18.58a12.94 12.94 0 0 0 7 2.05c8.4 0 13-7 13-13 0-.2 0-.42-.02-.63A9.35 9.35 0 0 0 23 3z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
6161
</symbol>
6262

@@ -121,6 +121,30 @@
121121
<line x1="21" y1="21" x2="16.65" y2="16.65" />
122122
</symbol>
123123

124+
<!-- Reddit Icon -->
125+
<symbol id="icon-reddit" viewBox="0 0 512 512" fill="currentColor">
126+
<path
127+
d="M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z" />
128+
</symbol>
129+
130+
<!-- YouTube Icon -->
131+
<symbol id="icon-youtube" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
132+
stroke-linejoin="round">
133+
<path d="M22.54 6.42A2.99 2.99 0 0 0 20.12 4c-2.83-.16-7.09-.16-9.95 0A2.99 2.99 0 0 0 1.46 6.42C1.3 8.25 1.3 11.75 1.46 13.58a2.99 2.99 0 0 0 2.42 2.42c2.83.16 7.09.16 9.95 0a2.99 2.99 0 0 0 2.42-2.42c.16-1.83.16-5.33-.16-7.16zM10 15V9l5 .5L10 15z" />
134+
</symbol>
135+
136+
<!-- Facebook Icon -->
137+
<symbol id="icon-facebook" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="1" stroke-linecap="round"
138+
stroke-linejoin="round">
139+
<path d="M22.675 0H1.325A1.325 1.325 0 0 0 0 1.325v21.35A1.325 1.325 0 0 0 1.325 24h11.49v-9.294H9.691V11h3.123V8.413c0-3.09 1.84-4.788 4.54-4.788 1.293 0 2.408.096 2.731.139v3h-1.87c-1.465 0-1.747.694-1.747 1.71V11h3l-.391 3H15v9h7.675A1.325 1.325 0 0 0 24 22.675V1.325A1.325 1.325 0 0 0 22.675 0z" />
140+
</symbol>
141+
142+
<!-- Whatsapp Icon -->
143+
<symbol id="icon-whatsapp" viewBox="0 0 32 32" fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
144+
stroke-linejoin="round">
145+
<path d="M 27.207143,4.65 C 24.214286,1.65 20.228571,0 15.992857,0 7.25,0 0.13571429,7.114286 0.13571429,15.857143 0.13571429,18.65 0.86428571,21.378571 2.25,23.785714 L 0,32 8.4071429,29.792857 c 2.3142861,1.264286 4.9214281,1.928572 7.5785711,1.928572 h 0.0071 C 24.728571,31.721429 32,24.607143 32,15.864286 32,11.628571 30.2,7.65 27.207143,4.65 Z M 15.992857,29.05 C 13.621429,29.05 11.3,28.414286 9.2785714,27.214286 L 8.8,26.928571 l -4.9857143,1.307143 1.3285714,-4.864285 -0.3142857,-0.5 C 3.5071429,20.771429 2.8142857,18.35 2.8142857,15.857143 2.8142857,8.592857 8.7285714,2.678571 16,2.678571 c 3.521429,0 6.828571,1.371429 9.314286,3.864286 2.485714,2.492857 4.014285,5.8 4.007143,9.321429 0,7.271428 -6.064286,13.185714 -13.328572,13.185714 z m 7.228572,-9.871429 c -0.392858,-0.2 -2.342858,-1.157142 -2.707143,-1.285714 -0.364286,-0.135714 -0.628572,-0.2 -0.892857,0.2 C 19.357143,18.492857 18.6,19.378571 18.364286,19.65 18.135714,19.914286 17.9,19.95 17.507143,19.75 15.178571,18.585714 13.65,17.671429 12.114286,15.035714 c -0.407143,-0.7 0.407143,-0.65 1.164285,-2.164285 0.128572,-0.264286 0.06429,-0.492858 -0.03571,-0.692858 -0.1,-0.2 -0.892857,-2.15 -1.221428,-2.942857 -0.321429,-0.771428 -0.65,-0.664285 -0.892858,-0.678571 -0.228571,-0.01429 -0.492857,-0.01429 -0.757142,-0.01429 -0.264286,0 -0.6928576,0.1 -1.0571433,0.492857 -0.3642857,0.4 -1.3857143,1.357143 -1.3857143,3.307143 0,1.95 1.4214286,3.835714 1.6142857,4.1 0.2,0.264286 2.7928569,4.264286 6.7714289,5.985714 2.514285,1.085715 3.5,1.178572 4.757143,0.992858 0.764285,-0.114286 2.342857,-0.957143 2.671428,-1.885715 0.328572,-0.928571 0.328572,-1.721428 0.228572,-1.885714 -0.09286,-0.178571 -0.357143,-0.278571 -0.75,-0.471429 z" />
146+
</symbol>
147+
124148

125149
</svg>
126150
<!-- End Icons SVG -->

0 commit comments

Comments
 (0)