From e5c37f4eadaf1320dfa965c51f93945676c4284d Mon Sep 17 00:00:00 2001 From: dusk Date: Tue, 21 Sep 2021 22:50:09 +0200 Subject: [PATCH] CSS changes for small screens --- index.php | 29 +++++++++++++++-------------- normal.css | 19 ++++++++++++++----- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/index.php b/index.php index 0bd1582..857d673 100644 --- a/index.php +++ b/index.php @@ -24,20 +24,6 @@ - //Check if home and back buttons are needed - if($currentdir != $basedir) { - echo("
"); - echo("Inici
"); - - //Solve ocurrences where url has ?q=./ - if (dirname($_GET["q"]) == ".") { - $parentdir = ""; - } - else $parentdir = dirname($_GET["q"]); - - echo("Arrere
"); - echo("
"); - } echo("
"); @@ -84,6 +70,21 @@ } printf('

/%s

', $_GET["q"]); + + //Check if home and back buttons are needed + if($currentdir != $basedir) { + echo("
"); + echo("Inici
"); + + //Solve ocurrences where url has ?q=./ + if (dirname($_GET["q"]) == ".") { + $parentdir = ""; + } + else $parentdir = dirname($_GET["q"]); + + echo("Arrere
"); + echo("
"); + } ?> diff --git a/normal.css b/normal.css index 35f9cfb..ef78f0e 100644 --- a/normal.css +++ b/normal.css @@ -2,8 +2,8 @@ body { background-color: #2e2e2e; color: #d6d6d6; font-family: "Courier New", monospace; - font-size: 1.1em; - margin: 75px 20%; + font-size: 1em; + margin: 75px 25%; text-align: center; } @@ -41,15 +41,17 @@ a:hover { bottom: 25px; left: 25px; background-color: #101010; + font-size: max(1.5vw, 1em); + } #files { - padding: 20px; - text-align: left; + padding: 10px; + text-align: justify; display: inline-block; border: 2px dashed #d6d6d6; - min-width: 400px; background-color: #101010; + font-size: min(2.5vw, 1.4em); } .path { @@ -62,3 +64,10 @@ hr { border: 1.5px solid #d6d6d6; } +@media only screen and (max-width: 600px) { + body { + margin: 75px 15%; + } + #navigation { + position: static; +}