Files
datascape/assets/style.css
T
2026-05-23 08:44:19 +02:00

1042 lines
19 KiB
CSS

/* === Fonts === */
@font-face {
font-family: "Iosevka Etoile";
src: url("/_/fonts/IosevkaEtoile.woff2") format("woff2");
font-display: swap;
}
@font-face {
font-family: "Iosevka Slab";
src: url("/_/fonts/IosevkaSlab.woff2") format("woff2");
font-display: swap;
}
/* === Theme === */
:root {
--bg: #2e2e2e;
--bg-panel: #434343;
--bg-panel-hover: #585858;
--text: #e6e6e6;
--text-muted: #cfcfcf;
--primary: #87458a;
--primary-hover: #d64d95;
--secondary: #c48401;
--link: #01b6c4;
--link-hover: #d6d24d;
--danger: #c40141;
--danger-hover: #d03467;
}
/* === Base === */
body {
background-color: var(--bg);
min-height: 100vh;
margin: 0;
overflow: auto;
padding: 0;
color: var(--text);
font:
1rem "Iosevka Etoile",
monospace;
display: flex;
flex-direction: column;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === Links === */
a {
color: var(--text);
text-decoration: none;
}
a:hover {
color: var(--primary-hover);
}
.content a {
color: var(--link);
}
.content a:hover {
color: var(--link-hover);
}
/* Broken wiki link: target folder does not exist */
.content a.broken {
color: var(--primary-hover);
text-decoration: line-through;
}
.content a.broken:hover {
color: var(--link-hover);
}
/* === Header ===
Three-column grid (breadcrumbs left, search centre, actions right) using
named grid-areas so the centre stays reserved even when search is hidden
in editor mode. Mobile (≤1100px) collapses to a two-row layout — see the
responsive block at the bottom of this file. */
header {
padding: 0.75rem 1rem;
border-bottom: 1px dashed var(--secondary);
display: grid;
grid-template-columns: 1fr minmax(0, auto) 1fr;
grid-template-areas: "crumbs search actions";
align-items: center;
gap: 0.5rem;
}
.breadcrumb {
grid-area: crumbs;
display: flex;
align-items: center;
gap: 0.25rem;
min-width: 0;
}
.header-actions {
grid-area: actions;
display: flex;
align-items: center;
gap: 0.5rem;
justify-content: flex-end;
flex-wrap: wrap;
}
.logo {
width: 1.1em;
height: 1.1em;
vertical-align: center;
}
.nav-up {
display: inline-flex;
align-items: center;
color: var(--secondary);
padding: 0 0.25rem;
}
.nav-up:hover {
color: var(--primary-hover);
}
.btn {
background: none;
border: none;
color: var(--text);
font: inherit;
cursor: pointer;
padding: 0;
text-decoration: none;
display: inline-block;
white-space: nowrap;
}
.btn::before {
content: "[";
color: var(--secondary);
}
.btn::after {
content: "]";
color: var(--secondary);
}
.btn:hover {
color: var(--primary-hover);
}
/* === Button modifiers === */
/* For inline buttons */
.btn-small {
font-size: 0.65rem;
font-weight: normal;
vertical-align: middle;
}
/* For toolbars */
.btn-tool {
font-size: 0.85rem;
padding: 0 0.15rem;
}
/* Destructive action */
.danger {
color: var(--danger);
}
.danger:hover {
color: var(--danger-hover);
}
/* === Page wrap ===
Note: sticky positioning on .sidebar depends on no ancestor having
overflow: auto/hidden. If you add scroll containment above this, sticky
will silently break. */
.page-wrap {
display: grid;
grid-template-columns: minmax(0, 1fr) 14rem;
gap: 1.5rem;
max-width: 1280px;
margin: 0 auto;
padding: 0 1rem;
width: 100%;
flex: 1;
align-items: start;
}
/* === Main === */
main {
padding: 1.5rem 1rem;
width: 100%;
flex: 1;
min-width: 0;
}
/* === Markdown content === */
.content {
margin-bottom: 2rem;
}
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
color: var(--text);
margin: 1.25rem 0 0.5rem;
line-height: 1.3;
}
.content h1 {
font-size: 1.75rem;
border-bottom: 1px dashed var(--secondary);
padding-bottom: 0.25rem;
}
.content h2 {
font-size: 1.4rem;
}
.content h3 {
font-size: 1.15rem;
}
.content p {
margin: 0.75rem 0;
}
.content ul,
.content ol {
margin: 0.75rem 0 0.75rem 1.5rem;
}
.content li {
margin: 0.25rem 0;
}
.content blockquote {
border-left: 3px solid var(--secondary);
padding: 0.25rem 1rem;
color: var(--text-muted);
margin: 0.75rem 0;
}
.content code {
font-family: "Iosevka Etoile", monospace;
font-size: 0.875em;
background: var(--bg-panel);
padding: 0.1em 0.35em;
}
.content pre {
background: var(--bg-panel);
border: 1px solid var(--secondary);
padding: 1rem;
overflow-x: auto;
margin: 0.75rem 0;
}
.content pre code {
background: none;
padding: 0;
}
.content table {
width: 100%;
border-collapse: collapse;
margin: 0.75rem 0;
font-size: 0.9rem;
}
.content th,
.content td {
border: 1px solid var(--secondary);
padding: 0.4rem 0.75rem;
text-align: left;
}
.content th {
background: var(--bg-panel);
color: var(--text);
}
.content hr {
border: none;
border-top: 1px dashed var(--secondary);
margin: 1.5rem 0;
}
.content img {
max-width: 100%;
}
.dropdown.heading-anchor {
margin-right: 0.4em;
font-weight: normal;
}
.heading-anchor .dropdown-toggle {
background: none;
border: none;
padding: 0;
cursor: pointer;
color: var(--text-muted);
font: inherit;
font-weight: normal;
}
.heading-anchor .dropdown-toggle:hover {
color: var(--primary-hover);
}
/* === File listing === */
.listing {
border: 1px solid var(--secondary);
}
main > h2 {
color: var(--text);
margin: 1.25rem 0 0.5rem;
line-height: 1.3;
font-size: 1.4rem;
}
.listing-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.6rem 1rem;
font-size: 0.95rem;
}
.listing-item + .listing-item {
border-top: 1px solid var(--secondary);
}
.listing-item:hover {
background: var(--bg-panel-hover);
}
.listing-item .icon {
width: 1.25rem;
text-align: center;
flex-shrink: 0;
}
.listing-item a {
flex: 1;
overflow-wrap: anywhere;
color: inherit;
}
.listing-item .meta {
color: var(--text-muted);
font-size: 0.8rem;
white-space: nowrap;
}
/* === Editor toolbar === */
.editor-toolbar {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
border: 1px solid var(--secondary);
border-bottom: none;
padding: 0.4rem 0.6rem;
background: var(--bg-panel-hover);
}
.toolbar-sep {
width: 1px;
background: var(--secondary);
margin: 0 0.2rem;
align-self: stretch;
}
/* === Dropdowns === */
.dropdown {
position: relative;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
display: none;
z-index: 100;
background: var(--bg-panel);
border: 1px solid var(--secondary);
min-width: 9rem;
}
.dropdown-menu.align-right {
left: auto;
right: 0;
}
.dropdown-menu.open-up {
top: auto;
bottom: 100%;
margin-bottom: 0.4rem;
}
.dropdown-menu.is-open {
display: block;
}
.dropdown-menu.scrollable {
max-height: 14rem;
overflow-y: auto;
}
/* === Floating action button === */
.fab {
position: fixed;
bottom: 1rem;
right: 1rem;
z-index: 50;
}
/* Standalone FAB buttons (page TOC) are mobile-only.
Wrapped FABs (search actions dropdown) stay visible on desktop. */
button.fab {
display: none;
}
.btn-fab {
background: var(--bg-panel);
border: 1px solid var(--secondary);
width: 3rem;
height: 3rem;
font-size: 1.5rem;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
}
.btn-fab::before,
.btn-fab::after {
content: none;
}
.btn-fab:hover {
background: var(--bg-panel-hover);
color: var(--primary-hover);
}
.btn-block {
display: flex;
justify-content: space-between;
align-items: baseline;
width: 100%;
border: none;
border-radius: 0;
padding: 0.3rem 0.75rem;
white-space: nowrap;
box-sizing: border-box;
}
/* === Edit form === */
.edit-form {
display: flex;
flex-direction: column;
}
body.editor-wide .page-wrap {
max-width: none;
}
textarea {
width: 100%;
min-height: 60vh;
background: var(--bg);
border: 1px solid var(--secondary);
border-top: none;
color: var(--text);
font-family: "Iosevka Slab", monospace;
font-size: 0.9rem;
line-height: 1.6;
padding: 1rem;
resize: vertical;
outline: none;
box-sizing: border-box;
}
/* === Search === */
.search-form {
grid-area: search;
display: flex;
gap: 0.25rem;
position: relative;
justify-self: center;
width: 24rem;
max-width: 100%;
}
.search-input {
background: var(--bg-panel);
border: 1px solid var(--secondary);
color: var(--text);
font: inherit;
font-size: 0.9rem;
padding: 0.3rem 0.5rem;
min-width: 0;
width: 100%;
max-width: 100%;
outline: none;
}
.search-input:focus {
border-color: var(--primary-hover);
}
/* === Suggestion dropdown (header + editor link picker) ===
Anchored to a position:relative host (search-form, or the modal body
for the link picker). Visuals mirror .dropdown-menu — dashed border,
bg-panel-hover for the active row. */
.suggest-host {
position: relative;
}
.suggest-dropdown {
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 200;
background: var(--bg-panel);
border: 1px dashed var(--secondary);
border-top: none;
display: none;
}
.suggest-dropdown.is-open {
display: block;
}
.suggest-row {
display: flex;
flex-direction: column;
gap: 0.1rem;
padding: 0.4rem 0.6rem;
cursor: pointer;
border: none;
background: none;
color: inherit;
font: inherit;
text-align: left;
width: 100%;
}
.suggest-row + .suggest-row {
border-top: 1px solid var(--secondary);
}
.suggest-row:hover,
.suggest-row.is-active {
background: var(--bg-panel-hover);
}
.suggest-row.is-empty {
color: var(--text-muted);
cursor: default;
}
.suggest-row.is-empty:hover {
background: none;
}
.suggest-name {
color: var(--text);
}
.suggest-path {
color: var(--text-muted);
font-size: 0.8rem;
}
.suggest-footer {
color: var(--link);
font-size: 0.85rem;
}
.search-card {
display: flex;
flex-direction: column;
gap: 0.25rem;
padding-bottom: 1rem;
margin-bottom: 1rem;
border-bottom: 1px dashed var(--secondary);
word-break: break-word;
}
.search-card:last-child {
border-bottom: none;
}
.search-card a {
color: var(--link);
font-size: 1.1rem;
}
.search-card a:hover {
color: var(--link-hover);
}
/* === Muted text === */
.muted {
color: var(--text-muted);
font-size: 0.85rem;
}
/* === Page footer === */
footer {
padding: 0.75rem 1rem;
border-top: 1px dashed var(--secondary);
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
/* === Companion status === */
.companion-status {
margin-left: auto;
}
.companion-icon {
font-size: 0.9rem;
line-height: 1;
padding: 0.1rem 0.3rem;
}
.companion-on {
color: var(--link);
}
.companion-off {
color: var(--text-muted);
}
.companion-flyout {
min-width: 14rem;
padding: 0.4rem;
}
.companion-line {
padding: 0.25rem 0.5rem;
font-size: 0.85rem;
}
/* === Task lists === */
.content li:has(> input.task-checkbox:checked) {
color: var(--text-muted);
text-decoration: line-through;
}
/* === Photo grid === */
.photo-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 0.4rem;
margin-top: 0.75rem;
}
.photo-grid a {
display: block;
line-height: 0;
}
.photo-grid img {
width: 100%;
height: 140px;
object-fit: cover;
display: block;
background: var(--bg-panel) url("/_/icons/thumb-placeholder.svg") center/2rem no-repeat;
}
/* === Empty state === */
.empty {
padding: 1rem;
text-align: center;
}
/* === hr === */
hr {
border: none;
border-top: 1px dashed var(--secondary);
margin: 1rem 0;
}
/* === Scrollbars === */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: #111;
}
::-webkit-scrollbar-thumb {
background: var(--primary);
}
::-webkit-scrollbar-thumb:hover {
background: var(--primary-hover);
}
/* === Sidebar === */
.sidebar {
position: sticky;
top: 1rem;
align-self: start;
max-height: calc(100vh - 2rem);
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 1rem;
margin-top: 1.5rem;
}
aside.sidebar:empty {
display: none;
}
/* Panels share visual treatment when inside the sidebar */
.actions,
.sidebar .toc,
.sidebar .diary-cal {
position: static;
top: auto;
left: auto;
right: auto;
width: auto;
max-height: none;
border: 1px solid var(--secondary);
background: var(--bg);
padding: 0.5rem 0.75rem;
font-size: 0.85rem;
}
.actions {
display: flex;
flex-direction: column;
gap: 0.15rem;
}
/* === Table of contents === */
.toc {
position: fixed;
top: 1rem;
right: 1rem;
width: 14rem;
max-height: calc(100vh - 6rem);
overflow-y: auto;
border: 1px solid var(--secondary);
background: var(--bg);
padding: 0.5rem 0.75rem;
font-size: 0.85rem;
}
.panel-header {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
border-bottom: 1px dashed var(--secondary);
padding-bottom: 0.25rem;
margin-bottom: 0.4rem;
}
.toc ul {
list-style: none;
margin: 0;
padding: 0;
}
.toc li {
margin: 0.15rem 0;
}
.toc a {
color: var(--link);
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.toc a:hover {
color: var(--link-hover);
}
.toc-h3 {
padding-left: 0.8rem;
}
.toc-h4 {
padding-left: 1.6rem;
}
/* === Modal === */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: flex-start;
justify-content: center;
z-index: 1000;
padding: 1rem;
}
.modal {
background: var(--bg-panel);
border: 1px solid var(--secondary);
width: 100%;
max-width: 500px;
display: flex;
flex-direction: column;
margin-top: 6rem;
position: relative;
}
.modal.is-dragged {
margin: 0;
}
.modal-header {
padding: 0.6rem 1rem;
border-bottom: 1px dashed var(--secondary);
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text);
cursor: move;
user-select: none;
}
.modal-body {
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
word-break: break-word;
}
.modal-footer {
padding: 0.6rem 1rem;
border-top: 1px dashed var(--secondary);
display: flex;
justify-content: space-between;
gap: 0.5rem;
}
.modal-input {
width: 100%;
background: var(--bg);
border: 1px solid var(--secondary);
color: var(--text);
font: inherit;
font-family: "Iosevka Slab", monospace;
padding: 0.4rem 0.6rem;
outline: none;
}
.modal-checkbox {
display: flex;
align-items: center;
gap: 0.5rem;
}
/* === Tree picker === */
.tree-picker {
max-height: 60vh;
overflow-y: auto;
border: 1px solid var(--secondary);
background: var(--bg);
}
.tree-row {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.4rem 0.5rem;
cursor: pointer;
min-height: 2rem;
}
.tree-row:hover {
background: var(--bg-panel-hover);
}
.tree-row.is-selected {
background: var(--bg-panel-hover);
border-left: 3px solid var(--primary);
padding-left: calc(0.5rem - 3px);
}
.tree-row.is-disabled {
color: var(--text-muted);
cursor: default;
}
.tree-row.is-disabled:hover {
background: none;
}
.tree-chevron {
width: 1.25rem;
text-align: center;
color: var(--secondary);
flex-shrink: 0;
}
.tree-chevron.is-leaf {
visibility: hidden;
}
.tree-marker {
width: 1rem;
text-align: center;
color: var(--text-muted);
flex-shrink: 0;
}
.tree-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tree-children {
padding-left: 1.5rem;
}
.tree-selected-path {
font-size: 0.85rem;
padding: 0.25rem 0;
word-break: break-all;
}
/* === Movie info box === */
.movie-info {
margin: 0.75rem 0;
}
.movie-info::after {
content: "";
display: block;
clear: both;
}
.movie-info .movie-poster {
float: right;
max-width: 200px;
margin: 0 0 0.75rem 1rem;
}
.movie-info table {
width: auto;
}
@media (max-width: 600px) {
.movie-info .movie-poster {
float: none;
display: block;
margin: 0 auto 0.75rem;
}
}
/* === Diary Calendar === */
.diary-cal-nav {
display: flex;
align-items: center;
justify-content: center;
gap: 0.2rem;
margin-bottom: 0.4rem;
font-size: 0.85rem;
}
.diary-cal-nav .diary-cal-drop + .diary-cal-heading {
margin-left: 0.75rem;
}
.diary-cal-heading {
color: var(--link);
}
.diary-cal-heading:hover {
color: var(--link-hover);
}
.diary-cal-grid {
width: 100%;
border-collapse: collapse;
font-size: 0.8rem;
margin-bottom: 0.4rem;
}
.diary-cal-grid th,
.diary-cal-grid td {
text-align: center;
padding: 0.1rem 0.15rem;
font-weight: normal;
color: var(--text-muted);
}
.diary-cal-grid td a {
color: var(--link);
display: block;
}
.diary-cal-grid td a:hover {
color: var(--link-hover);
}
.diary-cal-grid td.cal-empty a {
color: var(--text-muted);
}
.diary-cal-grid td.cal-empty a:hover {
color: var(--link-hover);
}
.diary-cal-grid td.cal-today {
background: var(--bg-panel);
}
.diary-cal-grid td.cal-current,
.diary-cal-grid td.cal-current a {
color: var(--primary-hover);
}
.btn-block.cal-current {
color: var(--primary-hover);
}
/* === Responsive === */
@media (max-width: 1100px) {
.page-wrap {
grid-template-columns: 1fr;
}
/* Single-row mobile header: logo + Up icon are compact so search
can take the middle flex column, with actions on the right. */
header {
grid-template-columns: auto 1fr auto;
}
.search-form {
width: 100%;
max-width: none;
justify-self: stretch;
}
/* Sidebar on mobile is a floating overlay toggled by the FAB. The aside
itself is the scroll container; its children render at natural height. */
.sidebar {
position: fixed;
bottom: 5rem;
right: 1rem;
top: auto;
left: auto;
width: calc(100% - 2rem);
max-width: 20rem;
max-height: calc(100vh - 8rem);
overflow-y: auto;
display: none;
z-index: 60;
}
.sidebar.is-open {
display: flex;
}
button.fab {
display: inline-flex;
}
}
@media (max-width: 600px) {
header,
footer {
padding: 0.5rem 0.75rem;
}
main {
padding: 1rem 0.75rem;
}
textarea {
min-height: 50vh;
}
.sidebar {
width: calc(100% - 1.5rem);
}
.modal-backdrop {
padding: 0.5rem;
align-items: flex-start;
}
.modal {
max-width: none;
margin-top: 1rem;
}
.modal-header {
cursor: default;
}
.listing-item {
flex-wrap: wrap;
}
.listing-item .meta {
flex-basis: 100%;
padding-left: calc(1.25rem + 0.75rem);
}
}