Fun footer links hover effect, re-nest nav styles
This commit is contained in:
@ -21,30 +21,38 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: min(calc(var(--container-width) / 1.5), 100%);
|
||||
}
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
line-height: normal;
|
||||
list-style: none;
|
||||
}
|
||||
li {
|
||||
display: flex;
|
||||
line-height: normal;
|
||||
list-style: none;
|
||||
|
||||
a {
|
||||
transition: var(--transition);
|
||||
border-radius: 999px;
|
||||
padding: 0.5rem 0.75rem;
|
||||
color: var(--fg-muted-4);
|
||||
text-decoration: none;
|
||||
&:first-of-type a {
|
||||
border-radius: 1.125rem 0 0 1.125rem;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
box-shadow: var(--edge-highlight);
|
||||
background-color: var(--primary-color);
|
||||
color: var(--fg-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
&:last-of-type a {
|
||||
border-radius: 0 1.125rem 1.125rem 0;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(var(--active));
|
||||
a {
|
||||
transition: var(--transition);
|
||||
padding: 0.5rem 0.75rem;
|
||||
color: var(--fg-muted-4);
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
box-shadow: var(--edge-highlight);
|
||||
border-radius: 1.125rem;
|
||||
background-color: var(--primary-color);
|
||||
color: var(--fg-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(var(--active));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
340
sass/_nav.scss
340
sass/_nav.scss
@ -13,72 +13,6 @@
|
||||
nav {
|
||||
padding: 0.5rem;
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
line-height: normal;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
a,
|
||||
#dropdown summary {
|
||||
&:hover {
|
||||
box-shadow: var(--edge-highlight);
|
||||
background-color: var(--fg-muted-1);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(var(--active));
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
transition: var(--transition);
|
||||
border-radius: 999px;
|
||||
padding: 0.5rem 0.75rem;
|
||||
color: var(--fg-muted-4);
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
&::before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: -0.5rem;
|
||||
right: 1.5rem;
|
||||
left: 1.5rem;
|
||||
transition: var(--transition);
|
||||
border-bottom: 0.25rem solid var(--fg-muted-2);
|
||||
border-radius: 0 0 0.25rem 0.25rem;
|
||||
content: "";
|
||||
}
|
||||
|
||||
&:hover::before {
|
||||
right: 1rem;
|
||||
left: 1rem;
|
||||
border-bottom: 0.25rem solid var(--primary-color);
|
||||
}
|
||||
|
||||
&:active::before {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#main-content {
|
||||
position: absolute;
|
||||
transform: translateY(-100%);
|
||||
@ -94,124 +28,190 @@
|
||||
}
|
||||
}
|
||||
|
||||
#home {
|
||||
position: relative;
|
||||
margin-right: 0.625rem;
|
||||
ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
body[dir="rtl"] & {
|
||||
margin-right: unset;
|
||||
margin-left: 0.625rem;
|
||||
}
|
||||
li {
|
||||
display: flex;
|
||||
line-height: normal;
|
||||
list-style: none;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: -0.125rem;
|
||||
right: -0.5rem;
|
||||
background-color: var(--fg-muted-2);
|
||||
width: 1px;
|
||||
height: calc(100% + 0.25rem);
|
||||
content: "";
|
||||
&#home {
|
||||
position: relative;
|
||||
margin-right: 0.625rem;
|
||||
|
||||
body[dir="rtl"] & {
|
||||
right: unset;
|
||||
left: -0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--fg-muted-5);
|
||||
font-weight: 800;
|
||||
|
||||
&:hover {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#feed a,
|
||||
#dropdown summary {
|
||||
padding: 0.5rem 0.625rem;
|
||||
|
||||
&:hover .icon {
|
||||
background-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.icon {
|
||||
vertical-align: -0.125em;
|
||||
transition: var(--transition);
|
||||
background-color: var(--fg-muted-4);
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
span {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#feed .icon {
|
||||
$icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M1.988 1.988V3c.008.547.453.984 1 .988.004-.004.008-.004.012-.004v.028A8.977 8.977 0 0 1 11.988 13a.991.991 0 0 0 1 .984h1V13h-.004c0-.004 0-.004.004-.008C13.984 7.02 9.184 2.148 3.242 2.02A1.004 1.004 0 0 0 3 1.988v-.004zm0 4V7c.008.547.453.984 1 .988.004-.004.008-.004.012-.004V8a4.985 4.985 0 0 1 4.996 4.844 1.002 1.002 0 0 0 .988 1.145c.008-.005.012-.005.016-.005v.004h.984V13H10c0-3.793-3.047-6.898-6.82-6.992 0-.004-.004-.004-.004-.004A.892.892 0 0 0 3 5.988v-.004zm2 4a1.999 1.999 0 1 0-.002 3.998 1.999 1.999 0 0 0 .002-3.998m0 0'%3E%3C/path%3E%3C/svg%3E");
|
||||
-webkit-mask-image: $icon;
|
||||
mask-image: $icon;
|
||||
}
|
||||
|
||||
#dropdown {
|
||||
details {
|
||||
position: relative;
|
||||
border-radius: unset;
|
||||
background-color: unset;
|
||||
padding: 0;
|
||||
|
||||
summary {
|
||||
transition: var(--transition);
|
||||
border-radius: 999px;
|
||||
background-color: unset;
|
||||
color: var(--fg-muted-4);
|
||||
list-style: none;
|
||||
|
||||
&::marker,
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
body[dir="rtl"] & {
|
||||
margin-right: unset;
|
||||
margin-left: 0.625rem;
|
||||
}
|
||||
|
||||
.icon {
|
||||
$icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M3.98 1v3H1v2h2.947a4.8 4.8 0 0 1-.592 1.871c-.425.758-1.101 1.488-2.062 2.45l1.414 1.413c.92-.92 1.703-1.728 2.283-2.697.38.632.844 1.196 1.377 1.768l.668-2.309a6 6 0 0 1-.41-.625A4.75 4.75 0 0 1 6.033 6h1.53l.511-2H6V1zm5.24 1L6 15h2l.781-3h4.438L14 15h2L12.781 2zm1.562 2h.438l1.5 6H9.28z'/%3E%3C/svg%3E");
|
||||
-webkit-mask-image: $icon;
|
||||
mask-image: $icon;
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: -0.125rem;
|
||||
right: -0.5rem;
|
||||
background-color: var(--fg-muted-2);
|
||||
width: 1px;
|
||||
height: calc(100% + 0.25rem);
|
||||
content: "";
|
||||
|
||||
body[dir="rtl"] & {
|
||||
right: unset;
|
||||
left: -0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[open] ul {
|
||||
animation: open var(--transition);
|
||||
a {
|
||||
color: var(--fg-muted-5);
|
||||
font-weight: 800;
|
||||
|
||||
@keyframes open {
|
||||
from {
|
||||
transform: translate(-50%, 0);
|
||||
opacity: 0;
|
||||
&:hover {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
-webkit-backdrop-filter: var(--blur);
|
||||
text-wrap: nowrap;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 1rem);
|
||||
z-index: 1;
|
||||
backdrop-filter: var(--blur);
|
||||
box-shadow: var(--edge-highlight), 0px 12px 24px -16px rgba(0, 0, 0, 0.5);
|
||||
border-radius: calc(var(--rounded-corner) + 0.25rem);
|
||||
background-color: var(--nav-bg);
|
||||
padding: 0.25rem;
|
||||
a,
|
||||
&#dropdown summary {
|
||||
&:hover {
|
||||
box-shadow: var(--edge-highlight);
|
||||
background-color: var(--fg-muted-1);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
&:active {
|
||||
transform: scale(var(--active));
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
border-radius: var(--rounded-corner);
|
||||
width: 100%;
|
||||
a {
|
||||
position: relative;
|
||||
transition: var(--transition);
|
||||
border-radius: 999px;
|
||||
padding: 0.5rem 0.75rem;
|
||||
color: var(--fg-muted-4);
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
&::before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: -0.5rem;
|
||||
right: 1.5rem;
|
||||
left: 1.5rem;
|
||||
transition: var(--transition);
|
||||
border-bottom: 0.25rem solid var(--fg-muted-2);
|
||||
border-radius: 0 0 0.25rem 0.25rem;
|
||||
content: "";
|
||||
}
|
||||
|
||||
&:hover::before {
|
||||
right: 1rem;
|
||||
left: 1rem;
|
||||
border-bottom: 0.25rem solid var(--primary-color);
|
||||
}
|
||||
|
||||
&:active::before {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&#feed a,
|
||||
&#dropdown summary {
|
||||
padding: 0.5rem 0.625rem;
|
||||
|
||||
&:hover .icon {
|
||||
background-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.icon {
|
||||
vertical-align: -0.125em;
|
||||
transition: var(--transition);
|
||||
background-color: var(--fg-muted-4);
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
span {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&#feed .icon {
|
||||
$icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M1.988 1.988V3c.008.547.453.984 1 .988.004-.004.008-.004.012-.004v.028A8.977 8.977 0 0 1 11.988 13a.991.991 0 0 0 1 .984h1V13h-.004c0-.004 0-.004.004-.008C13.984 7.02 9.184 2.148 3.242 2.02A1.004 1.004 0 0 0 3 1.988v-.004zm0 4V7c.008.547.453.984 1 .988.004-.004.008-.004.012-.004V8a4.985 4.985 0 0 1 4.996 4.844 1.002 1.002 0 0 0 .988 1.145c.008-.005.012-.005.016-.005v.004h.984V13H10c0-3.793-3.047-6.898-6.82-6.992 0-.004-.004-.004-.004-.004A.892.892 0 0 0 3 5.988v-.004zm2 4a1.999 1.999 0 1 0-.002 3.998 1.999 1.999 0 0 0 .002-3.998m0 0'%3E%3C/path%3E%3C/svg%3E");
|
||||
-webkit-mask-image: $icon;
|
||||
mask-image: $icon;
|
||||
}
|
||||
|
||||
&#dropdown {
|
||||
details {
|
||||
position: relative;
|
||||
border-radius: unset;
|
||||
background-color: unset;
|
||||
padding: 0;
|
||||
|
||||
summary {
|
||||
transition: var(--transition);
|
||||
border-radius: 999px;
|
||||
background-color: unset;
|
||||
color: var(--fg-muted-4);
|
||||
list-style: none;
|
||||
|
||||
&::marker,
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.icon {
|
||||
$icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M3.98 1v3H1v2h2.947a4.8 4.8 0 0 1-.592 1.871c-.425.758-1.101 1.488-2.062 2.45l1.414 1.413c.92-.92 1.703-1.728 2.283-2.697.38.632.844 1.196 1.377 1.768l.668-2.309a6 6 0 0 1-.41-.625A4.75 4.75 0 0 1 6.033 6h1.53l.511-2H6V1zm5.24 1L6 15h2l.781-3h4.438L14 15h2L12.781 2zm1.562 2h.438l1.5 6H9.28z'/%3E%3C/svg%3E");
|
||||
-webkit-mask-image: $icon;
|
||||
mask-image: $icon;
|
||||
}
|
||||
}
|
||||
|
||||
&[open] ul {
|
||||
animation: open var(--transition);
|
||||
|
||||
@keyframes open {
|
||||
from {
|
||||
transform: translate(-50%, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
-webkit-backdrop-filter: var(--blur);
|
||||
text-wrap: nowrap;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 1rem);
|
||||
z-index: 1;
|
||||
backdrop-filter: var(--blur);
|
||||
box-shadow: var(--edge-highlight), 0px 12px 24px -16px rgba(0, 0, 0, 0.5);
|
||||
border-radius: calc(var(--rounded-corner) + 0.25rem);
|
||||
background-color: var(--nav-bg);
|
||||
padding: 0.25rem;
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
a {
|
||||
border-radius: var(--rounded-corner);
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user