1
0
Fork 0
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.

305 lines
4.5 KiB
CSS

/* Reset */
html {
box-sizing: border-box;
}
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: inherit;
text-decoration: none;
list-style: none;
border: none;
}
/* General Typography */
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 18px;
line-height: 1.4;
}
h2 {
font-size: 1.6rem;
font-weight: 500;
text-align: center;
margin-top: 3rem;
margin-bottom: 1.5rem;
}
h2:before, h2:after {
content: "";
height: 2px;
width: 10%;
max-width: 2em;
background: #ddd;
display: inline-block;
vertical-align: middle;
}
h2:before {
margin-right: 0.5rem;
}
h2:after {
margin-left: 0.5rem;
}
a {
color: #043788 !important;
}
article h3 {
font-size: 1.3rem;
margin-bottom: 0.8rem;
}
article p, article ul {
margin-bottom: 1rem;
}
article ul {
margin-left: 1.2rem;
}
article li {
list-style: square;
}
.article--error {
text-align: center;
}
/* Container styling */
html {
height: 100%;
}
body {
max-width: 45rem;
margin: 0 auto;
padding: 4rem 4rem 2rem;
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 0; /* Fill all available vertical space */
}
/* Header */
.header {
display: flex;
justify-content: space-between;
}
.header__logo {
width: 19rem;
height: 6rem;
max-width: 100%;
position: relative;
display: flex;
margin-right: 2rem;
}
.header__logo a {
display: contents;
}
.header__logo a::before {
/* Make the link behave like display: block */
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.header__logo img {
display: block;
filter: drop-shadow(0 0 3px #bbb);
}
.header__photo {
margin-right: 1.5rem;
border-radius: 7%;
}
.header__aside {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
}
.header__aside span {
font-weight: 600;
font-size: 1.5rem;
text-align: right;
margin-bottom: 1rem;
}
.header__links {
display: flex;
}
.header__links a {
display: block;
width: 2rem;
height: 2rem;
}
.header__links a:not(:first-child) {
margin-left: 0.8rem;
}
/* Main content */
.linklist {
display: -ms-grid;
display: grid;
-ms-grid-columns: 1fr 3rem 1fr 3rem 1fr;
grid-template-columns: 1fr 1fr 1fr;
grid-auto-flow: row;
justify-items: center;
grid-gap: 3rem;
}
.linklist--featured {
-ms-grid-columns: 1fr 1fr;
grid-template-columns: 1fr 1fr;
}
.linklist li {
text-align: center;
font-weight: 500;
font-size: 1.1rem;
}
.linklist small {
display: block;
font-weight: normal;
font-size: 0.9rem;
margin-top: 0.2rem;
}
.linklist img {
width: 100%;
height: 4rem;
display: block;
margin: 0 auto;
margin-bottom: 0.8rem;
transition: transform ease 0.1s;
}
.linklist a:hover img, .linklist a:focus img {
transform: scale(1.05);
}
/* Footer */
footer {
margin-top: 3rem;
text-align: center;
font-size: 0.9rem;
}
/* Media queries */
@media (max-width: 680px) {
.header {
flex-direction: column;
}
.header__aside {
margin-top: 1.5rem;
flex-direction: row;
align-items: flex-start;
}
.header__aside span {
text-align: left;
margin-bottom: 0;
margin-right: 2rem;
}
}
@media (max-width: 600px) {
body {
padding: 2rem 2rem 1rem;
}
.header__logo {
height: min(22vw, 6rem);
}
}
@media (max-width: 420px) {
.linklist {
-ms-grid-columns: 1fr;
grid-template-columns: 1fr;
grid-gap: 2rem;
}
}
@media (max-width: 380px) {
.header__aside {
flex-direction: column;
}
.header__aside span {
margin-right: 0;
margin-bottom: 0.5rem;
}
}
@media (max-width: 350px) {
h2:before, h2:after {
content: initial;
}
}
/* Grid auto-placement polyfill for IE11 */
.linklist li:nth-child(2) {
-ms-grid-row: 1;
-ms-grid-column: 2;
}
.linklist li:nth-child(3) {
-ms-grid-row: 1;
-ms-grid-column: 3;
}
.linklist li:nth-child(4) {
-ms-grid-row: 2;
-ms-grid-column: 1;
}
.linklist li:nth-child(5) {
-ms-grid-row: 2;
-ms-grid-column: 2;
}
.linklist li:nth-child(6) {
-ms-grid-row: 2;
-ms-grid-column: 3;
}
.linklist--featured li:nth-child(2) {
-ms-grid-row: 1;
-ms-grid-column: 2;
}
.linklist--featured li:nth-child(3) {
-ms-grid-row: 2;
-ms-grid-column: 1;
}
.linklist--featured li:nth-child(4) {
-ms-grid-row: 2;
-ms-grid-column: 2;
}
.linklist--featured li:nth-child(5) {
-ms-grid-row: 3;
-ms-grid-column: 1;
}
.linklist--featured li:nth-child(6) {
-ms-grid-row: 3;
-ms-grid-column: 2;
}