This repository has been archived on 2023-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
python-blog/articles/static/style.css

282 lines
4.5 KiB
CSS

:root {
--accent: #226997;
--accent-light: #7c96a9;
--main: #111111;
--main2: #575757;
--main3: #7d7d7d;
--background: #ffffff;
--background2: #f7f7f7;
--background3: #d0d0d0;
--success-background: #d4edda;
--success-text: #155724;
--error-background: #f8d7da;
--error-text: #721c24;
--warning-background: #fff3cd;
--warning-text: #856404;
--description-margin: .2rem;
}
html {
font-size: 110%;
max-width: calc(640px + 2em);
padding: 8px 0 3em;
margin: 0 auto;
}
body {
margin: 0 1em;
font-family: Arial, sans-serif;
color: var(--main);
background-color: var(--background);
}
p {
line-height: 1.7;
}
li {
line-height: 1.4;
}
body img {
max-width: 100%;
}
a {
color: var(--main);
text-decoration: none;
border-bottom: .3ex solid var(--accent);
}
.article-list h2 a {
border-color: transparent;
}
.pic-container {
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
}
.pic-container .profile-pic {
max-width: 200px;
min-width: 100px;
max-height: 200px;
min-height: 100px;
border-radius: 10%;
padding: 1rem;
flex-shrink: 1;
flex-grow: 0;
}
.article-list + .article-list {
margin-top: 4em;
}
.article-list h2, h1 {
margin-bottom: var(--description-margin);
}
.article-detail h1 {
font-size: 2em;
}
.metadata {
margin-top: var(--description-margin);
color: var(--main2);
}
.pagination {
display: flex;
justify-content: space-between;
}
code {
white-space: pre-wrap;
}
.codehilite {
border-radius: .5ex;
background-color: var(--background2);
}
.codehilite pre {
padding: 1em;
}
section.comments {
border-top: 2px dashed var(--background3);
margin-top: 2em;
}
footer {
border-top: 2px solid var(--background2);
margin-top: 2em;
font-size: 80%;
color: var(--main3);
}
footer a {
color: var(--main3);
border-bottom-color: var(--accent-light);
}
table {
border-collapse: collapse;
width: 100%;
}
th, td {
padding: 1ex;
text-align: left;
}
tr {
border-bottom: 1px solid var(--background3);
}
tr:hover {
background-color: var(--background2);
}
.pill {
font-size: 60%;
background-color: var(--main2);
color: var(--background2);
padding: .5ex 1ex;
border-radius: 1ex;
vertical-align: 15%;
}
/* FORMS */
.helptext {
color: var(--main3);
font-size: 80%;
}
.helptext a {
color: var(--main3);
}
p.helptext {
margin-bottom: 0;
}
form table th {
vertical-align: top;
}
form table tr th {
font-weight: normal;
}
form tr.required th {
font-weight: bold;
}
form table tr {
border-bottom: none;
}
form {
background-color: var(--background2);
border-radius: .5ex;
padding: 1em;
}
form button[type=submit] {
font-size: 1em;
padding: .9ex 1.2ex;
border-radius: .8ex;
background-color: var(--accent);
border: none;
color: var(--background);
cursor: pointer;
margin-top: 1em;
}
form .error, form .error .helptext, .errorlist {
color: var(--error-text);
background-color: var(--error-background);
}
.errorlist {
margin-top: 0;
list-style-type: none;
padding-left: 0;
}
.errorlist.nonfield {
margin-bottom: 0;
}
tr.spacer {
padding: 1em;
}
textarea, input {
width: 100%;
}
/* MESSAGES */
.messages p {
background-color: var(--background2);
padding: .5ex 1ex;
}
.messages .error {
background-color: var(--error-background);
color: var(--error-text);
}
.messages .success {
background-color: var(--success-background);
color: var(--success-text);
}
.messages .warning {
background-color: var(--warning-background);
color: var(--warning-text);
}
/* LINKS */
a:hover, a:focus {
text-decoration: none;
background-color: var(--accent);
color: var(--background);
}
footer a:hover, footer a:focus {
background-color: var(--accent-light);
}
@media (prefers-color-scheme: dark) {
:root {
--accent: #226997;
--main: #eeeeee;
--main2: #cecece;
--main3: #b1b1b1;
--background: #111111;
--background2: #282828;
--success-background: #155724;
--success-text: #d4edda;
--error-background: #721c24;
--error-text: #f8d7da;
--warning-background: #856404;
--warning-text: #fff3cd;
}
img {
opacity: .75;
transition: opacity .2s ease-in-out;
}
img:hover {
opacity: 1;
}
#manage ul ul li img {
opacity: 1;
filter: invert(1);
}
}