initial commit; mostly boilerplate code so far

This commit is contained in:
eclipse 2025-04-17 20:31:06 +02:00
commit fe0a1119d0
8 changed files with 3748 additions and 0 deletions

13
.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
venv/
*.pyc
__pycache__/
instance/
.pytest_cache/
.coverage
htmlcov/
dist/
build/
*.egg-info/

9
the_works/__init__.py Normal file
View File

@ -0,0 +1,9 @@
from flask import Flask
from the_works import pages
def create_app():
app = Flask(__name__)
app.register_blueprint(pages.bp)
return app

11
the_works/pages.py Normal file
View File

@ -0,0 +1,11 @@
from flask import Blueprint, render_template
bp = Blueprint("pages", __name__)
@bp.route("/")
def home():
return render_template("pages/home.html")
@bp.route("/about")
def about():
return render_template("pages/about.html")

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
<nav>
<ul>
<li><a href="{{ url_for('pages.home') }}">Home</a></li>
<li><a href="{{ url_for('pages.about') }}">About</a></li>
</ul>
</nav>

View File

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The Works {% block title %}{% endblock title %}</title>
<meta name="description" content="Frontend für die Verwaltung von Texten und Veröffentlichungen" />
<meta name="author" content="Tobias Radloff" />
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='pico.classless.azure.css') }}">
<!--<link rel="apple-touch-icon" sizes="180x180" href="../icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="../icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../icons/favicon-16x16.png">
<link rel="manifest" href="site.webmanifest">
<link rel="mask-icon" href="../icons/safari-pinned-tab.svg" color="#004aa5">
<link rel="shortcut icon" href="../icons/favicon.ico">
<meta name="msapplication-TileColor" content="#004aa5">
<meta name="msapplication-config" content="../icons/browserconfig.xml">
<meta name="theme-color" content="gold">-->
</head>
<body>
<header>
{% include("_nav.html") %}
</header>
<main role="document">
<header>
{% block header %}{% endblock header %}
</header>
{% block content %}<p>No messages.</p>{% endblock content %}
</main>
<aside id="sidebar">
</aside>
<footer>
</footer>
</body>
</html>

View File

@ -0,0 +1,9 @@
{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}About{% endblock title %}</h1>
{% endblock header %}
{% block content %}
<p>This is a message board for friendly messages.</p>
{% endblock content %}

View File

@ -0,0 +1,9 @@
{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}Home{% endblock title %}</h1>
{% endblock header %}
{% block content %}
<p>Learn more about this project by visiting the <a href="{{ url_for('pages.about') }}">About page</a>.</p>
{% endblock content %}