hallo
This commit is contained in:
17
app.py
17
app.py
@@ -6,8 +6,13 @@ app = Flask(__name__)
|
||||
app.secret_key = "HURENSOHN"
|
||||
|
||||
@app.route('/')
|
||||
def hello_world(): # put application's code here
|
||||
return render_template("index.html")
|
||||
def index():
|
||||
return render_template('base.html',
|
||||
site_name='Mein Spiel Wiki',
|
||||
current_year=2025,
|
||||
popular_items=[],
|
||||
categories=[]
|
||||
)
|
||||
|
||||
|
||||
@app.route('/login', methods=['GET', 'POST'])
|
||||
@@ -18,6 +23,14 @@ def login():
|
||||
def register():
|
||||
return render_template("register.html")
|
||||
|
||||
@app.route('/logout')
|
||||
def logout():
|
||||
session.pop()
|
||||
return redirect(url_for('index'))
|
||||
|
||||
@app.route('/search', methods=['POST'])
|
||||
def search():
|
||||
return ""
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
|
||||
@@ -6,12 +6,9 @@
|
||||
<title>{% block title %}Spiel-Fandom{% endblock %} — {{ site_name or 'My Game Wiki' }}</title>
|
||||
<meta name="description" content="{% block description %}Fandom-Seite für {{ site_name or 'ein Spiel' }}{% endblock %}">
|
||||
|
||||
<meta charstet="utf-8"><link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<!-- Google Font (optional) -->
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap" rel="stylesheet">
|
||||
<link rel="icon" type="image/x-icon" href="/static/HURENSOHN.ico">
|
||||
|
||||
<!-- Basis-CSS (kleines, leichtes Fandom-Look) -->
|
||||
<style>
|
||||
@@ -96,9 +93,6 @@
|
||||
|
||||
<nav style="margin-top:12px;color:var(--muted)">
|
||||
<a href="{{ url_for('index') }}">Startseite</a>
|
||||
<a href="{{ url_for('categories') }}">Kategorien</a>
|
||||
<a href="{{ url_for('recent') }}">Neueste Änderungen</a>
|
||||
<a href="{{ url_for('about') }}">Über</a>
|
||||
</nav>
|
||||
|
||||
<div class="grid">
|
||||
@@ -164,7 +158,7 @@
|
||||
|
||||
<footer>
|
||||
<div>© {{ current_year or 2025 }} {{ site_name or 'Game Fandom' }} — Erstellt mit ❤️</div>
|
||||
<div style="margin-top:6px;color:var(--muted);font-size:0.85rem">Powered by Flask • <a href="{{ url_for('privacy') }}">Datenschutz</a></div>
|
||||
<div style="margin-top:6px;color:var(--muted);font-size:0.85rem">Powered by Flask • <a href="#">Datenschutz</a></div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -180,5 +174,4 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
</body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
|
||||
</html>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}
|
||||
HURENSOHN
|
||||
{% endblock %}
|
||||
{% block huso %}
|
||||
HURENSOHN
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Startseite{% endblock %}
|
||||
{% block page_title %}Willkommen im {{ site_name or 'Game Fandom' }}{% endblock %}
|
||||
{% block content %}
|
||||
<p>Dies ist die Startseite deines Wikis. Wähle eine Kategorie oder suche nach Artikeln.</p>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Login{% endblock %}
|
||||
{% block page_title %}Anmelden{% endblock %}
|
||||
{% block content %}
|
||||
<form method="post" action="{{ url_for('login') }}" class="auth-form">
|
||||
<label for="username">Benutzername</label>
|
||||
<input type="text" id="username" name="username" required>
|
||||
|
||||
|
||||
<label for="password">Passwort</label>
|
||||
<input type="password" id="password" name="password" required>
|
||||
|
||||
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
<p>Noch keinen Account? <a href="{{ url_for('register') }}">Jetzt registrieren</a>.</p>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Registrieren{% endblock %}
|
||||
{% block page_title %}Registrieren{% endblock %}
|
||||
{% block content %}
|
||||
<form method="post" action="{{ url_for('register') }}" class="auth-form">
|
||||
<label for="username">Benutzername</label>
|
||||
<input type="text" id="username" name="username" required>
|
||||
|
||||
|
||||
<label for="email">E-Mail</label>
|
||||
<input type="email" id="email" name="email" required>
|
||||
|
||||
|
||||
<label for="password">Passwort</label>
|
||||
<input type="password" id="password" name="password" required>
|
||||
|
||||
|
||||
<label for="confirm">Passwort bestätigen</label>
|
||||
<input type="password" id="confirm" name="confirm" required>
|
||||
|
||||
|
||||
<button type="submit">Registrieren</button>
|
||||
</form>
|
||||
<p>Schon ein Konto? <a href="{{ url_for('login') }}">Zum Login</a>.</p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user