diff --git a/theme/css/chrome.css b/theme/css/chrome.css new file mode 100644 index 00000000..9a61468b --- /dev/null +++ b/theme/css/chrome.css @@ -0,0 +1,556 @@ +:root { + /* Color */ + --color-primary: #f8bb71; + --color-surface-tint: #f8bb71; + --color-on-primary: #472a00; + --color-primary-container: #653e00; + --color-on-primary-container: #ffddb8; + --color-secondary: #dfc2a2; + --color-on-secondary: #3f2d17; + --color-secondary-container: #57432b; + --color-on-secondary-container: #fcddbd; + --color-tertiary: #bbcd9e; + --color-on-tertiary: #273513; + --color-tertiary-container: #3d4c28; + --color-on-tertiary-container: #d7e9b9; + --color-error: #ffb4ab; + --color-on-error: #690005; + --color-error-container: #93000a; + --color-on-error-container: #ffdad6; + --color-background: #18120c; + --color-on-background: #eee0d4; + --color-surface: #18120c; + --color-on-surface: #eee0d4; + --color-surface-variant: #504539; + --color-on-surface-variant: #d4c4b5; + --color-outline: #9c8e80; + --color-outline-variant: #504539; + --color-shadow: #000000; + --color-scrim: #000000; + --color-inverse-surface: #eee0d4; + --color-inverse-on-surface: #372f27; + --color-inverse-primary: #825513; + --color-primary-fixed: #ffddb8; + --color-on-primary-fixed: #2a1700; + --color-primary-fixed-dim: #f8bb71; + --color-on-primary-fixed-variant: #653e00; + --color-secondary-fixed: #fcddbd; + --color-on-secondary-fixed: #281805; + --color-secondary-fixed-dim: #dfc2a2; + --color-on-secondary-fixed-variant: #57432b; + --color-tertiary-fixed: #d7e9b9; + --color-on-tertiary-fixed: #121f02; + --color-tertiary-fixed-dim: #bbcd9e; + --color-on-tertiary-fixed-variant: #3d4c28; + --color-surface-dim: #18120c; + --color-surface-bright: #403830; + --color-surface-container-lowest: #130d07; + --color-surface-container-low: #211a13; + --color-surface-container: #251e17; + --color-surface-container-high: #302921; + --color-surface-container-highest: #3b332b; + + /* Stuff */ + --menu-bar-height: 6rem; + --sidebar-width: 36rem; + --font-family: 'Rubik', sans-serif; +} + + + +* { + box-sizing: border-box; +} + +body { + background-color: var(--color-surface-container-low); + font-family: var(--font-family); +} + +.flex-spacer { + flex-grow: 1; +} + +.page-wrapper { + display: flex; + flex-direction: column; + background-color: var(--color-surface-container-low); +} + +.page-inner { + min-height: 100%; + display: flex; + flex-direction: row; + overflow: visible; +} + +.page { + flex: 1; + margin-top: 0; + padding: 2rem; + overflow: hidden; + background-color: var(--color-background); + border-radius: 0 0 0 0; +} + +@media (max-width: 1000px) { + .page { + width: 100vw; + min-width: 100vw; + filter: brightness(1); + } + + #sidebar-toggle-anchor:checked + .page-wrapper .page { + filter: brightness(0.8); + } +} + +.no-js .page { + transition: border-radius 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s cubic-bezier(0.16, 1, 0.3, 1); +} + +.sidebar-loaded .page { + transition: border-radius 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s cubic-bezier(0.16, 1, 0.3, 1); +} + +/* When checked */ +#sidebar-toggle-anchor:checked + .page-wrapper .page { + border-radius: 2rem 0 0 0; +} + +.menu-bar { + display: flex; + position: sticky; + top: 0; + padding: 1rem 2rem; + height: var(--menu-bar-height); + background-color: var(--color-surface-container-low); + overflow: hidden; +} + +.menu-bar-logo-link { + display: flex; + gap: 1rem; + align-items: center; + height: 100%; + text-decoration: none; +} + +.menu-bar-logo { + height: 100%; +} + +.menu-bar-title { + margin: 0; + font-size: 2.4rem; + font-weight: bold; + color: var(--color-on-surface); + user-select: none; +} + +.menu-bar-title-gradient { + background: linear-gradient(45deg, #f59e0b 0%, #ef4444 100%); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + +.menu-bar-inner { + display: flex; + gap: 1rem; + height: 100%; + align-items: center; + overflow: hidden; +} + +.menu-bar-left { + width: 20%; + min-width: calc(var(--sidebar-width) - 2rem); + padding-right: calc(20% - var(--sidebar-width)); +} + +.menu-bar-center { + flex-grow: 1; + overflow: hidden; + justify-content: center; +} + +.menu-bar-right { + width: 20%; + min-width: calc(var(--sidebar-width) - 2rem); + justify-content: end; +} + +label[for="search-toggle-anchor"].menu-bar-button { + display: none; +} + +@media (max-width: 1200px) { + .menu-bar-right { + width: auto; + min-width: 0; + } + .menu-bar-left { + flex-grow: 1; + width: auto; + min-width: 0; + } + .menu-bar-center { + display: none; + } + label[for="search-toggle-anchor"].menu-bar-button { + display: flex; + } + +} + +.menu-bar-search-box { + display: flex; + align-items: center; + width: 60rem; + height: calc(100% - 0.5rem); + padding: 0.25rem 1rem; + background-color: var(--color-surface-container); + color: var(--color-on-surface); + border-radius: 1rem; + font-size: 1.6rem; + overflow: hidden; + cursor: pointer; + transition: background-color 0.2s; +} + +.menu-bar-search-box:hover { + background-color: var(--color-surface-container-high); +} + +.menu-bar-search-box:active { + background-color: var(--color-surface-container-highest); +} + +.menu-bar-search-box svg { + height: 100%; + padding: 0.5rem; +} + +.menu-bar-search-box-shortcut { + font-size: 1.2rem; + opacity: 0.5; + user-select: none; + padding: 0 1rem; +} + +.no-js .menu-bar-search-box-shortcut { + display: none; +} + +@media (max-width: 600px) { + .menu-bar-title { + font-size: 2rem; + } +} + +.menu-bar-button { + display: flex; + align-items: center; + justify-content: center; + width: 3rem; + height: 3rem; + background-color: var(--color-surface-container); + border-radius: 0.25rem; + border: none; + cursor: pointer; + transition: background-color 0.2s; + color: var(--color-on-surface); + text-decoration: none; + overflow: hidden; +} + +.menu-bar-button:hover { + background-color: var(--color-surface-container-high); +} + +.menu-bar-button:active { + background-color: var(--color-surface-container-highest); +} + +.menu-bar-button svg { + padding: 0.25rem; +} + +.menu-bar-divider { + width: 0.25rem; + height: 2rem; + background-color: var(--color-outline); + opacity: 0.5; +} + +.sidebar { + position: sticky; + top: var(--menu-bar-height); + width: 0; + height: calc(100vh - var(--menu-bar-height)); + transform: translateX(calc(var(--sidebar-width) * -1)); + will-change: width, transform; + flex-shrink: 0; +} + +.no-js .sidebar { + transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); +} + +.sidebar-loaded .sidebar { + transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); +} + +#sidebar-toggle-anchor:checked + .page-wrapper .sidebar { + width: var(--sidebar-width); + transform: translateX(0); +} + +.sidebar-inner { + display: flex; + gap: 1rem; + flex-direction: column; + width: var(--sidebar-width); + min-width: var(--sidebar-width); + padding: 1rem 2rem 4rem 2rem; + overflow: scroll; + overflow-x: hidden; +} + +.sidebar-title { + text-transform: uppercase; + text-decoration: none; + font-size: 1.4rem; + font-weight: bold; + color: var(--color-on-surface); + opacity: 0.5; +} + +.chapter { + display: flex; + flex-direction: column; + width: 100%; + list-style: none outside none; + margin: 0; + padding: 0; + text-decoration: none; + font-size: 1.6rem; + color: var(--color-on-surface); +} + +.chapter .section { + list-style: none outside none; + text-decoration: none; + padding: 0 0 0 2rem; + color: var(--color-on-surface); +} + +.chapter li { + display: none; +} + +.chapter li.chapter-item.expanded + li { + display: flex; +} + + +.chapter li.chapter-item { + display: flex; + justify-content: space-between; + margin-block-start: 0.6rem; +} + +.chapter li.chapter-item a { + text-decoration: none; + color: var(--color-on-surface); +} + +/* When a tag has class .active */ +.chapter li.chapter-item a.active { + font-weight: bold; + color: var(--color-primary); +} + +.chapter li.chapter-item .toggle { + color: var(--color-on-surface); + opacity: 0.5; + user-select: none; +} + +.chapter li.chapter-item.expanded .toggle { + transform: rotate(90deg); +} + +.search-overlay { + display: flex; + pointer-events: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 10rem; + background-color: rgba(0, 0, 0, 0.5); + z-index: 1000; + justify-content: center; + align-items: top; + overflow: hidden; + backdrop-filter: blur(0px); + opacity: 0; + transition: opacity 0.3s, pointer-events 0.3s; +} + +#search-toggle-anchor:checked + .search-overlay { + pointer-events: auto; + opacity: 1; + backdrop-filter: blur(5px); +} + +.search-overlay-inner { + display: flex; + flex-direction: column; + width: 80rem; + max-height: 40rem; + height: max-content; + transform: scale(0.95); + transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); + background-color: var(--color-surface-container); + border-radius: 1rem; + overflow: hidden; +} + +#search-toggle-anchor:checked + .search-overlay .search-overlay-inner { + transform: scale(1); +} + +.searchbar-outer { + display: flex; + width: 100%; + height: 5rem; + color: var(--color-on-surface); +} + +.searchbar-outer svg { + height: 100%; + padding: 1.25rem; +} + +.searchbar-outer input { + display: flex; + align-items: center; + flex-grow: 1; + border: none; + height: 100%; + width: 100%; + padding: 1rem 0; + outline: none; + background-color: transparent; + font-family: var(--font-family); + color: var(--color-on-surface); +} + +.searchbar-outer input::placeholder { + color: var(--color-on-surface); + opacity: 0.5; +} + +.searchresults-outer { + padding: 2rem; + color: var(--color-on-surface); + overflow: scroll; +} + +.searchresults-outer > div { + opacity: 0.5; +} + +#searchresults { + margin: 0; + display: flex; + flex-direction: column; + list-style: none; + gap: 1rem; + padding: 0; +} + +#searchresults:not(:empty) { + padding: 2rem 0 0 0; +} + +#searchresults li a { + display: flex; + flex-direction: column; + padding: 1rem; + border-radius: 0.5rem; + background-color: var(--color-surface-container); + text-decoration: none; + color: var(--color-on-surface); + transition: background-color 0.2s; +} + +#searchresults li.active a { + background-color: var(--color-surface-container-high); +} + +#searchresults li :hover { + background-color: var(--color-surface-container-high); +} + +#searchresults li a:focus-within { + background-color: var(--color-surface-container-highest); +} + +#searchresults li a:active { + background-color: var(--color-surface-container-highest); +} + +#searchresults li .teaser { + display: none; +} + +@media (max-width: 800px) { + .search-overlay { + padding: 2rem; + } +} + + +/* Stupid thing puts stupid pseudo-elements in the way */ +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; + appearance: none; +} + +input[type="search"]::-ms-clear { + display: none; + width: 0; + height: 0; +} + +input[type="search"]::-ms-reveal { + display: none; + width: 0; + height: 0; +} + +input[type="search"]::-moz-cancel { + display: none; + width: 0; + height: 0; +} + +/* Text stuff */ +:not(pre) > .hljs { + display: inline; +} + +pre > code { + padding: 1rem; +} + +/* These don't work anyway :/ */ +pre > .buttons { + display: none; + pointer-events: none; +} \ No newline at end of file diff --git a/theme/css/general.css b/theme/css/general.css index d3959c92..6d1e487b 100644 --- a/theme/css/general.css +++ b/theme/css/general.css @@ -9,7 +9,6 @@ } html { - font-family: "Open Sans", sans-serif; color: var(--fg); background-color: var(--bg); text-size-adjust: none; @@ -92,6 +91,9 @@ h6:target::before { box-sizing: border-box; background-color: var(--bg); } +.sidebar { + display: flex; +} .no-js .page-wrapper, .js:not(.sidebar-resizing) .page-wrapper { transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */ diff --git a/theme/css/variables.css b/theme/css/variables.css index 4ea8e2c2..d2bc6922 100644 --- a/theme/css/variables.css +++ b/theme/css/variables.css @@ -6,7 +6,7 @@ --content-max-width: 750px; --menu-bar-height: 50px; --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace; - --code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */ + --code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */; } .hljs { diff --git a/theme/fonts/Rubik-Black.ttf b/theme/fonts/Rubik-Black.ttf new file mode 100644 index 00000000..055ad220 Binary files /dev/null and b/theme/fonts/Rubik-Black.ttf differ diff --git a/theme/fonts/Rubik-BlackItalic.ttf b/theme/fonts/Rubik-BlackItalic.ttf new file mode 100644 index 00000000..308529cb Binary files /dev/null and b/theme/fonts/Rubik-BlackItalic.ttf differ diff --git a/theme/fonts/Rubik-Bold.ttf b/theme/fonts/Rubik-Bold.ttf new file mode 100644 index 00000000..1a9693d9 Binary files /dev/null and b/theme/fonts/Rubik-Bold.ttf differ diff --git a/theme/fonts/Rubik-BoldItalic.ttf b/theme/fonts/Rubik-BoldItalic.ttf new file mode 100644 index 00000000..abf76043 Binary files /dev/null and b/theme/fonts/Rubik-BoldItalic.ttf differ diff --git a/theme/fonts/Rubik-ExtraBold.ttf b/theme/fonts/Rubik-ExtraBold.ttf new file mode 100644 index 00000000..3b1e1903 Binary files /dev/null and b/theme/fonts/Rubik-ExtraBold.ttf differ diff --git a/theme/fonts/Rubik-ExtraBoldItalic.ttf b/theme/fonts/Rubik-ExtraBoldItalic.ttf new file mode 100644 index 00000000..59cd7586 Binary files /dev/null and b/theme/fonts/Rubik-ExtraBoldItalic.ttf differ diff --git a/theme/fonts/Rubik-Italic.ttf b/theme/fonts/Rubik-Italic.ttf new file mode 100644 index 00000000..1683a763 Binary files /dev/null and b/theme/fonts/Rubik-Italic.ttf differ diff --git a/theme/fonts/Rubik-Light.ttf b/theme/fonts/Rubik-Light.ttf new file mode 100644 index 00000000..8a5a50ab Binary files /dev/null and b/theme/fonts/Rubik-Light.ttf differ diff --git a/theme/fonts/Rubik-LightItalic.ttf b/theme/fonts/Rubik-LightItalic.ttf new file mode 100644 index 00000000..b028d93c Binary files /dev/null and b/theme/fonts/Rubik-LightItalic.ttf differ diff --git a/theme/fonts/Rubik-Medium.ttf b/theme/fonts/Rubik-Medium.ttf new file mode 100644 index 00000000..f0bd5958 Binary files /dev/null and b/theme/fonts/Rubik-Medium.ttf differ diff --git a/theme/fonts/Rubik-MediumItalic.ttf b/theme/fonts/Rubik-MediumItalic.ttf new file mode 100644 index 00000000..1a7d7f9f Binary files /dev/null and b/theme/fonts/Rubik-MediumItalic.ttf differ diff --git a/theme/fonts/Rubik-Regular.ttf b/theme/fonts/Rubik-Regular.ttf new file mode 100644 index 00000000..8b7b632f Binary files /dev/null and b/theme/fonts/Rubik-Regular.ttf differ diff --git a/theme/fonts/Rubik-SemiBold.ttf b/theme/fonts/Rubik-SemiBold.ttf new file mode 100644 index 00000000..26f657de Binary files /dev/null and b/theme/fonts/Rubik-SemiBold.ttf differ diff --git a/theme/fonts/Rubik-SemiBoldItalic.ttf b/theme/fonts/Rubik-SemiBoldItalic.ttf new file mode 100644 index 00000000..88729833 Binary files /dev/null and b/theme/fonts/Rubik-SemiBoldItalic.ttf differ diff --git a/theme/fonts/fonts.css b/theme/fonts/fonts.css new file mode 100644 index 00000000..d78ef921 --- /dev/null +++ b/theme/fonts/fonts.css @@ -0,0 +1,98 @@ +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Light.ttf) format('truetype'); + font-weight: 300; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Light.ttf) format('truetype'); + font-weight: 300; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Regular.ttf) format('truetype'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Regular.ttf) format('truetype'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Medium.ttf) format('truetype'); + font-weight: 500; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Medium.ttf) format('truetype'); + font-weight: 500; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-SemiBold.ttf) format('truetype'); + font-weight: 600; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-SemiBold.ttf) format('truetype'); + font-weight: 600; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Bold.ttf) format('truetype'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Bold.ttf) format('truetype'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-ExtraBold.ttf) format('truetype'); + font-weight: 800; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-ExtraBold.ttf) format('truetype'); + font-weight: 800; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Black.ttf) format('truetype'); + font-weight: 900; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Rubik'; + src: url(/fonts/Rubik-Black.ttf) format('truetype'); + font-weight: 900; + font-style: italic; + font-display: swap; +} \ No newline at end of file diff --git a/theme/index.hbs b/theme/index.hbs index 0dc853cf..ddaf742c 100644 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -1,59 +1,64 @@ -
- - -