You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

239 lines
3.8 KiB
SCSS

@import "fonts";
$width-wrap: 960px;
$width-narrow: $width-wrap*0.75;
$col-accent: #fc0;
$col-dark: rgb(29, 30, 32);
$col-light: rgb(46, 46, 51);
$col-white: #e8e6e3;
$col-offwhite: darken($col-white, 25);
$col-border: rgb(51, 51, 51);
*, *:before, *:after {
box-sizing: border-box;
}
html { scroll-behavior: smooth }
body {
display: flex;
flex-direction: column;
gap: 1rem;
max-width: 60em;
width: 100%;
min-height: 100vh;
margin: 0 auto;
background: $col-dark;
color: $col-white;
font-family: open-sans, sans;
text-rendering: optimizeLegibility;
}
p {
line-height: 1.75;
}
a {
color: $col-accent;
text-decoration: none;
}
img {
max-width: 100%;
}
pre {
overflow: auto;
padding: 1rem;
}
body>header {
.img {
display: block;
width: 100%;
height: 8rem;
background:
url(/logo.svg),
linear-gradient(0deg, rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
url(/header.jpg);
background-size: auto 60%, cover, cover;
background-position: center;
background-repeat: no-repeat;
border-radius: 0 0 .5rem .5rem;
@media only screen and (min-width: $width-narrow) {
height: 10rem;
background-position: 3rem, center, center;
}
}
nav {
position: relative;
width: 100%;
height: 3rem;
margin-bottom: 2rem;
background: $col-dark;
display: flex;
justify-content: center;
align-items: stretch;
&:after {
content: "";
display: block;
position: absolute;
bottom: 0;
height: 2px;
width: 100%;
background: $col-light;
}
a {
display: flex;
align-items: center;
padding: 0 1em;
height: 100%;
z-index: 1;
border-bottom: 2px solid $col-light;
color: $col-accent;
text-decoration: none;
&:hover, &.active {
background: $col-light;
border-bottom: 2px solid $col-accent;
}
@media only screen and (min-width: $width-narrow) {
padding: 0 1.5em;
}
}
}
}
body>main {
display: flex;
flex-direction: column;
gap: 1.5rem;
section {
padding: 0;
h2 {
margin: 3rem 0 2rem 0;
}
h2:before {
content: "";
display: block;
width: 3em;
height: 1px;
margin-bottom: 1rem;
background: $col-accent;
}
&>div {
width: 100%;
padding: 2rem;
background: inherit;
border: 1px solid $col-border;
border-radius: .5rem;
@media only screen and (min-width: $width-narrow) {
background: $col-light;
}
}
*:first-child {
margin-top: 0;
}
*:last-child {
margin-bottom: 0;
}
}
section.flex {
display: flex;
flex-direction: column;
gap: 1.5rem;
background: inherit;
@media only screen and (min-width: $width-narrow) {
flex-direction: row;
}
}
section.toc {
ul {
padding-left: 1rem;
}
}
}
body>footer {
width: 100%;
padding: 1rem;
margin-top: auto;
font-size: .8em;
@media only screen and (min-width: $width-wrap) {
padding: 1rem 0;
}
}
.project-list {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
background: none;
padding: 1rem;
@media only screen and (min-width: $width-narrow) {
grid-template-columns: 1fr 1fr;
}
@media only screen and (min-width: $width-wrap) {
padding: 0;
}
&>a {
display: flex;
min-height: 10rem;
background: $col-light;
color: inherit;
border: 1px solid $col-border;
border-radius: .5rem;
overflow: hidden;
.title {
font-weight: bold;
font-size: 1.1em;
margin-bottom: .5em;
line-height: 1;
}
.description {
padding: 1.5em;
width: 100%;
p {
margin: 0;
line-height: 1.5;
color: $col-offwhite;
}
}
.image {
display: block;
height: 100%;
width: 12rem;
// !important delcarations are needed here, because some browsers override the inline `background-image` (from templates/macros.html) to just `background`, which ignores these.
background-size: cover !important;
background-position: center !important;
}
}
}