feat: Rewrite in Zola

This commit is contained in:
daudix-UFO
2023-10-13 00:55:20 +00:00
parent e94ef3caf7
commit 36926a0b79
80 changed files with 2029 additions and 1588 deletions

246
sass/_comments.scss Normal file
View File

@ -0,0 +1,246 @@
section#comments {
.comment {
display: grid;
column-gap: 1rem;
grid-template-areas:
"avatar name"
"avatar time"
"avatar post"
"...... card"
"...... interactions";
grid-template-columns: min-content;
justify-items: start;
margin: 2rem auto 2rem -1rem;
padding: 1rem;
.avatar-link {
grid-area: avatar;
width: 4rem;
height: 4rem;
position: relative;
.avatar {
all: unset;
display: block;
background-color: var(--bg2);
border-radius: var(--border-radius);
box-shadow: var(--shadow);
height: 100%;
width: 100%;
}
&.op::after {
background-color: var(--accent-color);
border-radius: 50%;
bottom: -0.25rem;
color: var(--light2);
content: "";
display: block;
font-size: 1.25rem;
font-weight: bold;
height: 1.5rem;
line-height: 1.5rem;
position: absolute;
right: -0.25rem;
text-align: center;
width: 1.5rem;
}
}
.author {
align-items: center;
cursor: default;
display: flex;
font-weight: bold;
gap: 0.5rem;
grid-area: name;
.instance {
background-color: var(--fg05);
border-radius: 9999px;
color: var(--text);
font-size: smaller;
font-weight: normal;
padding: 0.25rem 0.75rem;
&:hover {
opacity: 0.8;
text-decoration: none;
}
&.op {
background-color: var(--accent-color);
color: var(--light2);
&::before {
content: "";
font-weight: bold;
margin-inline-end: 0.25rem;
margin-inline-start: -0.25rem;
}
}
}
}
time {
@extend small;
font-size: smaller;
grid-area: time;
&.edited::after {
content: " *";
}
}
main {
grid-area: post;
justify-self: stretch;
p:first-child {
margin-top: 0.25rem;
}
p:last-child {
margin-bottom: 0;
}
}
.card {
color: inherit;
grid-area: card;
max-width: 400px;
&:hover {
text-decoration: none;
}
figure {
border-radius: var(--border-radius);
background-color: var(--bg2);
box-shadow: var(--shadow);
margin-left: 0;
margin-right: 0;
overflow: hidden;
transition: var(--transition);
img {
all: unset;
display: block;
max-width: 100%;
}
&:hover {
transform: translateY(-0.5rem);
}
}
figcaption {
color: var(--text);
font-size: unset;
display: grid;
gap: 0.5rem;
margin: 0;
padding: 1rem;
text-align: left;
* {
display: inline-block;
line-height: 1.25;
margin: 0;
overflow: hidden;
padding: 0;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
Hide the card from the shared post
&:first-of-type .card {
display: none;
}
footer {
@extend small;
display: flex;
gap: 0.4rem;
grid-area: interactions;
margin-top: 0.925rem;
.boosts {
cursor: default;
font-weight: 600;
font-size: 90%;
padding: 0.4rem 1rem;
border-radius: var(--border-radius);
background-color: var(--orange-bg);
color: var(--orange-fg);
&::before {
color: var(--orange2);
content: "🔁";
margin-inline-end: 0.25rem;
}
}
.faves {
cursor: default;
font-weight: 600;
font-size: 90%;
padding: 0.4rem 1rem;
border-radius: var(--border-radius);
background-color: var(--red-bg);
color: var(--red-fg);
&::before {
color: var(--red2);
content: "❤️";
margin-inline-end: 0.25rem;
}
}
}
.emoji {
all: unset;
display: inline;
width: 1.25rem;
height: 1.25rem;
vertical-align: middle;
}
.invisible {
display: none;
}
.ellipsis::after {
content: "";
}
details {
summary {
background-image: linear-gradient(
to right,
transparent,
transparent 0.4rem,
var(--bg2) 0.4rem,
var(--bg2) calc(100% - 0.4rem),
transparent calc(100% - 0.4rem),
transparent
),
repeating-linear-gradient(
45deg,
var(--bg1),
var(--bg1) 0.3rem,
var(--accent-color) 0.3rem,
var(--accent-color) 0.6rem
);
border-radius: var(--border-radius);
cursor: pointer;
box-shadow: var(--shadow);
padding: 1rem;
}
}
}
}

0
sass/_custom.scss Normal file
View File

23
sass/_fonts.scss Normal file
View File

@ -0,0 +1,23 @@
@font-face {
font-family: "Inter";
font-weight: 100 900;
font-display: swap;
font-style: oblique italic 0deg 10deg;
src: url("/fonts/inter.woff2?v=4.0") format("woff2");
}
@font-face {
font-family: "JetBrains Mono";
font-weight: 100 900;
font-display: swap;
font-style: normal;
src: url("/fonts/jetbrains-mono.woff2?v=2.304") format("woff2");
}
@font-face {
font-family: "JetBrains Mono";
font-weight: 100 900;
font-display: swap;
font-style: italic;
src: url("/fonts/jetbrains-mono-italic.woff2?v=2.304") format("woff2");
}

47
sass/_gnome-hig.scss Normal file
View File

@ -0,0 +1,47 @@
:root {
--blue1: rgb(153, 193, 241);
--blue2: rgb(98, 160, 234);
--blue3: rgb(53, 132, 228);
--blue4: rgb(28, 113, 216);
--blue5: rgb(26, 95, 180);
--green1: rgb(143, 240, 164);
--green2: rgb(87, 227, 137);
--green3: rgb(51, 209, 122);
--green4: rgb(46, 194, 126);
--green5: rgb(38, 162, 105);
--yellow1: rgb(249, 240, 107);
--yellow2: rgb(248, 228, 92);
--yellow3: rgb(246, 211, 45);
--yellow4: rgb(245, 194, 17);
--yellow5: rgb(229, 165, 10);
--orange1: rgb(255, 190, 111);
--orange2: rgb(255, 163, 72);
--orange3: rgb(255, 120, 0);
--orange4: rgb(230, 97, 0);
--orange5: rgb(198, 70, 0);
--red1: rgb(246, 97, 81);
--red2: rgb(237, 51, 59);
--red3: rgb(224, 27, 36);
--red4: rgb(192, 28, 40);
--red5: rgb(165, 29, 45);
--purple1: rgb(220, 138, 221);
--purple2: rgb(192, 97, 203);
--purple3: rgb(145, 65, 172);
--purple4: rgb(129, 61, 156);
--purple5: rgb(97, 53, 131);
--brown1: rgb(205, 171, 143);
--brown2: rgb(181, 131, 90);
--brown3: rgb(152, 106, 68);
--brown4: rgb(134, 94, 60);
--brown5: rgb(99, 69, 44);
--light1: rgb(255, 255, 255);
--light2: rgb(246, 245, 244);
--light3: rgb(222, 221, 218);
--light4: rgb(192, 191, 188);
--light5: rgb(154, 153, 150);
--dark1: rgb(119, 118, 123);
--dark2: rgb(94, 92, 100);
--dark3: rgb(61, 56, 70);
--dark4: rgb(36, 31, 49);
--dark5: rgb(0, 0, 0);
}

528
sass/_main.scss Normal file
View File

@ -0,0 +1,528 @@
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html,
body {
font-size: 16px;
margin: 0;
padding: 0;
scroll-behavior: smooth;
scrollbar-color: var(--fg50) transparent;
accent-color: var(--accent-color);
}
@media only screen and (max-device-width: 480px) {
html,
body {
font-size: 14px;
}
}
body {
font-family: "Inter", sans-serif;
font-weight: 400;
line-height: 1.6;
color: var(--text);
background-color: var(--background);
// ⇩⇩ put footer at the bottom for short pages, such as the 404 ⇩⇩
display: grid;
min-height: 100vh;
grid-template-rows: auto minmax(auto, 1fr) auto; // header, stuff, footer
}
@media (prefers-color-scheme: dark) {
html {
background-color: var(--dark5);
}
}
::selection {
color: var(--background);
background-color: var(--accent-color);
}
:target {
scroll-margin-top: 25vh;
animation: fade-in-out var(--transition-long);
animation-delay: 1s;
}
@keyframes fade-in-out {
0% {
color: initial;
}
50% {
color: var(--accent-color);
}
100% {
color: initial;
}
}
// LAYOUT
.container {
width: 80%;
margin-left: auto;
margin-right: auto;
max-width: var(--content-width);
}
@media only screen and (max-device-width: 480px) {
// MOBILE
.container {
width: 90%;
}
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 3rem 0 1rem;
font-weight: 600;
line-height: 1.25;
}
h1 {
font-size: 2em;
}
h2 {
font-size: 1.4em;
}
a {
font-weight: 600;
text-decoration: none;
color: var(--accent-color);
cursor: pointer;
}
a:hover {
text-decoration: underline;
}
b {
font-weight: 600;
}
small {
color: var(--fg50);
}
dl {
padding: 0;
}
dl dt {
padding: 0;
margin-top: 1rem;
font-size: 1rem;
font-weight: bold;
}
dl dd {
padding: 0;
margin-bottom: 1rem;
}
hr {
margin: 3rem auto 4rem;
width: 40%;
opacity: 40%;
}
blockquote {
padding: 0 1rem;
margin-left: 0;
color: var(--fg40);
border-left: 0.3rem solid var(--fg07);
}
blockquote > :first-child {
margin-top: 0;
}
blockquote > :last-child {
margin-bottom: 0;
}
abbr {
cursor: help;
}
kbd {
background-color: var(--fg05);
border: 1px solid var(--fg07);
border-radius: 4px;
box-shadow: inset 0 -1px 0 var(--fg09);
color: var(--text);
display: inline-block;
font-size: 11px;
line-height: 10px;
padding: 3px 5px;
vertical-align: middle;
cursor: pointer;
user-select: none;
-webkit-user-select: none;
}
kbd:active {
background-color: var(--fg07);
border: 1px solid var(--fg09);
box-shadow: inset 0 0px 0 var(--fg09);
vertical-align: bottom;
}
mark {
padding: 2px 6px;
border-radius: var(--border-radius-small);
background-color: var(--marked);
color: var(--accent-color);
}
figcaption {
margin-top: -1rem;
margin-bottom: 2rem;
display: block;
text-align: center;
color: var(--fg50);
font-size: smaller;
}
details {
background-color: var(--bg2);
border-radius: var(--border-radius);
box-shadow: var(--shadow);
padding: 1rem;
&>summary {
cursor: pointer;
}
}
// TABLES
table {
border-collapse: collapse;
border-spacing: 0;
}
table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
table th {
font-weight: bold;
}
table th,
table td {
padding: 0.5rem 1rem;
border: 1px solid var(--fg05);
}
td,
th {
padding: 0;
}
// MAKE TABLES VERTICALLY ALIGNED TO THE TOP
tbody td {
vertical-align: top;
}
/* Media */
img,
video {
display: block;
margin: 2rem auto;
max-width: 100%;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
}
img {
transition: var(--transition-longer);
}
img:not(.no-hover):hover {
transform: scale(125%);
border-radius: 0;
box-shadow: var(--shadow-raised);
}
@media only screen and (max-device-width: 480px) {
// MOBILE
img:not(.no-hover):hover {
transform: scale(110%);
}
}
.full {
width: 100%;
}
.pixels {
image-rendering: crisp-edges; /* older firefox browsers */
image-rendering: pixelated;
}
.transparent {
border-radius: 0;
box-shadow: none;
}
// NAVBAR
.site-nav {
position: sticky;
top: 1rem;
z-index: 1;
width: 80%;
max-width: var(--content-width);
margin: 1rem auto;
border-radius: var(--border-radius-big);
background-color: var(--fg05);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
box-shadow: var(--shadow);
overflow: auto;
ul {
list-style-type: none;
margin: 1rem 0 0;
padding: 0;
text-align: center;
}
li {
color: var(--fg50);
display: inline-block;
}
a {
display: inline-block;
font-size: 0.9rem;
padding: 0.4rem 1rem;
border-radius: var(--border-radius);
background-color: transparent;
color: var(--fg50);
transition: var(--transition);
text-decoration: none;
}
a:hover {
background-color: var(--fg05);
color: var(--accent-color);
}
a.site-nav-title {
line-height: normal;
font-size: 1.2rem;
}
svg {
transform: translateY(-0.125rem) translateX(-0.125rem);
}
}
@media only screen and (max-device-width: 480px) {
.site-nav {
position: static;
width: 90%;
}
}
.site-nav-container {
display: block;
margin: 0.5rem 0.5rem;
position: relative;
text-align: center;
}
@media (min-width: 640px) {
.site-nav-container {
text-align: left;
}
.site-nav ul {
bottom: 0;
position: absolute;
right: 0;
}
}
/* Footer */
.site-footer {
text-align: center;
padding: 3rem 0 3rem;
font-size: 1rem;
margin-top: 4rem;
}
.site-footer {
details {
all: unset;
}
}
// LINK ARROWS
.link-page::after {
content: "";
}
.link-site::after {
content: "";
}
// CENTER LINK ICONS VERTICALLY
.link-icon {
height: 1rem;
width: 1rem;
vertical-align: middle;
}
// BUTTONS
.dialog-buttons {
display: flex;
flex-direction: row;
align-items: baseline;
justify-content: space-between;
margin-top: 6rem;
}
.inline-button {
display: inline-block;
font-size: 0.9rem;
padding: 0.4rem 1rem;
border-radius: var(--border-radius);
background-color: var(--fg05);
color: var(--text);
}
// CRT
.crt {
margin: 1rem 0 1rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
background: var(--crt-bg);
pre {
text-shadow: var(--accent-color) 0 0 12px;
color: var(--accent-color);
padding: 1rem 1rem;
margin: unset;
background-color: unset;
background-image: unset;
background-size: unset;
background-position: unset;
box-shadow: unset;
}
a {
color: var(--accent-color);
text-decoration: underline;
}
}
.cursor {
animation: blicking 1s infinite;
}
@keyframes blicking {
0% {
opacity: 1;
}
50% {
opacity: 0;
}
75% {
opacity: 1;
}
}
// CODE
pre,
code {
font-family: "JetBrains Mono", monospace;
}
pre {
line-height: normal;
margin: 1rem 0 1rem;
padding: 1rem 1rem;
border-radius: var(--border-radius);
max-width: 100vw;
overflow-x: auto;
box-shadow: var(--shadow);
background-image: linear-gradient(var(--fg03) 1px, transparent 1px),
linear-gradient(90deg, var(--fg03) 1px, transparent 1px);
background-size: 10px 10px, 10px 10px;
background-position: -1px -1px, -1px -1px;
}
pre code {
background-color: unset;
border-radius: unset;
color: unset;
padding: unset;
}
code {
padding: 2px 6px;
border-radius: var(--border-radius-small);
background-color: var(--fg07);
color: var(--red-fg);
box-shadow: none;
}
// STATEMENTS
.statement-container {
margin: 1rem 0 1rem;
padding: 1rem 1rem;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
h2 {
margin: 0 0 1rem;
}
p {
margin: 0;
}
ul {
margin: 0;
}
}
.archive {
background-color: var(--purple-bg);
color: var(--purple-fg);
}
.disclaimer {
background-color: var(--red-bg);
color: var(--red-fg);
}
.trigger {
background-color: var(--yellow-bg);
color: var(--yellow-fg);
}
.johnvertisement {
margin: 0 auto;
display: block;
width: min(728px, 100vw);
height: min(90px, 12.367vw);
border: none;
}

99
sass/_scanlines.scss Normal file
View File

@ -0,0 +1,99 @@
// REGULAR SCANLINES SETTINGS
// width of 1 scanline (min.: 1px)
$scan-width: 2px;
// emulates a damage-your-eyes bad pre-2000 CRT screen ♥ (true, false)
$scan-crt: true;
// frames-per-second (should be > 1), only applies if $scan-crt: true;
$scan-fps: 60;
// scanline-color (rgba)
$scan-color: rgba(black, 0.2);
// set z-index on 8, like in ♥ 8-bits ♥, or…
// set z-index on 2147483648 or more to enable scanlines on Chrome fullscreen (doesn't work in Firefox or IE);
// $scan-z-index: 2147483648;
// MOVING SCANLINE SETTINGS
// moving scanline (true, false)
$scan-moving-line: true;
// opacity of the moving scanline
$scan-opacity: 0.75;
// MIXINS
// apply CRT animation: @include scan-crt($scan-crt);
@mixin scan-crt($scan-crt) {
@if $scan-crt == true {
animation: scanlines 1s steps($scan-fps) infinite;
} @else {
animation: none;
}
}
// apply CRT animation: @include scan-crt($scan-crt);
@mixin scan-moving($scan-moving-line) {
@if $scan-moving-line == true {
animation: scanline 6s linear infinite;
} @else {
animation: none;
}
}
// CSS .scanlines CLASS
.scanlines {
position: relative;
overflow: hidden; // only to animate the unique scanline
&:before,
&:after {
display: block;
pointer-events: none;
content: "";
position: absolute;
}
// unique scanline travelling on the screen
&:before {
// position: absolute;
// bottom: 100%;
width: 100%;
height: $scan-width * 1;
// z-index: $scan-z-index + 1;
background: $scan-color;
opacity: $scan-opacity;
// animation: scanline 6s linear infinite;
@include scan-moving($scan-moving-line);
}
// the scanlines, so!
&:after {
top: 0;
right: 0;
bottom: 0;
left: 0;
// z-index: $scan-z-index;
background: linear-gradient(to bottom, transparent 50%, $scan-color 51%);
background-size: 100% $scan-width * 2;
@include scan-crt($scan-crt);
}
}
// ANIMATE UNIQUE SCANLINE
@keyframes scanline {
0% {
transform: translate3d(0, 200000%, 0);
// bottom: 0%; // to have a continuous scanline move, use this line (here in 0% step) instead of transform and write, in &:before, { position: absolute; bottom: 100%; }
}
}
@keyframes scanlines {
0% {
background-position: 0 50%;
// bottom: 0%; // to have a continuous scanline move, use this line (here in 0% step) instead of transform and write, in &:before, { position: absolute; bottom: 100%; }
}
}

105
sass/_variables.scss Normal file
View File

@ -0,0 +1,105 @@
@use "sass:color";
$accent-color: #ff7800;
$crt-bg-l: radial-gradient(
color.mix($accent-color, black, 30%),
color.mix($accent-color, black, 20%)
);
$crt-bg-d: radial-gradient(
color.mix($accent-color, black, 20%),
color.mix($accent-color, black, 10%)
);
$bg1-l: color.mix($accent-color, rgb(250, 250, 250), 10%);
$bg2-l: color.mix($accent-color, rgb(255, 255, 255), 20%);
$bg3-l: color.mix($accent-color, rgb(75, 75, 75), 30%);
$bg1-d: color.mix($accent-color, rgb(36, 36, 36), 15%);
$bg2-d: color.mix($accent-color, rgb(30, 30, 30), 10%);
$bg3-d: color.mix($accent-color, rgb(11, 11, 11), 5%);
$marked: color.scale($accent-color, $alpha: -80%);
:root {
// GENERAL SETUP
--accent-color: #{$accent-color};
--text: var(--dark4);
--background: var(--bg1);
--border: rgba(120, 120, 120, 0.4);
--border-radius: 0.75rem;
--border-radius-big: 1.2rem;
--border-radius-small: 0.5rem;
--content-width: 720px;
// CUSTOM COLOR PALETTE
--bg1: #{$bg1-l};
--bg2: #{$bg2-l};
--bg3: #{$bg3-l};
--fg01: rgba(0, 0, 0, 0.01);
--fg03: rgba(0, 0, 0, 0.03);
--fg05: rgba(0, 0, 0, 0.05);
--fg07: rgba(0, 0, 0, 0.07);
--fg09: rgba(0, 0, 0, 0.09);
--fg40: rgba(0, 0, 0, 0.4);
--fg50: rgba(0, 0, 0, 0.5);
--purple-bg: rgba(145, 65, 172, 0.1);
--purple-fg: rgb(145, 65, 172);
--red-bg: rgba(224, 27, 36, 0.1);
--red-fg: rgb(224, 27, 36);
--yellow-bg: rgba(156, 110, 3, 0.1);
--yellow-fg: rgb(156, 110, 3);
--orange-bg: rgba(255, 120, 0, 0.1);
--orange-fg: rgb(255, 120, 0);
--crt-bg: #{$crt-bg-l};
--marked: #{$marked};
// CUSTOM VARIABLES
--shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 3px 1px rgba(0, 0, 0, 0.07),
0 2px 6px 2px rgba(0, 0, 0, 0.03);
--shadow-raised: 0 0 0 1px rgba(0, 0, 0, 0.06),
0 2px 6px 2px rgba(0, 0, 0, 0.14), 0 4px 12px 4px rgba(0, 0, 0, 0.06);
--drop-shadow: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07))
drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06));
--transition: 200ms;
--transition-longer: 400ms;
--transition-long: 800ms;
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--text: var(--light2);
--background: var(--bg3);
--fg01: rgba(255, 255, 255, 0.01);
--fg03: rgba(255, 255, 255, 0.03);
--fg05: rgba(255, 255, 255, 0.05);
--fg07: rgba(255, 255, 255, 0.07);
--fg09: rgba(255, 255, 255, 0.09);
--fg40: rgba(255, 255, 255, 0.4);
--fg50: rgba(255, 255, 255, 0.5);
--bg1: #{$bg1-d};
--bg2: #{$bg2-d};
--bg3: #{$bg3-d};
--purple-bg: rgba(220, 138, 221, 0.1);
--purple-fg: rgb(220, 138, 221);
--red-bg: rgba(226, 97, 81, 0.1);
--red-fg: rgb(246, 97, 81);
--yellow-bg: rgba(248, 228, 92, 0.1);
--yellow-fg: rgb(248, 228, 92);
--orange-bg: rgba(255, 190, 111, 0.1);
--orange-fg: rgb(255, 190, 111);
--crt-bg: #{$crt-bg-d};
}
}

21
sass/style.scss Normal file
View File

@ -0,0 +1,21 @@
/*
Duckquill
====================
based on OS Component Website which shamelessly stolen CSS from systemd
https://github.com/jimmac/os-component-website
https://github.com/systemd/systemd/tree/main/docs
scanlines.scss are taken from https://codepen.io/meduzen/pen/zxbwRV
*/
@use "variables";
@use "gnome-hig";
@use "fonts";
@use "main";
@use "comments";
@use "scanlines";
@use "custom";
@import "syntax-theme-dark.css" (prefers-color-scheme: dark);
@import "syntax-theme-light.css" (prefers-color-scheme: light);