Skip to content

Commit 4ef7a7e

Browse files
author
linuxjava7
committed
cool new button
1 parent 60d6e78 commit 4ef7a7e

File tree

2 files changed

+34
-32
lines changed

2 files changed

+34
-32
lines changed

content/index.njk

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,16 @@ const eleventyNavigation = {
5656
<p>Linux Desktop Environment</p>
5757
<p>GNOME is one of my main inspirations for UI and UX design, they do some really great stuff :)</p>
5858
<a class="btn dark" href="https://www.gnome.org/">
59-
<svg width="1rem" height="1rem" viewBox="0 0 100 120" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg">
60-
<path d="M 86.068,0 C 61.466,0 56.851,35.041 70.691,35.041 84.529,35.041 110.671,0 86.068,0 Z"></path>
61-
<path d="M 45.217,30.699 C 52.586,31.149 60.671,2.577 46.821,4.374 32.976,6.171 37.845,30.249 45.217,30.699 Z"></path>
62-
<path d="M 11.445,48.453 C 16.686,46.146 12.12,23.581 3.208,29.735 -5.7,35.89 6.204,50.759 11.445,48.453 Z"></path>
63-
<path d="M 26.212,36.642 C 32.451,35.37 32.793,9.778 21.667,14.369 10.539,18.961 19.978,37.916 26.212,36.642 Z"></path>
64-
<path d="m 58.791,93.913 c 1.107,8.454 -6.202,12.629 -13.36,7.179 C 22.644,83.743 83.16,75.088 79.171,51.386 75.86,31.712 15.495,37.769 8.621,68.553 3.968,89.374 27.774,118.26 52.614,118.26 c 12.22,0 26.315,-11.034 28.952,-25.012 C 83.58,82.589 57.867,86.86 58.791,93.913 Z"></path>
65-
</svg>
66-
Visit GNOME
59+
<span class="front">
60+
<svg width="1rem" height="1rem" viewBox="0 0 100 120" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg">
61+
<path d="M 86.068,0 C 61.466,0 56.851,35.041 70.691,35.041 84.529,35.041 110.671,0 86.068,0 Z"></path>
62+
<path d="M 45.217,30.699 C 52.586,31.149 60.671,2.577 46.821,4.374 32.976,6.171 37.845,30.249 45.217,30.699 Z"></path>
63+
<path d="M 11.445,48.453 C 16.686,46.146 12.12,23.581 3.208,29.735 -5.7,35.89 6.204,50.759 11.445,48.453 Z"></path>
64+
<path d="M 26.212,36.642 C 32.451,35.37 32.793,9.778 21.667,14.369 10.539,18.961 19.978,37.916 26.212,36.642 Z"></path>
65+
<path d="m 58.791,93.913 c 1.107,8.454 -6.202,12.629 -13.36,7.179 C 22.644,83.743 83.16,75.088 79.171,51.386 75.86,31.712 15.495,37.769 8.621,68.553 3.968,89.374 27.774,118.26 52.614,118.26 c 12.22,0 26.315,-11.034 28.952,-25.012 C 83.58,82.589 57.867,86.86 58.791,93.913 Z"></path>
66+
</svg>
67+
Visit GNOME
68+
</span>
6769
</a>
6870
</div>
6971
</div>

css/index.css

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ header {
308308
/* Component Variables */
309309
--rounded-corner: 12px;
310310
--btnround: 500px;
311-
--btnsqr: 0.8rem;
311+
--btnsqr: 0.9rem;
312312

313313
/* Font Settings */
314314
font-family: Inter, sans-serif;
@@ -579,32 +579,32 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
579579

580580
/* Button styles for cards */
581581
.card .btn {
582-
max-width: 12rem;
583-
font-size: 80%;
584-
border-radius: var(--btnsqr);
585-
background-color: var(--accent-bg-color);
586-
color: var(--accent-fg-color);
587-
opacity: 1;
588-
font-weight: 600;
589-
font-variation-settings: "wght" 600;
590-
padding: 0.6rem 1.5rem;
591-
display: inline-block;
592-
align-items: center;
593-
gap: 0.5rem;
594-
text-decoration: none;
595-
transition: box-shadow 200ms var(--slickease);
596-
margin: 0.3rem;
582+
background: var(--view-switcher-accent);
597583
border: none;
598-
box-shadow: 0 0 0 0 var(--accent-bg-color);
599-
min-width: 4rem;
600-
vertical-align: middle;
601-
text-align: center;
602-
white-space: nowrap;
584+
cursor: pointer;
585+
outline-offset: 4px;
586+
border-radius: var(--btnsqr);
587+
max-width: fit-content;
603588
}
604589

605-
.card .btn:hover {
606-
box-shadow: 0 0 0 2px var(--accent-bg-color);
607-
text-decoration: none;
590+
.btn:hover .front {
591+
transform: translateY(-6px);
592+
}
593+
594+
.btn:active .front {
595+
transform: translateY(-2px);
596+
}
597+
598+
.front {
599+
font-size: 1.25rem;
600+
background: var(--accent-bg-color);
601+
color: white;
602+
transform: translateY(-4px);
603+
padding: 0.6rem 1.5rem;
604+
border-radius: var(--btnsqr);
605+
font-size: 80%;
606+
display: inline-table;
607+
transition: transform 200ms var(--slickease);
608608
}
609609

610610
.card .btn svg {

0 commit comments

Comments
 (0)