More css organisation

This commit is contained in:
Sam 2024-08-07 15:51:19 +01:00
parent 3f45a98600
commit 420c04f916
5 changed files with 67 additions and 71 deletions

View File

@ -7,6 +7,7 @@
<link rel="stylesheet" href="/css/tables.css" type="text/css" media="all" /> <link rel="stylesheet" href="/css/tables.css" type="text/css" media="all" />
<link rel="stylesheet" href="/css/toc.css" type="text/css" media="all" /> <link rel="stylesheet" href="/css/toc.css" type="text/css" media="all" />
<link rel="stylesheet" href="/css/articles.css" type="text/css" media="all" /> <link rel="stylesheet" href="/css/articles.css" type="text/css" media="all" />
<link rel="stylesheet" href="/css/charts.css" type="text/css" media="all" />
<link <link
rel="stylesheet" rel="stylesheet"
href="/css/codeblock.css" href="/css/codeblock.css"

View File

@ -8,6 +8,23 @@
flex: 1; flex: 1;
} }
.author-row {
display: flex;
justify-content: left;
align-items: center;
color: var(--subtext-color);
font-size: var(--author-row-font-size);
margin-bottom: 20px;
}
.author-name {
margin: 2px;
}
.author-row time {
margin: 2px;
}
.article-container { .article-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -138,7 +155,7 @@ ol {
.article-card { .article-card {
margin: var(--element-margin); margin: var(--element-margin);
background-color: black; background-color: var(--article-card-bg-color);
width: 200px; width: 200px;
min-height: 100%; min-height: 100%;
border-radius: var(--radius); border-radius: var(--radius);
@ -157,7 +174,6 @@ ol {
color: var(--heading3-color); color: var(--heading3-color);
margin: var(--article-margin); margin: var(--article-margin);
font-size: 16px; font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
} }
.article-card-summary p { .article-card-summary p {

18
static/css/charts.css Normal file
View File

@ -0,0 +1,18 @@
/* Charts */
.chart-flex-container {
display: flex;
}
.chart-flex-container article {
flex: 1;
}
#chart {
width: 100%;
height: 50vh;
}
.chart-area {
width: 60%;
margin: var(--article-margin);
}

View File

@ -36,7 +36,7 @@ code {
/* Styles for inline <code> */ /* Styles for inline <code> */
:not(pre) > code { :not(pre) > code {
color: #aaa4a0; color: var(--inline-code-color);
background-color: var(--inline-code-bg-color); background-color: var(--inline-code-bg-color);
padding: 5px; padding: 5px;
border-radius: 2px; border-radius: 2px;

View File

@ -5,13 +5,27 @@
} }
:root { :root {
/* root */
--font-family: "Montserrat", sans-serif; --font-family: "Montserrat", sans-serif;
--code-font-family: "IBM Plex Mono", monospace; --code-font-family: "IBM Plex Mono", monospace;
--font-size: 10; --font-size: 10;
--author-row-font-size: 12px; --background-color: #181a1b;
--text-color: #e0ddd9;
--subtext-color: #6c757d;
--link-color: #60b2f1;
--hover-color: #0056b3;
--border-color: #363a3d;
--border-width: 2px;
--border-style: solid;
/* headings */
--heading1-color: #fc8452;
--heading2-color: #e0ddd9;
--heading3-color: #e0ddd9;
--heading1-font-size: 25px; --heading1-font-size: 25px;
--code-block-font-size: 10px;
--chart-modifier-height: 60px; /* content */
--author-row-font-size: 12px;
--article-max-width: 70%; --article-max-width: 70%;
--content-padding: 40px; --content-padding: 40px;
--content-margin: 40px; --content-margin: 40px;
@ -21,33 +35,28 @@
--heading-margin: 30px; --heading-margin: 30px;
--radius: 5px; --radius: 5px;
--line-height: 1.5; --line-height: 1.5;
--checkbox-width: max-content; --summary-container-hover-bg: #343a40;
--checkbox-font-size: 16px; --article-card-bg-color: white;
--avatar-width: 20px;
--background-color: #181a1b; /* code */
--text-color: #e0ddd9; --code-block-font-size: 10px;
--subtext-color: #6c757d; --inline-code-color: #aaa4a0;
--link-color: #60b2f1; --codeblock-bg-color: #1b1d1e;
--hover-color: #0056b3; --inline-code-bg-color: #353535;
--heading1-color: #fc8452;
--heading2-color: #e0ddd9; /* navbar/footer */
--heading3-color: #e0ddd9;
--navbar-background-color: #181a1b; --navbar-background-color: #181a1b;
--navbar-text-color: #e0ddd9; --navbar-text-color: #e0ddd9;
--navbar-hover: #333; --navbar-hover: #333;
--footer-background-color: #333; --footer-background-color: #333;
--summary-container-hover-bg: #343a40;
--codeblock-bg-color: #1b1d1e; /* table */
--inline-code-bg-color: #353535;
--table-even-row-bg-color: #343a40; --table-even-row-bg-color: #343a40;
--table-odd-row-bg-color: #515c66; --table-odd-row-bg-color: #515c66;
--table-header-bg: #212529; --table-header-bg: #212529;
--table-font-color: #e0ddd9; --table-font-color: #e0ddd9;
--table-header-font-size: 14px; --table-header-font-size: 14px;
--table-row-font-size: 12px; --table-row-font-size: 12px;
--border-color: #363a3d;
--border-width: 2px;
--border-style: solid;
} }
@media (max-width: 600px) { @media (max-width: 600px) {
@ -101,26 +110,6 @@ time {
margin-bottom: var(--article-margin); margin-bottom: var(--article-margin);
} }
/* Charts */
.chart-flex-container {
display: flex;
}
.chart-flex-container article {
flex: 1;
}
#chart {
width: 100%;
height: 50vh;
}
.chart-area {
width: 60%;
margin: var(--article-margin);
}
/* Footer */
footer { footer {
background-color: var(--footer-background-color); background-color: var(--footer-background-color);
color: var(--text-color); color: var(--text-color);
@ -134,31 +123,3 @@ footer a:hover {
background-color: #ddd; background-color: #ddd;
color: black; color: black;
} }
.author-row {
display: flex;
justify-content: left;
align-items: center;
color: var(--subtext-color);
font-size: var(--author-row-font-size);
margin-bottom: 20px;
}
.avatar-container {
width: var(--avatar-width);
margin-right: var(--element-margin);
}
.avatar {
display: block;
width: 100%;
height: auto;
}
.author-name {
margin: 2px;
}
.author-row time {
margin: 2px;
}