From 0cb3bfd07c3d4d02b4ea3c72b890a041cb09a03b Mon Sep 17 00:00:00 2001 From: stepanzh Date: Thu, 15 Feb 2024 16:55:45 +0300 Subject: [PATCH] feat: responsive navbar and page-content --- static/css/base.css | 16 +++++++++++++++- static/css/promo.css | 5 ----- templates/base.html | 30 ++++++++++++++++-------------- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/static/css/base.css b/static/css/base.css index 1931c44..1dd9700 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -129,10 +129,24 @@ a { color: var(--ui-accent-color); } .surface.full-width { width: 100%; } +.page-top-content { + max-width: 960px; + margin: 0 auto; +} + .page-content { - margin: 12px; + max-width: 960px; + margin: 12px auto; } +/* Switch to a minimum margin when screen is small. */ +@media only screen and (max-width: 960px){ + .page-content { margin: 12px; } +} + +.content-block > :first-child { margin-top: 0; } +.content-block > :last-child { margin-bottom: 0; } + .header { display: flex; flex-direction: row; diff --git a/static/css/promo.css b/static/css/promo.css index 9f5a5d6..715ac3f 100644 --- a/static/css/promo.css +++ b/static/css/promo.css @@ -1,8 +1,3 @@ -.page { - max-width: 600px; - margin: 0 auto; -} - .page-content { display: flex; flex-direction: column; diff --git a/templates/base.html b/templates/base.html index 42a3e1e..5f5445c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -73,20 +73,22 @@
{% block page_top %} {% endblock %}