Skip to content

Commit 57dcf20

Browse files
author
LinuxJava7
committed
add icon to my-blog view switcher button and improve styling
1 parent ccbf824 commit 57dcf20

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

data/icons/go-home-symbolic.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<ul>
2929
<li>
3030
<a href="/" class="current" aria-current="page">
31-
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
31+
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
3232
<g fill="currentColor">
3333
<path d="m 12 16 c 1.660156 0 3 -1.339844 3 -3 v -6 c 0 -0.929688 -0.414062 -1.8125 -1.128906 -2.410156 l -4.460938 -3.71875 c -0.816406 -0.679688 -2.003906 -0.679688 -2.820312 0 l -4.460938 3.71875 c -0.714844 0.597656 -1.128906 1.480468 -1.128906 2.410156 v 6 c 0 1.660156 1.339844 3 3 3 z m -9 -3 v -6 c 0 -0.335938 0.148438 -0.65625 0.410156 -0.871094 l 4.460938 -3.71875 c 0.074218 -0.0625 0.183594 -0.0625 0.257812 0 l 4.460938 3.71875 c 0.261718 0.214844 0.410156 0.535156 0.410156 0.871094 v 6 c 0 0.546875 -0.453125 1 -1 1 h -8 c -0.546875 0 -1 -0.453125 -1 -1 z m 0 0"/>
3434
<path d="m 7 8 h 2 c 0.550781 0 1 0.449219 1 1 v 5 c 0 0.550781 -0.449219 1 -1 1 h -2 c -0.550781 0 -1 -0.449219 -1 -1 v -5 c 0 -0.550781 0.449219 -1 1 -1 z m 0 0"/>
@@ -40,6 +40,12 @@
4040
</li>
4141
<li>
4242
<a href="https://blog.linuxjava7.dev/">
43+
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
44+
<g fill="currentColor">
45+
<path d="m 4.199219 2 c -0.453125 0 -0.84375 0.300781 -0.964844 0.738281 l -3.234375 11.261719 h 2.066406 l 0.808594 -3 l 2.125 -0.003906 l 2.121094 0.003906 l 0.808594 3 h 2.070312 l -3.238281 -11.261719 c -0.117188 -0.4375 -0.511719 -0.738281 -0.960938 -0.738281 z m 0.785156 2 h 0.015625 h 0.011719 c 0.121093 -0.003906 0.238281 0.011719 0.289062 0.207031 l 1.320313 4.792969 h -3.242188 l 1.316406 -4.792969 c 0.054688 -0.195312 0.171876 -0.210937 0.289063 -0.207031 z m 0 0"/><path d="m 10 0 v 1 h 2 v 14 h -2 v 1 h 2.5 l 0.5 -0.5 l 0.5 0.5 h 2.5 v -1 h -2 v -14 h 2 v -1 h -2.5 l -0.5 0.5 l -0.5 -0.5 z m 0 0"/>
46+
</g>
47+
</svg>
48+
4349
My Blog
4450
</a>
4551
</li>

style.css

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
327327
display: flex;
328328
justify-content: center;
329329
padding: 0;
330+
height: 80%
330331
}
331332

332333
.view-switcher ul {
@@ -345,13 +346,14 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
345346
display: flex;
346347
align-items: center;
347348
justify-content: center;
348-
width: 7.25rem;
349-
height: 2rem;
349+
width: 8.25rem;
350+
height: 100%;
350351
color: var(--ctp-text);
351352
font-weight: bold;
352353
text-decoration: none;
353-
border-radius: 0.375rem;
354+
border-radius: 0.5rem;
354355
transition: background-color 0.2s ease, color 0.2s ease;
356+
gap: 6px;
355357
}
356358

357359
.view-switcher a:hover,
@@ -363,6 +365,11 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
363365
background-color: rgb(0 0 0 / 5%);
364366
}
365367

368+
.view-switcher svg {
369+
width: 1em;
370+
height: 1em;
371+
}
372+
366373
/* Footer */
367374
footer {
368375
background-color: rgb(var(--ctp-antibase));

0 commit comments

Comments
 (0)