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/toc.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
rel="stylesheet"
href="/css/codeblock.css"

View File

@ -8,6 +8,23 @@
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 {
display: flex;
justify-content: center;
@ -138,7 +155,7 @@ ol {
.article-card {
margin: var(--element-margin);
background-color: black;
background-color: var(--article-card-bg-color);
width: 200px;
min-height: 100%;
border-radius: var(--radius);
@ -157,7 +174,6 @@ ol {
color: var(--heading3-color);
margin: var(--article-margin);
font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
}
.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> */
:not(pre) > code {
color: #aaa4a0;
color: var(--inline-code-color);
background-color: var(--inline-code-bg-color);
padding: 5px;
border-radius: 2px;

View File

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