diff --git a/paste/home.py b/paste/home.py index 939b64b..e812ce5 100755 --- a/paste/home.py +++ b/paste/home.py @@ -87,3 +87,7 @@ def get_content(path: str) -> str: return render_template("content.html.j2") return abort(404) + +@home.route("/about") +def about() -> str: + return render_template("about.html.j2") \ No newline at end of file diff --git a/paste/static/css/main.css b/paste/static/css/main.css new file mode 100644 index 0000000..c5f19d5 --- /dev/null +++ b/paste/static/css/main.css @@ -0,0 +1,62 @@ +:root { + --main-width: 85vw; + --bg-color: white; + --text-color: #212121; + --a-color: #7e22ce; +} + +@media (prefers-color-scheme: dark) { + :root { + --bg-color: #212121; + --text-color: white; + } +} + +/* large screen */ +@media only screen and (min-width: 868px) { + :root { + --main-width: 50vw; + } +} + +html { + font-family: sans-serif; + scroll-behavior: smooth; + color: var(--text-color); +} + + +body { + max-width: var(--main-width); + margin-left: auto; + margin-right: auto; + background-color: var(--bg-color); + line-height: 1.65 +} + +nav { + border-bottom: 1px solid black; +} + +.menu ul { + list-style-type: none; + padding-left: 0; +} + +.menu { + display: inline-block; +} + +.menu li { + font-weight: bold; +} + +a { + color: var(--a-color); + text-decoration: none; +} + +a:hover { + color: black; + border-bottom: .2rem solid dimgrey; +} diff --git a/paste/templates/about.html.j2 b/paste/templates/about.html.j2 new file mode 100644 index 0000000..799a06c --- /dev/null +++ b/paste/templates/about.html.j2 @@ -0,0 +1,4 @@ +{% extends "base.html.j2" %} +{% block content %} +

Gnous/Paste

+{% endblock %} diff --git a/paste/templates/base.html.j2 b/paste/templates/base.html.j2 new file mode 100644 index 0000000..babbb6d --- /dev/null +++ b/paste/templates/base.html.j2 @@ -0,0 +1,22 @@ + + + + + Gnous/Paste + + + + + +
+ {% block content %} + {% endblock %} +
+ + diff --git a/paste/templates/home.html.j2 b/paste/templates/home.html.j2 index cc8ccee..c164647 100755 --- a/paste/templates/home.html.j2 +++ b/paste/templates/home.html.j2 @@ -1,5 +1,7 @@ -
- +{% extends "base.html.j2" %} +{% block content %} + + @@ -18,4 +20,4 @@

Paste {{ messages[0] }} deleted

{% endif %} {% endwith %} - +{% endblock %}