website/public/main.css

392 lines
5.8 KiB
CSS
Raw Normal View History

2020-06-02 00:52:23 +02:00
body {
font-family: "Source Sans Pro", "Fira Sans", Roboto, sans-serif;
line-height: 1.2;
background-color: #efe5e0;
2020-06-02 00:52:23 +02:00
margin: 0;
padding: 0;
2020-06-02 00:52:23 +02:00
box-sizing: border-box;
min-height: 100vh;
}
a {
color: #1d125f;
}
a:visited {
color: #48122d;
}
a:hover {
text-decoration: none;
}
body {
display: grid;
grid-template-columns: auto;
2020-06-02 15:42:25 +02:00
grid-template-rows: auto auto auto 1fr;
grid-template-areas:
"header"
"main"
"social"
"footer";
2020-06-02 18:41:46 +02:00
align-items: start;
2020-06-02 15:42:25 +02:00
}
2020-06-09 02:16:47 +02:00
body > header {
2020-06-02 00:52:23 +02:00
grid-area: header;
padding: 2vmin;
2020-06-02 00:52:23 +02:00
}
2020-06-02 15:42:25 +02:00
main {
grid-area: main;
padding: 0 2vmin;
margin-bottom: 2em;
background: #fff5f0;
2020-06-02 15:42:25 +02:00
}
2020-06-02 18:41:46 +02:00
.blog main {
justify-self: center;
2020-06-02 00:52:23 +02:00
}
body:not(.blog) main h2 {
margin-top: 0.3em;
margin-bottom: 0;
}
2020-06-02 00:52:23 +02:00
#social {
grid-area: social;
2020-06-02 18:41:46 +02:00
align-self: start;
2020-06-02 00:52:23 +02:00
}
footer {
grid-area: footer;
align-self: end;
}
@media (min-width:900px) or ((min-aspect-ratio:1/1) and (min-width:600px)) {
2020-06-02 00:52:23 +02:00
body {
background-color: #fff5f0;
grid-template-columns: 100px 1fr;
2020-06-02 18:41:46 +02:00
grid-template-rows: auto 1fr auto;
2020-06-02 15:42:25 +02:00
grid-template-areas:
"header main"
"social main"
"footer footer";
2020-06-02 18:41:46 +02:00
gap: 1em 3em;
padding: 2vmin 2vmin 0;
}
2020-06-09 02:16:47 +02:00
body > header {
padding: 0;
}
main {
2020-06-09 02:16:47 +02:00
padding: 0 1em;
margin-bottom: 0;
2020-06-02 00:52:23 +02:00
}
}
@media (min-width:900px) {
body {
grid-template-columns: 150px 1fr;
2020-06-02 00:52:23 +02:00
padding: 2em 2em 0;
}
2020-06-02 18:41:46 +02:00
body:not(.blog) main {
2020-06-02 00:52:23 +02:00
font-size: 150%;
2020-06-02 18:41:46 +02:00
margin-left: 4em;
2020-06-02 00:52:23 +02:00
}
body:not(.blog) main h2 {
margin-top: 0;
}
2020-06-02 00:52:23 +02:00
}
@media (min-width:1500px) {
body {
padding: 4em 4em 0;
2020-06-02 18:41:46 +02:00
grid-template-columns: 250px 1fr;
2020-06-02 00:52:23 +02:00
gap: 1em 4em;
}
2020-06-02 18:41:46 +02:00
body:not(.blog) main {
display: flex;
margin-left: 6em;
}
body:not(.blog) main > * {
margin-right: 4em;
flex-grow: 1;
2020-06-02 15:42:25 +02:00
}
2020-06-02 00:52:23 +02:00
}
.wordmark {
/* Font size determines the size of the midgard word mark */
line-height: 1;
font-family: "Roboto Slab", serif;
font-weight: 300;
color: black;
text-decoration: none;
text-align: left;
display: inline-block;
2020-06-02 18:41:46 +02:00
width: 3.37em;
2020-06-02 00:52:23 +02:00
}
.wordmark span {
display: block;
}
.wordmark span:last-child {
text-align: right;
}
.wordmark span:last-child:before {
content: " ";
display: block;
width: 3em;
height: 1px;
border-bottom: 0.055em solid black;
margin-top: 0.04em;
margin-bottom: -0.17em;
}
a:hover .wordmark span:first-child,
a.wordmark:hover span:first-child {
color: #6f164e;
2020-06-02 00:52:23 +02:00
}
a:hover .wordmark span:last-child,
a.wordmark:hover span:last-child {
color: #8c4643;
2020-06-02 00:52:23 +02:00
}
a:hover .wordmark span:last-child:before,
a.wordmark:hover span:last-child:before {
border-bottom-color: #62435a;
2020-06-02 00:52:23 +02:00
}
2020-06-09 02:16:47 +02:00
body > header img {
2020-06-02 00:52:23 +02:00
width: 25vmin;
height: 25vmin;
display: inline-block;
}
2020-06-11 00:03:35 +02:00
body > header a {
text-decoration: none;
}
body > header a:hover img {
filter: brightness(110%);
}
2020-06-02 15:42:25 +02:00
.sitename {
2020-06-02 00:52:23 +02:00
margin: 0;
margin-left: 0.3em;
display: inline-block;
font-size: 12vmin;
}
2020-06-09 02:16:47 +02:00
body > header img, .sitename {
2020-06-02 00:52:23 +02:00
vertical-align: middle;
}
@media (min-width:900px) or ((min-aspect-ratio:1/1) and (min-width:600px)) {
2020-06-09 02:16:47 +02:00
body > header img {
width: 100px;
height: 100px;
2020-06-02 00:52:23 +02:00
display: block;
}
2020-06-02 15:42:25 +02:00
.sitename {
2020-06-02 00:52:23 +02:00
margin: 0.3em 0 0 0;
display: block;
font-size: 23pt;
}
}
@media (min-width:900px) {
body > header img {
width: 150px;
height: 150px;
2020-06-02 00:52:23 +02:00
}
.sitename {
font-size: 34pt;
}
2020-06-02 00:52:23 +02:00
}
@media (min-width:1500px) {
2020-06-09 02:16:47 +02:00
body > header img {
2020-06-02 00:52:23 +02:00
width: 250px;
height: 250px;
display: block;
}
2020-06-02 15:42:25 +02:00
.sitename {
2020-06-02 00:52:23 +02:00
margin: 0.3em 0 0 0;
display: block;
2020-06-02 18:41:46 +02:00
font-size: 56.5pt;
2020-06-02 00:52:23 +02:00
}
}
2020-06-02 18:41:46 +02:00
.links ul {
2020-06-02 00:52:23 +02:00
padding: 0;
margin: 0 0 1em;
2020-06-02 00:52:23 +02:00
}
2020-06-02 18:41:46 +02:00
.links li {
2020-06-02 00:52:23 +02:00
list-style: none;
margin: 0.5em 0;
2020-06-02 00:52:23 +02:00
}
2020-06-02 18:41:46 +02:00
.links li a {
2020-06-02 00:52:23 +02:00
display: block;
text-decoration: none;
padding: 0.2em 0.3em;
margin: 0 -0.3em;
}
2020-06-02 18:41:46 +02:00
.links li a:hover, li a:focus {
2020-06-02 00:52:23 +02:00
background-color: #fffaf7;
}
2020-06-02 18:41:46 +02:00
.links a .summary {
2020-06-02 00:52:23 +02:00
font-size: 75%;
color: #333;
margin-top: 0.3em;
}
2020-06-02 18:41:46 +02:00
.links a .title {
2020-06-02 00:52:23 +02:00
text-decoration: underline;
}
@media (min-width:900px) or ((min-aspect-ratio:1/1) and (min-width:600px)) {
.links li {
margin: 1.5em 0;
}
.links ul {
margin-bottom: 2em;
}
}
2020-06-02 00:52:23 +02:00
body.blog {
background-color: #efe5e0;
}
2020-06-02 18:41:46 +02:00
.blog main {
2020-06-02 15:42:25 +02:00
line-height: 1.5;
max-width: 50em;
2020-06-02 00:52:23 +02:00
}
@media (min-width:900px) or ((min-aspect-ratio:1/1) and (min-width:600px)) {
2020-06-02 18:41:46 +02:00
.blog main {
2020-06-09 01:44:50 +02:00
line-height: 1.8;
2020-06-02 18:41:46 +02:00
}
}
2020-06-02 00:52:23 +02:00
2020-06-09 02:16:47 +02:00
main h1 {
margin: 0.5em 0 0;
}
main header .metadata {
color: #888;
font-size: 90%;
margin-top: -0.1em;
font-weight: 200;
}
main header {
border-bottom: 1px solid #aaa;
padding-bottom: 0.8em;
}
.metadata .author, .metadata time {
font-weight: 400;
}
.codehilite {
background-color: #111;
color: #eee;
2020-06-09 02:16:47 +02:00
padding: 0.5em 2vmin;
margin: 0 -2vmin;
}
@media (min-width:900px) or ((min-aspect-ratio:1/1) and (min-width:600px)) {
2020-06-09 02:16:47 +02:00
.codehilite {
padding: 0.5em 1em;
margin: 0 -1em;
}
}
.codehilite pre {
margin: 0;
font-size: 100%;
}
2020-06-09 19:37:00 +02:00
kbd, code {
2020-06-11 00:03:35 +02:00
padding: 0.3em 0.4em 0.3em;
2020-06-09 19:37:00 +02:00
border-radius: 0.5em;
vertical-align: middle;
font-family: "Source Code Pro", monospace;
font-size: 90%;
white-space: pre-wrap;
white-space: break-spaces;
}
kbd {
background-color: #fff;
2020-06-11 00:03:35 +02:00
border-bottom: 2px solid #ddd;
2020-06-09 19:37:00 +02:00
}
code {
background-color: #efe5e0;
color: #222;
}
pre code {
padding: 0;
border-radius: 0;
background-color: transparent;
color: inherit;
}
2020-06-02 18:41:46 +02:00
#social {
font-size: 75%;
}
2020-06-02 00:52:23 +02:00
#social a {
display: inline-block;
width: 4em;
text-align: center;
2020-06-02 18:41:46 +02:00
vertical-align: top;
2020-06-02 00:52:23 +02:00
text-decoration: none;
color: #000;
2020-06-02 18:41:46 +02:00
opacity: 0.5;
2020-06-02 00:52:23 +02:00
}
#social a:hover {
opacity: 1;
}
#social a:before {
content: " ";
width: 3em;
height: 3em;
display: inline-block;
background-size: contain;
}
#social a:hover:before {
background-color: #fff;
}
#rss-link:before {
background-image: url(rss.svg);
}
#irc-link:before {
background-image: url(irc.svg);
}
@media (min-width:900px) or ((min-aspect-ratio:1/1) and (min-width:600px)) {
2020-06-02 18:41:46 +02:00
#social {
font-size: 60%;
2020-06-02 18:41:46 +02:00
margin-top: 5em;
}
}
@media (min-width:900px) {
#social {
font-size: 80%;
}
}
2020-06-02 18:41:46 +02:00
@media (min-width:1500px) {
#social {
font-size: 100%;
}
}
2020-06-02 00:52:23 +02:00
footer {
text-align: center;
background-color: #dbc7d7;
padding: 0.3em;
margin-top: 1em;
2020-06-02 00:52:23 +02:00
}