rudimentary responsiveness

This commit is contained in:
Tomáš Mládek 2020-10-11 14:25:06 +02:00
parent ba9f47bb57
commit d98a9f76c8

View file

@ -6,6 +6,7 @@
<link href="https://necolas.github.io/normalize.css/8.0.1/normalize.css" rel="stylesheet"> <link href="https://necolas.github.io/normalize.css/8.0.1/normalize.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat&display=swap" <link href="https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat&display=swap"
rel="stylesheet"> rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style> <style>
body { body {
font-family: 'Montserrat', sans-serif; font-family: 'Montserrat', sans-serif;
@ -19,6 +20,30 @@
display: flex; display: flex;
} }
@media screen and (max-width: 800px) {
body {
flex-direction: column-reverse;
}
aside {
border-top: 1px solid gray;
}
aside h1 {
text-align: center;
}
aside li {
display: inline-block;
}
}
aside h1 {
font-size: 16pt;
text-decoration: underline;
font-variant: small-caps;
}
img { img {
max-width: 100%; max-width: 100%;
max-height: 100vh; max-height: 100vh;
@ -38,15 +63,17 @@
padding: 0 2em; padding: 0 2em;
} }
@media screen and (min-width: 800px) {
aside { aside {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
min-width: 15%; min-width: 15em;
width: 15%; width: 15em;
min-height: 100vh; min-height: 100vh;
border-right: 1px solid gray; border-right: 1px solid gray;
} }
}
nav ul { nav ul {
list-style: none; list-style: none;
@ -83,7 +110,7 @@
<body> <body>
<aside> <aside>
<nav> <nav>
<h2>{{garden_title}}</h2> <h1>{{garden_title}}</h1>
<ul> <ul>
{% for file in files %} {% for file in files %}
<li class="{% if file is containing(" .md <li class="{% if file is containing(" .md