Files
hugo-theme-stack/assets/scss/partials/sidebar.scss
T

228 lines
4.6 KiB
SCSS
Raw Normal View History

2020-08-22 13:20:08 +02:00
.sidebar {
&.sticky {
@include respond(md) {
2020-08-22 13:20:08 +02:00
position: sticky;
}
}
}
.left-sidebar {
display: flex;
flex-direction: column;
flex-shrink: 0;
align-self: stretch;
@include respond(md) {
gap: var(--sidebar-element-separation);
}
margin-bottom: calc(-1 * var(--sidebar-element-separation));
@include respond(md) {
margin-bottom: 0;
}
&> :not(:last-child) {
margin-bottom: var(--sidebar-element-separation);
@include respond(md) {
margin-bottom: 0;
}
}
max-width: none;
2022-03-04 10:24:21 +01:00
width: 100%;
2022-03-03 23:11:19 +01:00
position: relative;
2022-03-04 10:24:21 +01:00
--sidebar-avatar-size: 100px;
--sidebar-element-separation: var(--spacing-lg);
2022-03-04 10:24:21 +01:00
--emoji-size: 40px;
--emoji-font-size: 20px;
@include respond(md) {
width: auto;
2021-06-21 18:44:54 +02:00
padding-top: var(--main-top-padding);
padding-bottom: var(--main-top-padding);
max-height: 100vh;
2020-10-04 15:58:32 +02:00
}
@include respond(2xl) {
2022-03-04 10:24:21 +01:00
--sidebar-avatar-size: 120px;
--sidebar-element-separation: var(--spacing-xl);
2022-03-04 10:24:21 +01:00
--emoji-size: 40px;
2020-08-22 13:20:08 +02:00
}
&.sticky {
top: 0;
2020-08-22 13:20:08 +02:00
}
2022-03-04 10:24:21 +01:00
&.compact {
--sidebar-avatar-size: 80px;
--emoji-size: 30px;
--emoji-font-size: 15px;
header {
@include respond(lg) {
flex-direction: row;
}
.site-meta {
gap: var(--spacing-xs);
2022-03-04 10:24:21 +01:00
}
.site-name {
font-size: 1.4rem;
@include respond(2xl) {
font-size: 1.75rem;
}
}
.site-description {
font-size: 1.4rem;
}
}
}
2020-08-22 13:20:08 +02:00
}
.right-sidebar {
2022-02-26 23:45:25 +01:00
width: 100%;
display: none;
2022-03-03 23:11:19 +01:00
flex-direction: column;
gap: var(--widget-separation);
2020-08-22 13:20:08 +02:00
&.sticky {
2020-09-04 13:10:11 +02:00
top: 0;
2020-08-22 13:20:08 +02:00
}
@include respond(lg) {
padding-top: var(--main-top-padding);
padding-bottom: var(--main-top-padding);
2020-08-22 13:20:08 +02:00
}
}
2022-03-03 23:11:19 +01:00
.sidebar header {
2020-08-22 13:20:08 +02:00
z-index: 1;
transition: box-shadow 0.5s ease;
2022-03-03 23:11:19 +01:00
display: flex;
flex-direction: column;
gap: var(--sidebar-element-separation);
@include respond(md) {
padding: 0;
2020-08-22 13:20:08 +02:00
}
.site-avatar {
position: relative;
margin: 0;
2020-10-04 15:58:32 +02:00
width: var(--sidebar-avatar-size);
height: var(--sidebar-avatar-size);
2022-03-04 10:24:21 +01:00
flex-shrink: 0;
2020-08-22 13:20:08 +02:00
.site-logo {
width: 100%;
height: 100%;
border-radius: 100%;
box-shadow: var(--shadow-l1);
2020-08-22 13:20:08 +02:00
}
.emoji {
position: absolute;
2022-03-04 10:24:21 +01:00
width: var(--emoji-size);
height: var(--emoji-size);
line-height: var(--emoji-size);
2020-08-22 13:20:08 +02:00
border-radius: 100%;
bottom: 0;
right: 0;
text-align: center;
2022-03-04 10:24:21 +01:00
font-size: var(--emoji-font-size);
2020-08-22 13:20:08 +02:00
background-color: var(--card-background);
box-shadow: var(--shadow-l2);
2020-08-22 13:20:08 +02:00
}
}
2022-03-03 23:11:19 +01:00
.site-meta {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
2022-03-04 10:24:21 +01:00
justify-content: center;
2022-03-03 23:11:19 +01:00
}
2020-08-22 13:20:08 +02:00
.site-name {
color: var(--accent-color);
margin: 0;
2022-03-04 10:24:21 +01:00
font-size: 1.6rem;
2020-09-03 11:42:01 +02:00
@include respond(2xl) {
2022-03-04 10:24:21 +01:00
font-size: 1.8rem;
2020-09-03 11:42:01 +02:00
}
2020-08-22 13:20:08 +02:00
}
.site-description {
color: var(--body-text-color);
2020-09-03 23:32:28 +02:00
font-weight: normal;
2022-03-03 23:11:19 +01:00
margin: 0;
2022-03-04 10:24:21 +01:00
font-size: 1.4rem;
2020-08-22 13:20:08 +02:00
@include respond(2xl) {
2022-03-04 10:24:21 +01:00
font-size: 1.6rem;
2020-08-22 13:20:08 +02:00
}
}
}
2020-12-23 19:03:40 +01:00
[data-scheme="dark"] {
#dark-mode-toggle {
color: var(--accent-color);
font-weight: 700;
.icon-tabler-toggle-left {
display: none;
}
.icon-tabler-toggle-right {
display: unset;
}
}
}
#dark-mode-toggle {
margin-top: auto;
color: var(--body-text-color);
display: flex;
align-items: center;
cursor: pointer;
2022-03-03 23:11:19 +01:00
gap: var(--menu-icon-separation);
2020-12-23 19:03:40 +01:00
.icon-tabler-toggle-right {
display: none;
}
}
2022-02-27 10:51:02 +01:00
#i18n-switch {
color: var(--body-text-color);
display: inline-flex;
align-content: center;
2022-03-03 23:11:19 +01:00
gap: var(--menu-icon-separation);
2022-02-27 10:51:02 +01:00
select {
border: 0;
2026-01-26 00:13:36 +01:00
background: none !important;
2022-02-27 10:51:02 +01:00
color: var(--body-text-color);
2026-01-26 00:13:36 +01:00
padding: 0 !important;
cursor: pointer;
font-family: inherit;
font-size: inherit;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
&::-ms-expand {
display: none;
}
2022-02-27 10:51:02 +01:00
option {
color: var(--card-text-color-main);
background-color: var(--card-background);
}
}
2026-01-26 00:13:36 +01:00
}