krata/_sass/addon/commons.scss

1646 lines
27 KiB
SCSS
Raw Normal View History

/*
2021-01-23 06:20:58 +01:00
The common styles
2019-09-30 14:38:41 +02:00
*/
2022-01-26 21:41:19 +01:00
html {
@media (prefers-color-scheme: light) {
&:not([data-mode]),
&[data-mode='light'] {
2022-01-26 21:41:19 +01:00
@include light-scheme;
}
&[data-mode='dark'] {
2022-01-26 21:41:19 +01:00
@include dark-scheme;
}
}
2022-01-26 21:41:19 +01:00
@media (prefers-color-scheme: dark) {
&:not([data-mode]),
&[data-mode='dark'] {
2022-01-26 21:41:19 +01:00
@include dark-scheme;
}
&[data-mode='light'] {
2022-01-26 21:41:19 +01:00
@include light-scheme;
}
}
2020-02-16 20:06:38 +01:00
2019-10-16 17:20:51 +02:00
font-size: 16px;
2019-09-30 14:38:41 +02:00
}
body {
background: var(--main-bg);
padding: env(safe-area-inset-top) env(safe-area-inset-right)
env(safe-area-inset-bottom) env(safe-area-inset-left);
color: var(--text-color);
2019-09-30 14:38:41 +02:00
-webkit-font-smoothing: antialiased;
font-family: $font-family-base;
2019-09-30 14:38:41 +02:00
}
/* --- Typography --- */
h1 {
@extend %heading;
2021-12-05 16:44:04 +01:00
font-size: 1.9rem;
}
h2 {
@extend %heading;
@extend %section;
@extend %anchor;
2021-12-05 16:44:04 +01:00
font-size: 1.5rem;
}
h3 {
@extend %heading;
@extend %section;
2021-12-09 13:45:20 +01:00
@extend %anchor;
2021-12-05 16:44:04 +01:00
font-size: 1.2rem;
}
h4 {
@extend %heading;
@extend %section;
@extend %anchor;
font-size: 1.15rem;
}
h5 {
@extend %heading;
@extend %section;
@extend %anchor;
font-size: 1.1rem;
}
a {
@extend %link-color;
}
img {
max-width: 100%;
2021-06-30 13:08:42 +02:00
height: auto;
2023-03-21 16:47:01 +01:00
transition: all 0.35s ease-in-out;
&[data-src] {
&[data-lqip='true'] {
&.lazyload,
&.lazyloading {
-webkit-filter: blur(20px);
filter: blur(20px);
}
}
&:not([data-lqip='true']) {
&.lazyload,
&.lazyloading {
background: var(--img-bg);
}
2023-03-21 16:47:01 +01:00
&.lazyloaded {
-webkit-animation: fade-in 0.35s ease-in;
animation: fade-in 0.35s ease-in;
}
}
&.shadow {
-webkit-filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
box-shadow: none !important; /* cover the Bootstrap 4.6.1 styles */
}
@extend %img-caption;
}
@-webkit-keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
}
2019-09-30 14:38:41 +02:00
blockquote {
border-left: 5px solid var(--blockquote-border-color);
padding-left: 1rem;
color: var(--blockquote-text-color);
2022-01-21 10:46:01 +01:00
&[class^='prompt-'] {
2022-01-21 10:46:01 +01:00
border-left: 0;
position: relative;
padding: 1rem 1rem 1rem 3rem;
2022-01-26 21:41:19 +01:00
color: var(--prompt-text-color);
2022-01-21 10:46:01 +01:00
@extend %rounded;
2022-01-21 10:46:01 +01:00
&::before {
text-align: center;
width: 3rem;
position: absolute;
left: 0.25rem;
margin-top: 0.4rem;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
2022-01-21 10:46:01 +01:00
}
> p:last-child {
margin-bottom: 0;
2022-01-21 10:46:01 +01:00
}
}
@include prompt('tip', '\f0eb', 'regular');
@include prompt('info', '\f06a');
@include prompt('warning', '\f06a');
@include prompt('danger', '\f071');
}
kbd {
font-family: inherit;
display: inline-block;
vertical-align: middle;
line-height: 1.3rem;
min-width: 1.75rem;
text-align: center;
margin: 0 0.3rem;
padding-top: 0.1rem;
color: var(--kbd-text-color);
background-color: var(--kbd-bg-color);
border-radius: 0.25rem;
border: solid 1px var(--kbd-wrap-color);
box-shadow: inset 0 -2px 0 var(--kbd-wrap-color);
}
footer {
font-size: 0.8rem;
2022-09-29 16:20:01 +02:00
background-color: var(--main-bg);
div.d-flex {
height: $footer-height;
line-height: 1.2rem;
padding-bottom: 1rem;
border-top: 1px solid var(--main-border-color);
2019-09-30 14:38:41 +02:00
> div {
width: 350px;
2020-02-25 10:56:03 +01:00
}
}
2019-09-30 14:38:41 +02:00
a {
2021-12-04 20:23:00 +01:00
@extend %text-color;
2021-10-25 21:04:15 +02:00
&:link {
2023-03-21 00:20:32 +01:00
@extend %no-decoration;
2020-02-25 10:56:03 +01:00
}
2021-10-25 21:04:15 +02:00
&:hover {
@extend %link-hover;
2023-03-21 00:20:32 +01:00
@extend %no-decoration;
2020-02-25 10:56:03 +01:00
}
}
2021-10-25 21:04:15 +02:00
.footer-right {
text-align: right;
}
2019-09-30 14:38:41 +02:00
}
/* fontawesome icons */
i {
&.far,
&.fas {
@extend %no-cursor;
}
}
/* --- Panels --- */
2019-09-30 14:38:41 +02:00
.access {
top: 2rem;
transition: top 0.2s ease-in-out;
margin-top: 3rem;
margin-bottom: 4rem;
2019-09-30 14:38:41 +02:00
&:only-child {
position: -webkit-sticky;
position: sticky;
2020-02-25 10:56:03 +01:00
}
2021-10-25 21:04:15 +02:00
> div {
2020-02-25 10:56:03 +01:00
padding-left: 1rem;
border-left: 1px solid var(--main-border-color);
2021-10-25 21:04:15 +02:00
2020-02-28 17:16:47 +01:00
&:not(:last-child) {
margin-bottom: 4rem;
2020-02-25 10:56:03 +01:00
}
}
2021-10-25 21:04:15 +02:00
2020-02-25 10:56:03 +01:00
.post-content {
2020-10-27 15:08:04 +01:00
font-size: 0.9rem;
2020-02-25 10:56:03 +01:00
}
2019-09-30 14:38:41 +02:00
}
2021-12-01 14:49:51 +01:00
#panel-wrapper {
/* the headings */
2021-12-30 17:29:25 +01:00
.panel-heading {
@include label(inherit);
2020-02-25 10:56:03 +01:00
}
2020-02-25 10:56:03 +01:00
.post-tag {
line-height: 1.05rem;
2020-02-25 10:56:03 +01:00
font-size: 0.85rem;
border: 1px solid var(--btn-border-color);
2020-10-27 15:08:04 +01:00
border-radius: 0.8rem;
2020-12-18 13:54:18 +01:00
padding: 0.3rem 0.5rem;
margin: 0 0.35rem 0.5rem 0;
2021-10-25 21:04:15 +02:00
2020-02-25 10:56:03 +01:00
&:hover {
transition: all 0.3s ease-in;
2020-02-25 10:56:03 +01:00
}
}
[data-topbar-visible='true'] & > div {
top: 5.5rem;
}
2019-09-30 14:38:41 +02:00
}
2020-02-25 10:56:03 +01:00
#access-lastmod {
li {
height: 1.8rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
list-style: none;
2020-02-25 10:56:03 +01:00
}
2019-09-30 14:38:41 +02:00
2020-02-25 10:56:03 +01:00
a {
&:hover {
@extend %link-hover;
}
@extend %no-bottom-border;
2021-04-05 14:02:17 +02:00
color: inherit;
2020-02-25 10:56:03 +01:00
}
}
2019-09-30 14:38:41 +02:00
.footnotes > ol {
padding-left: 2rem;
2020-10-27 15:08:04 +01:00
margin-top: 0.5rem;
2021-10-25 21:04:15 +02:00
2020-10-27 15:08:04 +01:00
> li {
&:not(:last-child) {
margin-bottom: 0.3rem;
2020-02-25 10:56:03 +01:00
}
2021-10-25 21:04:15 +02:00
> p {
margin-left: 0.25em;
margin-top: 0;
margin-bottom: 0;
2020-02-25 10:56:03 +01:00
}
2021-10-25 21:04:15 +02:00
/* [scroll-focus] added by `smooth-scroll.js` */
&:target:not([scroll-focus]),
&[scroll-focus='true'] > p {
background-color: var(--footnote-target-bg);
width: -moz-fit-content;
width: -webkit-fit-content;
2020-02-25 10:56:03 +01:00
width: fit-content;
transition: background-color 1.5s ease-in-out;
}
}
2019-09-30 14:38:41 +02:00
}
2020-02-25 10:56:03 +01:00
.footnote {
@at-root a#{&} {
@include ml-mr(1px);
@include pl-pr(2px);
2020-02-25 10:56:03 +01:00
border-bottom-style: none !important;
transition: background-color 1.5s ease-in-out;
}
/* [scroll-focus] added by `smooth-scroll.js` */
@at-root sup:target:not([scroll-focus]),
sup[scroll-focus='true'] > a#{&} {
background-color: var(--footnote-target-bg);
2020-02-25 10:56:03 +01:00
}
2019-09-30 14:38:41 +02:00
}
2020-02-25 10:56:03 +01:00
.reversefootnote {
@at-root a#{&} {
2020-10-27 15:08:04 +01:00
font-size: 0.6rem;
2020-02-25 10:56:03 +01:00
line-height: 1;
position: relative;
bottom: 0.25em;
margin-left: 0.25em;
2020-02-25 10:56:03 +01:00
border-bottom-style: none !important;
}
2019-09-30 14:38:41 +02:00
}
/* --- Begin of Markdown table style --- */
/* it will be created by Liquid */
2021-12-30 17:29:25 +01:00
.table-wrapper {
overflow-x: auto;
margin-bottom: 1.5rem;
2019-09-30 14:38:41 +02:00
2020-10-27 15:08:04 +01:00
> table {
min-width: 100%;
2020-06-24 14:08:38 +02:00
overflow-x: auto;
2020-02-25 10:56:03 +01:00
border-spacing: 0;
2019-09-30 14:38:41 +02:00
thead {
border-bottom: solid 2px rgba(210, 215, 217, 0.75);
2021-10-25 21:04:15 +02:00
th {
@extend %table-cell;
2020-02-25 10:56:03 +01:00
}
}
2020-01-11 10:52:38 +01:00
tbody {
tr {
border-bottom: 1px solid var(--tb-border-color);
2021-10-25 21:04:15 +02:00
&:nth-child(2n) {
background-color: var(--tb-even-bg);
}
2021-10-25 21:04:15 +02:00
&:nth-child(2n + 1) {
background-color: var(--tb-odd-bg);
}
2021-10-25 21:04:15 +02:00
td {
@extend %table-cell;
}
}
} /* tbody */
} /* table */
}
2019-09-30 14:38:41 +02:00
/* --- post --- */
2019-09-30 14:38:41 +02:00
.post-preview {
@extend %rounded;
border: 0;
background: var(--card-bg);
box-shadow: var(--card-shadow);
&::before {
@extend %rounded;
content: '';
width: 100%;
height: 100%;
position: absolute;
background-color: var(--card-hovor-bg);
opacity: 0;
transition: opacity 0.35s ease-in-out;
}
&:hover {
&::before {
opacity: 0.3;
}
}
}
.post {
h1 {
margin-top: 3rem;
2021-12-05 16:44:04 +01:00
margin-bottom: 1.5rem;
}
p {
> img[data-src],
> a.popup {
&:not(.normal):not(.left):not(.right) {
@include align-center;
}
}
}
}
2019-12-17 12:26:11 +01:00
.pageviews .fa-spinner {
font-size: 80%;
}
2019-09-30 14:38:41 +02:00
.post-meta {
font-size: 0.85rem;
2021-10-25 21:04:15 +02:00
2020-02-25 10:56:03 +01:00
a {
&:not([class]):hover {
2020-02-25 10:56:03 +01:00
@extend %link-hover;
}
}
em {
@extend %normal-font-style;
}
2019-09-30 14:38:41 +02:00
}
.post-content {
font-size: 1.08rem;
2019-09-30 14:38:41 +02:00
margin-top: 2rem;
overflow-wrap: break-word;
a {
&.popup {
@extend %no-cursor;
@extend %img-caption;
@include mt-mb(0.5rem);
cursor: zoom-in;
}
2021-04-16 07:04:48 +02:00
&:not(.img-link) {
@extend %link-underline;
2021-10-25 21:04:15 +02:00
&:hover {
@extend %link-hover;
2020-10-06 14:15:19 +02:00
}
2020-09-02 12:25:57 +02:00
}
}
2021-04-21 17:17:34 +02:00
ol,
ul {
&:not([class]),
&.task-list {
-webkit-padding-start: 1.75rem;
padding-inline-start: 1.75rem;
li {
margin: 0.25rem 0;
padding-left: 0.25rem;
}
ol,
ul {
-webkit-padding-start: 1.25rem;
padding-inline-start: 1.25rem;
margin: 0.5rem 0;
}
}
}
ul.task-list {
-webkit-padding-start: 1.25rem;
padding-inline-start: 1.25rem;
li {
list-style-type: none;
padding-left: 0;
/* checkbox icon */
> i {
width: 2rem;
margin-left: -1.25rem;
color: var(--checkbox-color);
2021-10-25 21:04:15 +02:00
&.checked {
color: var(--checkbox-checked-color);
}
}
ul {
-webkit-padding-start: 1.75rem;
padding-inline-start: 1.75rem;
}
}
input[type='checkbox'] {
margin: 0 0.5rem 0.2rem -1.3rem;
vertical-align: middle;
}
} /* ul */
dl > dd {
margin-left: 1rem;
}
2023-03-23 19:19:37 +01:00
::marker {
color: var(--text-muted-color);
}
} /* .post-content */
.tag:hover {
@extend %tag-hover;
}
.post-tag {
display: inline-block;
min-width: 2rem;
text-align: center;
border-radius: 0.3rem;
padding: 0 0.4rem;
color: inherit;
line-height: 1.3rem;
&:not(:last-child) {
margin-right: 0.2rem;
}
}
.rounded-10 {
border-radius: 10px !important;
}
.img-link {
color: transparent;
display: inline-flex;
}
.shimmer {
overflow: hidden;
position: relative;
background: var(--img-bg);
&::before {
content: '';
position: absolute;
background: var(--shimmer-bg);
height: 100%;
width: 100%;
-webkit-animation: shimmer 1s infinite;
animation: shimmer 1s infinite;
}
@-webkit-keyframes shimmer {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
@keyframes shimmer {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
}
2022-12-16 20:56:19 +01:00
.embed-video {
width: 100%;
height: 100%;
margin-bottom: 1rem;
@extend %rounded;
2022-12-16 20:56:19 +01:00
&.youtube {
aspect-ratio: 16 / 9;
}
&.twitch {
aspect-ratio: 310 / 189;
}
}
/* --- buttons --- */
.btn-lang {
border: 1px solid !important;
padding: 1px 3px;
border-radius: 3px;
color: var(--link-color);
2021-10-25 21:04:15 +02:00
&:focus {
box-shadow: none;
}
}
/* --- Effects classes --- */
.loaded {
display: block !important;
@at-root .d-flex#{&} {
display: flex !important;
}
}
.unloaded {
display: none !important;
}
.visible {
visibility: visible !important;
}
.hidden {
visibility: hidden !important;
}
.flex-grow-1 {
flex-grow: 1 !important;
}
.btn-box-shadow {
box-shadow: 0 0 8px 0 var(--btn-box-shadow) !important;
}
.no-text-decoration {
2023-03-21 00:20:32 +01:00
@extend %no-decoration;
}
2023-03-21 01:44:10 +01:00
/* overwrite bootstrap muted */
.text-muted {
color: var(--text-muted-color) !important;
}
2023-03-21 00:20:32 +01:00
/* Overwrite bootstrap tooltip */
.tooltip-inner {
font-size: 0.7rem;
max-width: 220px;
text-align: left;
}
/* Overwrite bootstrap outline button */
.btn.btn-outline-primary {
&:not(.disabled):hover {
border-color: #007bff !important;
}
}
.disabled {
color: rgb(206, 196, 196);
pointer-events: auto;
cursor: not-allowed;
}
.hide-border-bottom {
border-bottom: none !important;
}
.input-focus {
box-shadow: none;
border-color: var(--input-focus-border-color) !important;
background: center !important;
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.left {
float: left;
margin: 0.75rem 1rem 1rem 0 !important;
}
.right {
float: right;
margin: 0.75rem 0 1rem 1rem !important;
}
2021-04-21 17:18:51 +02:00
/* --- Overriding --- */
2021-04-21 17:17:34 +02:00
/* magnific-popup */
2021-04-21 17:17:34 +02:00
figure .mfp-title {
text-align: center;
padding-right: 0;
margin-top: 0.5rem;
}
/* mermaid */
2021-04-21 17:18:51 +02:00
.mermaid {
text-align: center;
}
/* MathJax */
mjx-container {
overflow-y: hidden;
min-width: auto !important;
}
/* --- sidebar layout --- */
$sidebar-display: 'sidebar-display';
2023-03-24 19:58:58 +01:00
$btn-gap: 0.8rem; // for the bottom icons
$btn-border-width: 3px;
$btn-mb: 0.5rem;
#sidebar {
@include pl-pr(0);
position: fixed;
top: 0;
left: 0;
height: 100%;
overflow-y: auto;
width: $sidebar-width;
z-index: 99;
background: var(--sidebar-bg);
2021-04-02 16:57:06 +02:00
/* Hide scrollbar for Chrome, Safari and Opera */
&::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
2021-04-02 16:57:06 +02:00
2023-03-24 19:58:58 +01:00
%sidebar-link-hover {
&:hover {
color: var(--sidebar-active-color);
}
}
a {
2021-09-21 16:37:28 +02:00
@extend %sidebar-links;
&:hover {
2023-03-21 00:20:32 +01:00
@extend %no-decoration;
}
}
#avatar {
2023-03-24 19:58:58 +01:00
display: block;
width: 7rem;
height: 7rem;
overflow: hidden;
box-shadow: var(--avatar-border-color) 0 0 0 2px;
transform: translateZ(0); /* fixed the zoom in Safari */
img {
transition: transform 0.5s;
&:hover {
transform: scale(1.2);
}
}
2023-03-24 19:58:58 +01:00
}
.profile-wrapper {
@include mt-mb(2.5rem);
@extend %clickable-transition;
padding-left: 2.5rem;
padding-right: 1.25rem;
width: 100%;
}
.site-title {
2023-03-24 19:58:58 +01:00
font-weight: 900;
font-size: 1.75rem;
line-height: 1.2;
letter-spacing: 0.25px;
color: rgba(134, 133, 133, 0.99);
margin-top: 1.25rem;
margin-bottom: 0.5rem;
a {
2021-09-21 12:00:29 +02:00
@extend %clickable-transition;
2023-03-24 19:58:58 +01:00
@extend %sidebar-link-hover;
}
}
.site-subtitle {
font-size: 95%;
2021-09-21 12:00:29 +02:00
color: var(--sidebar-muted-color);
2023-03-24 19:58:58 +01:00
margin-top: 0.25rem;
word-spacing: 1px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
ul {
margin-bottom: 2rem;
2023-03-24 19:58:58 +01:00
li.nav-item {
opacity: 0.9;
width: 100%;
2023-03-24 19:58:58 +01:00
padding-left: 1.5rem;
padding-right: 1.5rem;
a.nav-link {
@include pt-pb(0.6rem);
2023-03-24 19:58:58 +01:00
display: flex;
align-items: center;
border-radius: 0.75rem;
font-weight: 600;
&:hover {
background-color: var(--sidebar-hover-bg);
}
2023-03-24 19:58:58 +01:00
i {
font-size: 95%;
opacity: 0.8;
margin-right: 1.5rem;
}
2023-03-24 19:58:58 +01:00
span {
font-size: 90%;
letter-spacing: 0.2px;
}
}
2023-03-24 19:58:58 +01:00
&.active {
.nav-link {
color: var(--sidebar-active-color);
background-color: var(--sidebar-hover-bg);
2023-03-24 19:58:58 +01:00
span {
opacity: 1;
}
}
}
2023-03-24 19:58:58 +01:00
&:not(:first-child) {
margin-top: 0.25rem;
}
}
}
.sidebar-bottom {
2023-03-24 19:58:58 +01:00
@include pl-pr(2rem);
2023-03-24 19:58:58 +01:00
margin-bottom: 1.5rem;
2023-03-24 19:58:58 +01:00
%button {
width: 1.75rem;
height: 1.75rem;
margin-bottom: $btn-mb; // multi line gap
border-radius: 50%;
color: var(--sidebar-btn-color);
background-color: var(--sidebar-btn-bg);
text-align: center;
2023-03-24 19:58:58 +01:00
display: flex;
align-items: center;
justify-content: center;
&:hover {
background-color: var(--sidebar-hover-bg);
}
}
a {
2023-03-24 19:58:58 +01:00
@extend %button;
@extend %sidebar-link-hover;
2021-09-21 12:00:29 +02:00
@extend %clickable-transition;
2023-03-24 19:58:58 +01:00
&:not(:last-child) {
margin-right: $btn-gap;
}
}
2021-09-21 16:37:28 +02:00
i {
line-height: 1.75rem;
}
.mode-toggle {
padding: 0;
border: 0;
2023-03-24 19:58:58 +01:00
@extend %button;
@extend %sidebar-links;
2023-03-24 19:58:58 +01:00
@extend %sidebar-link-hover;
}
.icon-border {
@extend %no-cursor;
2023-03-24 19:58:58 +01:00
@include ml-mr(calc(($btn-gap - $btn-border-width) / 2));
2021-09-21 12:00:29 +02:00
background-color: var(--sidebar-muted-color);
content: '';
2023-03-24 19:58:58 +01:00
width: $btn-border-width;
height: $btn-border-width;
border-radius: 50%;
2023-03-24 19:58:58 +01:00
margin-bottom: $btn-mb;
}
} /* .sidebar-bottom */
} /* #sidebar */
@media (hover: hover) {
#sidebar ul > li:last-child::after {
transition: top 0.5s ease;
}
2023-03-21 16:47:01 +01:00
2023-03-24 19:58:58 +01:00
.nav-link {
transition: background-color 0.3s ease-in-out;
}
2023-03-21 16:47:01 +01:00
.post-preview {
transition: background-color 0.35s ease-in-out;
}
}
#search-result-wrapper {
display: none;
height: 100%;
width: 100%;
overflow: auto;
2021-10-25 21:04:15 +02:00
.post-content {
margin-top: 2rem;
}
}
/* --- top-bar --- */
#topbar-wrapper {
height: $topbar-height;
position: fixed;
top: 0;
left: $sidebar-width; /* same as sidebar width */
right: 0;
transition: top 0.2s ease-in-out;
z-index: 50;
border-bottom: 1px solid rgba(0, 0, 0, 0.07);
background-color: var(--topbar-wrapper-bg);
[data-topbar-visible='false'] & {
top: -$topbar-height; /* same as topbar height. */
}
}
#topbar {
/* icons */
i {
2022-10-19 20:05:29 +02:00
color: #999999;
}
#breadcrumb {
font-size: 1rem;
color: gray;
padding-left: 0.5rem;
a:hover {
@extend %link-hover;
}
span {
&:not(:last-child) {
&::after {
content: '';
padding: 0 0.3rem;
}
}
}
}
} /* #topbar */
#sidebar-trigger,
#search-trigger {
display: none;
}
#search-wrapper {
display: flex;
width: 100%;
border-radius: 1rem;
2021-09-21 12:00:29 +02:00
border: 1px solid var(--search-wrapper-border-color);
background: var(--search-wrapper-bg);
padding: 0 0.5rem;
i {
z-index: 2;
font-size: 0.9rem;
color: var(--search-icon-color);
}
}
/* 'Cancel' link */
#search-cancel {
color: var(--link-color);
margin-left: 1rem;
display: none;
@extend %cursor-pointer;
}
#search-input {
background: center;
border: 0;
border-radius: 0;
padding: 0.18rem 0.3rem;
color: var(--text-color);
height: auto;
&:focus {
box-shadow: none;
background: center;
2021-10-25 21:04:15 +02:00
&.form-control {
&::-moz-placeholder {
@include input-placeholder;
}
&::-webkit-input-placeholder {
@include input-placeholder;
}
&:-ms-input-placeholder {
@include input-placeholder;
}
&::-ms-input-placeholder {
@include input-placeholder;
}
&::placeholder {
@include input-placeholder;
}
}
}
}
#search-hints {
2021-12-01 14:49:51 +01:00
padding: 0 1rem;
h4 {
margin-bottom: 1.5rem;
}
2020-12-14 08:01:05 +01:00
.post-tag {
display: inline-block;
line-height: 1rem;
font-size: 1rem;
background: var(--search-tag-bg);
border: none;
padding: 0.5rem;
2021-12-01 14:49:51 +01:00
margin: 0 1.25rem 1rem 0;
2021-10-25 21:04:15 +02:00
&::before {
content: '#';
color: var(--text-muted-color);
padding-right: 0.2rem;
}
2021-12-01 14:49:51 +01:00
@extend %link-color;
}
}
#search-results {
padding-bottom: 3rem;
2021-10-25 21:04:15 +02:00
a {
&:hover {
@extend %link-hover;
}
@extend %link-color;
@extend %no-bottom-border;
@extend %heading;
font-size: 1.4rem;
line-height: 2.5rem;
}
> div {
width: 100%;
&:not(:last-child) {
margin-bottom: 1rem;
}
/* icons */
i {
color: #818182;
margin-right: 0.15rem;
font-size: 80%;
}
> p {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
}
} /* #search-results */
#topbar-title {
display: none;
font-size: 1.1rem;
font-weight: 600;
font-family: sans-serif;
color: var(--topbar-text-color);
2019-11-28 17:04:01 +01:00
text-align: center;
width: 70%;
overflow: hidden;
text-overflow: ellipsis;
word-break: keep-all;
white-space: nowrap;
2019-09-30 14:38:41 +02:00
}
2021-12-01 14:49:51 +01:00
#core-wrapper {
2023-03-24 19:58:58 +01:00
line-height: 1.75;
.categories,
#tags,
#archives {
a:not(:hover) {
@extend %no-bottom-border;
}
2020-02-28 17:16:47 +01:00
}
@at-root .row:only-child > #{&} {
padding-bottom: 3rem;
}
2020-02-08 19:59:16 +01:00
}
#mask {
display: none;
position: fixed;
inset: 0 0 0 0;
height: 100%;
width: 100%;
z-index: 1;
2019-09-30 14:38:41 +02:00
@at-root [#{$sidebar-display}] & {
display: block !important;
2020-02-25 10:56:03 +01:00
}
}
/* --- main wrapper --- */
2019-09-30 14:38:41 +02:00
#main-wrapper {
2022-09-29 16:20:01 +02:00
background-color: var(--main-bg);
position: relative;
min-height: calc(100vh - #{$footer-height});
2019-09-30 14:38:41 +02:00
@include pl-pr(0);
2019-09-30 14:38:41 +02:00
}
#core-wrapper,
#panel-wrapper {
margin-top: $topbar-height; /* same as the height of topbar */
2019-09-30 14:38:41 +02:00
}
#topbar-wrapper.row,
#main > .row,
#search-result-wrapper > .row {
@include ml-mr(0);
2019-09-30 14:38:41 +02:00
}
/* --- button back-to-top --- */
2019-11-15 17:01:33 +01:00
#back-to-top {
$size: 2.7em;
display: none;
z-index: 1;
cursor: pointer;
position: fixed;
background: var(--button-bg);
color: var(--btn-backtotop-color);
padding: 0;
width: $size;
height: $size;
border-radius: 50%;
border: 1px solid var(--btn-backtotop-border-color);
transition: transform 0.2s ease-out;
-webkit-transition: transform 0.2s ease-out;
i {
line-height: $size;
position: relative;
bottom: 2px;
}
2019-11-15 17:01:33 +01:00
}
#back-to-top:hover {
transform: translate3d(0, -5px, 0);
-webkit-transform: translate3d(0, -5px, 0);
}
2019-09-30 14:38:41 +02:00
#notification {
@-webkit-keyframes popup {
from {
opacity: 0;
bottom: 0;
}
}
@keyframes popup {
from {
opacity: 0;
bottom: 0;
}
}
.toast-header {
background: none;
border-bottom: none;
color: inherit;
}
.toast-body {
2022-10-19 20:05:29 +02:00
font-family: Lato, sans-serif;
line-height: 1.25rem;
button {
font-size: 90%;
min-width: 4rem;
}
}
&.toast {
display: none;
&.show {
display: block;
min-width: 20rem;
border-radius: 0.5rem;
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
background-color: rgba(255, 255, 255, 0.5);
color: #1b1b1eba;
position: fixed;
left: 50%;
bottom: 20%;
transform: translateX(-50%);
-webkit-animation: popup 0.8s;
animation: popup 0.8s;
}
}
}
/*
Responsive Design:
{sidebar, content, panel} >= 1200px screen width
{sidebar, content} >= 850px screen width
{content} <= 849px screen width
*/
2019-09-30 14:38:41 +02:00
@media all and (max-width: 576px) {
2022-01-21 10:46:01 +01:00
footer {
height: $footer-height-mobile;
2022-01-21 10:46:01 +01:00
div.d-flex {
2022-01-21 10:46:01 +01:00
padding: 1.5rem 0;
2022-12-25 16:36:56 +01:00
line-height: 1.65;
2022-01-21 10:46:01 +01:00
flex-wrap: wrap;
justify-content: space-around !important;
}
.footer-left,
.footer-right {
text-align: center;
}
}
#main-wrapper {
min-height: calc(100vh - #{$footer-height-mobile});
}
2021-12-01 14:49:51 +01:00
#core-wrapper {
min-height: calc(
100vh - #{$topbar-height} - #{$footer-height-mobile}
) !important;
2021-10-25 21:04:15 +02:00
2022-01-21 10:46:01 +01:00
.post-content {
> blockquote[class^='prompt-'] {
2022-01-21 10:46:01 +01:00
@include ml-mr(-1.25rem);
border-radius: 0;
max-width: none;
2022-01-21 10:46:01 +01:00
}
}
2019-09-30 14:38:41 +02:00
}
2023-03-24 19:58:58 +01:00
#avatar {
width: 5rem;
height: 5rem;
}
}
@media all and (max-width: 768px) {
%full-width {
max-width: 100%;
2020-02-16 19:55:16 +01:00
}
#topbar {
@extend %full-width;
}
#main {
@extend %full-width;
@include pl-pr(0);
}
2020-02-16 19:55:16 +01:00
}
2019-09-30 14:38:41 +02:00
/* hide sidebar and panel */
@media all and (max-width: 849px) {
@mixin slide($append: null) {
$basic: transform 0.4s ease;
2022-10-19 20:05:29 +02:00
@if $append {
transition: $basic, $append;
} @else {
transition: $basic;
}
2019-09-30 14:38:41 +02:00
}
html,
body {
2020-04-16 18:26:58 +02:00
overflow-x: hidden;
2019-11-22 16:56:04 +01:00
}
footer {
@include slide;
}
2020-04-16 18:26:58 +02:00
[#{$sidebar-display}] {
#sidebar {
transform: translateX(0);
}
2019-09-30 14:38:41 +02:00
2020-04-16 18:26:58 +02:00
#topbar-wrapper,
#main-wrapper,
footer {
transform: translateX(#{$sidebar-width});
2020-02-25 10:56:03 +01:00
}
2019-09-30 14:38:41 +02:00
}
#sidebar {
@include slide;
2020-04-16 18:26:58 +02:00
transform: translateX(-#{$sidebar-width}); /* hide */
-webkit-transform: translateX(-#{$sidebar-width});
2019-09-30 14:38:41 +02:00
}
#main-wrapper {
@include slide;
2020-04-16 18:26:58 +02:00
padding-top: $topbar-height;
2019-09-30 14:38:41 +02:00
}
#topbar,
#main,
footer > .container {
max-width: 100%;
}
#search-result-wrapper {
width: 100%;
2019-09-30 14:38:41 +02:00
}
#breadcrumb,
#search-wrapper {
2019-09-30 14:38:41 +02:00
display: none;
}
#topbar-wrapper {
@include slide(top 0.2s ease);
2019-09-30 14:38:41 +02:00
left: 0;
}
#core-wrapper,
#panel-wrapper {
2019-09-30 14:38:41 +02:00
margin-top: 0;
}
#topbar-title,
#sidebar-trigger,
#search-trigger {
display: block;
}
#search-result-wrapper .post-content {
2019-09-30 14:38:41 +02:00
letter-spacing: 0;
}
#tags {
justify-content: center !important;
2019-09-30 14:38:41 +02:00
}
2021-12-01 14:49:51 +01:00
h1.dynamic-title {
display: none;
2021-10-25 21:04:15 +02:00
~ .post-content {
margin-top: 3rem;
2020-02-25 10:56:03 +01:00
}
2019-09-30 14:38:41 +02:00
}
} /* max-width: 849px */
2020-02-08 19:59:16 +01:00
@media all and (max-width: 849px) and (orientation: portrait) {
[data-topbar-visible='false'] #topbar-wrapper {
top: 0;
}
}
/* Phone & Pad */
@media all and (min-width: 577px) and (max-width: 1199px) {
footer .d-flex > div {
width: 312px;
}
}
/* Sidebar is visible */
@media all and (min-width: 850px) {
2020-04-16 18:26:58 +02:00
/* Solved jumping scrollbar */
html {
overflow-y: scroll;
}
2022-10-19 20:05:29 +02:00
#main-wrapper,
footer {
margin-left: $sidebar-width;
2020-04-16 18:26:58 +02:00
}
2023-03-24 19:58:58 +01:00
#sidebar {
.profile-wrapper {
margin-top: 3rem;
}
2020-04-16 18:26:58 +02:00
}
2022-01-06 19:37:43 +01:00
#search-hints {
display: none;
}
#search-wrapper {
max-width: $search-max-width;
}
#search-result-wrapper {
margin-top: 3rem;
max-width: $main-content-max-width;
}
div.post-content .table-wrapper > table {
min-width: 70%;
}
2020-04-16 18:26:58 +02:00
/* button 'back-to-Top' position */
#back-to-top {
bottom: 5.5rem;
right: 5%;
2020-04-16 18:26:58 +02:00
}
#topbar-title {
text-align: left;
2020-04-16 18:26:58 +02:00
}
}
/* Pad horizontal */
@media all and (min-width: 992px) and (max-width: 1199px) {
#main .col-lg-11 {
2020-04-16 18:26:58 +02:00
flex: 0 0 96%;
max-width: 96%;
}
}
/* Compact icons in sidebar & panel hidden */
@media all and (min-width: 850px) and (max-width: 1199px) {
2020-08-19 15:18:14 +02:00
#search-results > div {
max-width: 700px;
}
2019-09-30 14:38:41 +02:00
#breadcrumb {
width: 65%;
overflow: hidden;
text-overflow: ellipsis;
word-break: keep-all;
white-space: nowrap;
}
}
/* panel hidden */
@media all and (max-width: 1199px) {
#panel-wrapper {
display: none;
2019-09-30 14:38:41 +02:00
}
2020-08-19 15:18:14 +02:00
#main > div.row {
justify-content: center !important;
}
2019-09-30 14:38:41 +02:00
}
/* --- desktop mode, both sidebar and panel are visible --- */
2019-11-25 13:56:50 +01:00
@media all and (min-width: 1200px) {
2019-09-30 14:38:41 +02:00
#back-to-top {
bottom: 6.5rem;
}
#search-wrapper {
margin-right: 4rem;
2019-09-30 14:38:41 +02:00
}
#search-input {
2020-12-18 13:54:18 +01:00
transition: all 0.3s ease-in-out;
2019-09-30 14:38:41 +02:00
}
2020-08-19 15:18:14 +02:00
#search-results > div {
width: 46%;
2021-10-25 21:04:15 +02:00
2020-02-25 10:56:03 +01:00
&:nth-child(odd) {
margin-right: 1.5rem;
}
2021-10-25 21:04:15 +02:00
2020-02-25 10:56:03 +01:00
&:nth-child(even) {
margin-left: 1.5rem;
}
2021-10-25 21:04:15 +02:00
2020-02-25 10:56:03 +01:00
&:last-child:nth-child(odd) {
position: relative;
right: 24.3%;
}
}
.post-content {
2020-02-28 17:16:47 +01:00
font-size: 1.03rem;
}
footer {
div.d-felx {
width: 85%;
}
2020-02-20 22:23:43 +01:00
}
2019-09-30 14:38:41 +02:00
}
@media all and (min-width: 1400px) {
#back-to-top {
right: calc((100vw - #{$sidebar-width} - 1140px) / 2 + 3rem);
}
}
@media all and (min-width: 1650px) {
2023-03-24 19:58:58 +01:00
$icon-gap: 1rem;
2022-10-19 20:05:29 +02:00
#main-wrapper,
footer {
2020-02-27 10:36:59 +01:00
margin-left: $sidebar-width-large;
2019-09-30 14:38:41 +02:00
}
#topbar-wrapper {
2020-02-27 10:36:59 +01:00
left: $sidebar-width-large;
}
#search-wrapper {
margin-right: calc(
#{$main-content-max-width} * 0.25 - #{$search-max-width}
);
}
#topbar,
#main,
footer > .container {
max-width: $main-content-max-width;
}
#core-wrapper,
#tail-wrapper {
padding-right: 4.5rem !important;
}
#back-to-top {
right: calc(
(100vw - #{$sidebar-width-large} - #{$main-content-max-width}) / 2 + 2rem
);
}
#sidebar {
width: $sidebar-width-large;
2023-03-24 19:58:58 +01:00
$icon-gap: 1rem; // for the bottom icons
2023-03-24 19:58:58 +01:00
.profile-wrapper {
margin-top: 3.5rem;
margin-bottom: 2.5rem;
padding-left: 3.5rem;
}
ul {
2023-03-24 19:58:58 +01:00
li.nav-item {
@include pl-pr(2.75rem);
2020-02-25 10:56:03 +01:00
}
}
2020-02-25 10:56:03 +01:00
.sidebar-bottom {
2023-03-24 19:58:58 +01:00
padding-left: 2.75rem;
margin-bottom: 1.75rem;
2023-03-24 19:58:58 +01:00
a:not(:last-child) {
margin-right: $icon-gap;
2020-02-20 18:27:28 +01:00
}
2020-02-16 20:06:38 +01:00
2020-02-25 10:56:03 +01:00
.icon-border {
2023-03-24 19:58:58 +01:00
@include ml-mr(calc(($icon-gap - $btn-border-width) / 2));
2020-02-25 10:56:03 +01:00
}
2023-03-24 19:58:58 +01:00
}
}
} /* min-width: 1650px */