mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-20 01:55:26 -05:00
Design refresh + a bunch of stuff (#2864)
Co-authored-by: hfcRed <hfcred@gmx.net>
This commit is contained in:
299
app/components/SideNav.module.css
Normal file
299
app/components/SideNav.module.css
Normal file
@@ -0,0 +1,299 @@
|
||||
.sideNav {
|
||||
background-color: var(--color-bg-nav);
|
||||
min-width: var(--layout-sidenav-width);
|
||||
max-width: var(--layout-sidenav-width);
|
||||
border-right: 1.5px solid var(--color-border);
|
||||
overflow: hidden;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100dvh;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
|
||||
@media screen and (min-width: 1000px) {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.sideNavCollapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sideNavTop {
|
||||
height: var(--layout-nav-height);
|
||||
background-color: var(--color-bg-nav);
|
||||
border-bottom: 1.5px solid var(--color-border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-inline: var(--s-2);
|
||||
flex-shrink: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sideNavTopCentered {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.sideNavInner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--s-2);
|
||||
padding: var(--s-1-5);
|
||||
padding-block-end: var(--s-2);
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.sideNavFooter {
|
||||
height: var(--layout-nav-height);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--s-1);
|
||||
padding: var(--s-1-5) var(--s-3);
|
||||
background-color: var(--color-bg-nav);
|
||||
border-top: 1.5px solid var(--color-border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sideNavFooterUser {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--s-2);
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
font-size: var(--font-xs);
|
||||
font-weight: var(--weight-semi);
|
||||
border-radius: var(--radius-field);
|
||||
padding: var(--s-1);
|
||||
margin-left: calc(-1 * var(--s-1));
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sideNavFooterUser:hover {
|
||||
background-color: var(--color-bg-high);
|
||||
}
|
||||
|
||||
.sideNavFooterUsername {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sideNavFooterActions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--s-0-5);
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.sideNavFooterButton {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
background-color: transparent;
|
||||
width: var(--field-size-sm);
|
||||
height: var(--field-size-sm);
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: var(--radius-field);
|
||||
color: var(--color-text-high);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sideNavFooterButton:hover {
|
||||
background-color: var(--color-bg-high);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.sideNavFooterButton:focus-visible {
|
||||
outline: var(--focus-ring);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.sideNavFooterButton svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.sideNavFooterNotification {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sideNavFooterUnseenDot {
|
||||
--dot-top: 2px;
|
||||
--dot-right: 2px;
|
||||
}
|
||||
|
||||
.sideNavHeader {
|
||||
color: var(--color-text-high);
|
||||
padding: var(--s-1-5) var(--s-2);
|
||||
margin-inline: calc(-1 * var(--s-1-5));
|
||||
background-color: var(--color-bg-high);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--s-2);
|
||||
border-color: var(--color-border);
|
||||
border-top: 1.5px solid var(--color-border);
|
||||
border-bottom: 1.5px solid var(--color-border);
|
||||
height: var(--layout-nav-height);
|
||||
}
|
||||
|
||||
.sideNavHeader:first-child {
|
||||
margin-block-start: calc(-1 * var(--s-1-5));
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.sideNavHeader h2 {
|
||||
font-size: var(--font-xs);
|
||||
font-weight: var(--weight-bold);
|
||||
}
|
||||
|
||||
.sideNavHeaderAction {
|
||||
margin-inline-start: auto;
|
||||
font-size: var(--font-2xs);
|
||||
font-weight: var(--weight-normal);
|
||||
}
|
||||
|
||||
.sideNavHeaderAction a {
|
||||
color: var(--color-text-high);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sideNavHeaderAction a:hover {
|
||||
color: var(--color-text);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.sideNavHeaderClose {
|
||||
margin-inline-start: auto;
|
||||
margin-inline-end: var(--s-1);
|
||||
}
|
||||
|
||||
.sideNavHeader svg {
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.iconContainer {
|
||||
background-color: var(--color-bg-high);
|
||||
border-radius: var(--radius-field);
|
||||
padding: var(--s-1-5);
|
||||
}
|
||||
|
||||
.listLink {
|
||||
font-size: var(--font-xs);
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
padding: var(--s-1) var(--s-2);
|
||||
border-radius: var(--radius-field);
|
||||
transition:
|
||||
background-color 0.15s,
|
||||
color 0.15s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--s-2);
|
||||
|
||||
&:hover {
|
||||
&:not(:has(.listLinkSubtitle)) {
|
||||
color: var(--color-text);
|
||||
}
|
||||
background-color: var(--color-bg-high);
|
||||
}
|
||||
|
||||
&[aria-current="page"] {
|
||||
color: var(--color-text);
|
||||
background-color: var(--color-bg-higher);
|
||||
font-weight: var(--weight-bold);
|
||||
}
|
||||
}
|
||||
|
||||
.listButton {
|
||||
composes: listLink;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
|
||||
&:focus-visible {
|
||||
outline: var(--focus-ring);
|
||||
}
|
||||
}
|
||||
|
||||
.listLinkImageContainer {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.listLinkImage {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: var(--radius-avatar);
|
||||
object-fit: cover;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.listLinkOverlayIcon {
|
||||
position: absolute;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: var(--radius-field);
|
||||
background-color: var(--color-bg);
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.listLinkContent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
gap: var(--s-0-5);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.listLinkTitle {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
||||
&:has(+ .listLinkSubtitle) {
|
||||
color: var(--color-text);
|
||||
}
|
||||
}
|
||||
|
||||
.listLinkSubtitleRow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
color: var(--color-text-high);
|
||||
}
|
||||
|
||||
.listLinkSubtitle {
|
||||
font-size: var(--font-2xs);
|
||||
color: var(--color-text-high);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.listLinkBadge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
font-size: var(--font-2xs);
|
||||
font-weight: var(--weight-semi);
|
||||
color: var(--color-text-inverse);
|
||||
background-color: var(--color-text-accent);
|
||||
padding: 0 var(--s-1);
|
||||
border-radius: var(--radius-selector);
|
||||
height: var(--selector-size-xs);
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.listLinkBadgeWarning {
|
||||
background-color: var(--color-text-second);
|
||||
}
|
||||
Reference in New Issue
Block a user