~kungtotte/dtt

ca4eec32cf4e0c98156cafe1d9026dca59d56ae4 — Thomas Landin 4 months ago bf807c3
Fix styling for mobile devices

It's not perfect, but it's enough to run with for now.
1 files changed, 37 insertions(+), 11 deletions(-)

M src/tmpl.nim
M src/tmpl.nim => src/tmpl.nim +37 -11
@@ 16,6 16,7 @@ email = "your@email.tld"
<html lang="{{language}}">
  <head>
    <meta charset="{{charset}}">
    <meta charset="viewport" content="width=device-width, initial-scale=1">
    <title>{{page_title}}</title>
    <link rel="stylesheet" type="text/css" href="{{base_url}}/css/style.css">
  </head>


@@ 63,14 64,12 @@ email = "your@email.tld"
}
body {
  font-family: monospace, sans-serif;
  /* font-family: "Cantarell", "Helvetica", "Arial", sans-serif; */
  font-size: 16px;
  color: var(--font-color);
  background-color: var(--body-bg);
  font-size: medium;
  line-height: 1.5;
}
body header {
  margin-bottom: 4ch;
  padding: 0;
  margin: 0;
}
a {
  color: var(--link-color);


@@ 105,21 104,30 @@ aside h4 {
}
nav {
  display: flex;
  position: fixed;
  position: sticky;
  width: 100%;
  top: 0;
  left: 0;
  height: inherit;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: auto;
  padding: 0px;
  margin: 0px;
  background: var(--header-bg);
  font-size: large;
  font-size: 130%;
  border-width: 0 0 thin 0; /* top right bottom left */
  border-style: dashed;
}
nav a, nav a:visited, nav a:hover {
  text-decoration-style: double;
}
h1 {
  font-size: 200%;
}
main {
  max-width: 70ch;
  padding: 3ch;
  font-size: 90%;
  top: 0;
  margin: auto;
}
article header time {


@@ 143,10 151,28 @@ pre code {
}
footer {
  max-width: 70ch;
  font-size: smaller;
  font-size: 75%;
  margin: auto;
  text-align: right;
  line-height: 0.8;
  padding: 0px;
}
@media screen and (device-width: 360px) {
  body {
    font-size: 28px;
  }
  nav {
    font-size: 180%;
  }
  main {
    max-width: 100%;
    font-size: 120%;
    padding: 0.5em;
  }
  footer {
    max-width: 100%;
    font-size: 100%;
    padding: 0.5em;
  }
}
"""