From a24c23b13e39ad90bab6376bb414a4c10e890107 Mon Sep 17 00:00:00 2001 From: Christian Merten Date: Tue, 3 Dec 2024 00:05:37 +0100 Subject: [PATCH] startpage: improve mobile adaption --- jdav_web/static/startpage/css/base.css | 24 +++++++++++-------- jdav_web/static/startpage/css/people_grid.css | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/jdav_web/static/startpage/css/base.css b/jdav_web/static/startpage/css/base.css index c36d62e..2530db7 100644 --- a/jdav_web/static/startpage/css/base.css +++ b/jdav_web/static/startpage/css/base.css @@ -92,24 +92,28 @@ h6 { } .content { - width: 55%; + max-width: 100%; + width: 1000px; margin: 0 auto; + padding-left: 20px; + padding-right: 20px; overflow: hidden; position: relative; padding-top: 40px; padding-bottom: 40px; } -.column { - float: left; - width: 50%; - padding: 0 20px; -} +@media only screen and (min-width: 1024px) { + .column { + float: left; + width: 50%; + } -/* Clear floats after the columns */ -.row:after { - content: ""; - clear: both; + /* Clear floats after the columns */ + .row:after { + content: ""; + clear: both; + } } .footer a { diff --git a/jdav_web/static/startpage/css/people_grid.css b/jdav_web/static/startpage/css/people_grid.css index 2d37a09..8bad66b 100644 --- a/jdav_web/static/startpage/css/people_grid.css +++ b/jdav_web/static/startpage/css/people_grid.css @@ -1,7 +1,7 @@ .grid-container { display: grid; grid-gap: 10px; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding: 15px; }