From 321bf628b45dbbb5e45d5fa6033c70ac2f841780 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 25 Mar 2021 14:59:12 +0100 Subject: adjust the main content position only if necessary --- html/template.html | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'html') diff --git a/html/template.html b/html/template.html index a9392911..d9a9ee1e 100644 --- a/html/template.html +++ b/html/template.html @@ -201,7 +201,7 @@ $if(toc)$ .sidebar { display: none; } - @media (min-width: 768px) { + @media screen and (min-width: 768px) { .sidebar { position: fixed; top: 51px; @@ -214,18 +214,21 @@ $if(toc)$ overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ background-color: #f5f5f5; border-right: 1px solid #eee; + max-width: 200px; } } + @media screen and (min-width: 768px) and (max-width: 1200px){ + .main { + position: absolute; + left: 250px; + max-width: 80%; + overflow: auto; + } + .sidebar ul { padding-left: 10px; } - .main { - position: relative; - left: 25%; - max-width: 70%; - overflow: auto; - } $endif$ @@ -247,6 +250,12 @@ $endfor$ $for(include-before)$ $include-before$ $endfor$ +$if(toc)$ + +$endif$ +
$if(title)$

$title$

@@ -261,12 +270,6 @@ $if(date)$ $endif$
$endif$ -$if(toc)$ - -$endif$ -
$body$ $for(include-after)$ $include-after$ -- cgit v1.2.3