Compare commits

..

2 commits

Author SHA1 Message Date
Ada
97ac3b1175 begin fron work
Some checks failed
ci/woodpecker/push/lint Pipeline failed
2023-09-27 10:57:58 +02:00
Ada
190e4ac2b9 remove(lint): deprecated format option 2023-09-26 16:12:57 +02:00
6 changed files with 97 additions and 4 deletions

View file

@ -87,3 +87,7 @@ def get_content(path: str) -> str:
return render_template("content.html.j2") return render_template("content.html.j2")
return abort(404) return abort(404)
@home.route("/about")
def about() -> str:
return render_template("about.html.j2")

62
paste/static/css/main.css Normal file
View file

@ -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;
}

View file

@ -0,0 +1,4 @@
{% extends "base.html.j2" %}
{% block content %}
<p>Gnous/Paste</p>
{% endblock %}

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Gnous/Paste</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}"/>
</head>
<body>
<nav class="menu">
<ul class="menu">
<li class="menu" {% if request.path == "/" %}><a href="{{ url_for("home.about") }}">About</a>{% elif request.path == "/about" %}<a href="{{ url_for("home.homepage") }}">Home</a>{% endif %}</li>
|
<li class="menu"><a href="https://git.gnous.eu/gnouseu/paste">Source</a></li>
</ul>
</nav>
<main>
{% block content %}
{% endblock %}
</main>
</body>
</html>

View file

@ -1,5 +1,7 @@
<form id="paste-content" method="POST" accept-charset="UTF-8" action="{{ url_for('home.create') }}"> {% extends "base.html.j2" %}
<textarea name="content" form="paste-content">Enter text here...</textarea> {% block content %}
<form class="container" id="paste-content" method="POST" accept-charset="UTF-8" action="{{ url_for('home.create') }}">
<textarea name="content" form="paste-content" placeholder="Enter your text here"></textarea>
<label for="time">Time in second</label> <label for="time">Time in second</label>
<input id="time" name="time"> <input id="time" name="time">
<input type="submit"> <input type="submit">
@ -18,4 +20,4 @@
<p>Paste {{ messages[0] }} deleted </p> <p>Paste {{ messages[0] }} deleted </p>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
{% endblock %}

View file

@ -59,7 +59,6 @@ exclude = [
"instances", "instances",
"schema.sql" "schema.sql"
] ]
format = "grouped"
[tool.isort] [tool.isort]
profile = "black" profile = "black"