aboutsummaryrefslogtreecommitdiff
path: root/html/template.html
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2021-03-25 14:59:12 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2021-03-25 14:59:12 +0100
commit321bf628b45dbbb5e45d5fa6033c70ac2f841780 (patch)
tree830cce4ebc92af352da5baeceb35b4845fe9c829 /html/template.html
parentb3a06e129830050a377c1a7b0409cc34e1979d6b (diff)
downloadmuhqs-game-321bf628b45dbbb5e45d5fa6033c70ac2f841780.tar.gz
muhqs-game-321bf628b45dbbb5e45d5fa6033c70ac2f841780.zip
adjust the main content position only if necessary
Diffstat (limited to 'html/template.html')
-rw-r--r--html/template.html29
1 files changed, 16 insertions, 13 deletions
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$
</style>
@@ -247,6 +250,12 @@ $endfor$
$for(include-before)$
$include-before$
$endfor$
+$if(toc)$
+<div id="sidebar" class="sidebar">
+$toc$
+</div> <!-- sidebar -->
+$endif$
+<div id="main" class="main">
$if(title)$
<header id="title-block-header">
<h1 class="title">$title$</h1>
@@ -261,12 +270,6 @@ $if(date)$
$endif$
</header>
$endif$
-$if(toc)$
-<div id="sidebar" class="sidebar">
-$toc$
-</div> <!-- sidebar -->
-$endif$
-<div id="main" class="main">
$body$
$for(include-after)$
$include-after$