From 72a37d26e2a42b6689517786cc7dc33873f3a92b Mon Sep 17 00:00:00 2001 From: Pavel Demin Date: Wed, 6 Nov 2024 18:00:27 +0100 Subject: [PATCH] improve css and html --- _layouts/default.html | 12 ++++----- css/main.css | 60 ++++++++++++++++--------------------------- 2 files changed, 28 insertions(+), 44 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 9caf79b..62ba4da 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -10,17 +10,17 @@ {% if title %}{{ title }}{% else %}{{ site.title }}{% endif %} -
- + diff --git a/css/main.css b/css/main.css index f048c81..b24bc99 100644 --- a/css/main.css +++ b/css/main.css @@ -33,6 +33,16 @@ body { padding-bottom: 2em; } +article { + background-color: #fff; + border-radius: 0.5em; + padding: 2em 1em; +} + +article > * + * { + margin-top: 1em; +} + h1, h2 { font-weight: normal; @@ -40,49 +50,34 @@ h2 { } h1 { - font-size: 200%; + font-size: 225%; } h2 { font-size: 150%; } -h1, -h2, ol, -p, -pre, -table, ul { - margin-top: 1em; -} - -ol ol, -ol ul, -ul ol, -ul ul { - margin-top: 0; -} - -ol, -ul { - list-style-position: outside; padding-left: 2em; } ol { - list-style-type: decimal; + list-style: decimal outside; } ul { - list-style-type: disc; + list-style: disc outside; } -ol > li, -ul > li { +li { padding-left: 0.25em; } +li > p { + margin-top: 1em; +} + ol > li::marker { color: #808080; } @@ -123,7 +118,6 @@ pre { } pre code { - background-color: transparent; padding: 0; white-space: pre; } @@ -144,30 +138,20 @@ img { max-width: 100%; } -.content { - background-color: #fff; - border-radius: 0.5em; - padding: 2em 1em; -} - -.content > :first-child { - margin-top: 0; -} - -.header { +header { justify-content: space-between; padding: 0.5em 1em; } -.header, -.menu { +header, +header div { column-gap: 1em; display: flex; flex-wrap: wrap; } @media print { - .header { + header { display: none; } }