From 903f648b58c1ac9ce40b0f345eb4c07dc16e434e Mon Sep 17 00:00:00 2001 From: Dendy Faist Date: Sat, 24 Feb 2024 13:38:56 +0100 Subject: [PATCH] impl: Enhanced styling --- src/__init__.py | 1 - static/style/main.css | 55 +++++++++++++++++++++++++++++++------------ templates/main.html | 30 +++++++++++++++++++---- 3 files changed, 66 insertions(+), 20 deletions(-) diff --git a/src/__init__.py b/src/__init__.py index 96ffe28..bd8fa66 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import traceback -import os import posixpath from flask import Flask, render_template, request diff --git a/static/style/main.css b/static/style/main.css index f0c8ccd..5cea8de 100644 --- a/static/style/main.css +++ b/static/style/main.css @@ -1,18 +1,19 @@ -html { - min-height: 100%; -} - body { - padding: 20px; + /*padding: 20px;*/ background-color: #191919; color: white; font-family: monospace; - margin-bottom: 100px; + /*margin-bottom: 100px;*/ + min-height: 100vh; + margin: 0px; } -h1, h2, h3, h4, h5, h6 { +h1, h2 { color: orange; } +h3, h4 { + color: gray; +} a { text-decoration: none; @@ -23,12 +24,18 @@ a { background-color: orange; } +hr { + border: none; + border-bottom: 1px solid #444; + margin: 0px; +} + input { border: 1px solid black; background-color: white; } -footer { +body > footer { background-color: black; position: fixed; left: 0; @@ -40,28 +47,46 @@ footer { } ul { - padding-left: 20px; + margin: 0px; + padding-left: 10px; padding-bottom: 0px; list-style-type: none; } -main { - display: flex; - gap: 20px; - min-height: 80vh; +li { + margin-top: -2px; + margin-bottom: -1px; } +body > main { + display: flex; + min-height: 100vh; +} + body > main > * > *:not(hr) { + padding: 20px; + } + body > main hr { + width: 100%; + } + body > main > nav { + background-color: black; + } + nav { - padding-right: 10px; display: flex; flex-direction: column; - border-right: 1px solid orange; + border-right: 1px solid #444; width: 200px; } article { flex-grow: 1; + display: flex; + flex-direction: column; } + article > main { + flex-grow: 1; + } pre { background-color: #000; diff --git a/templates/main.html b/templates/main.html index a51016e..0d56cb2 100644 --- a/templates/main.html +++ b/templates/main.html @@ -2,12 +2,20 @@ {% block title %}{{ path }}{% endblock %} -{% macro render_tree(tree, root='/') %} +{% macro render_tree(tree, root='') %}