Refactored, redesigned Authmethods
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{% if loggedin %}
|
||||
<button hx-get="/auth/sessioninfo" hx-target="#main-frame">Username</button>
|
||||
<button onclick="if(confirm('Abmelden?')){location.href = '/auth/logout';}">Abmelden</button>
|
||||
{% else %}
|
||||
<button hx-get="/auth/login" hx-target="#main-frame">Anmelden</button>
|
||||
<button hx-get="/auth/newuser" hx-target="#main-frame">Neuen Account erstellen</button>
|
||||
{% endif %}
|
||||
|
||||
<a href="/docs/impressum.html">Impressum</a>
|
||||
<a href="/docs/datenschutz.html">Datenschutz</a>
|
||||
<a href="/docs/kontakt.html">Kontakt</a>
|
||||
@@ -1,5 +1,5 @@
|
||||
<h2>Einloggen</h2>
|
||||
<form hx-post="/auth/login" hx-target="#auth-rendertarget" hx-indicator=".loading">
|
||||
<form action="/auth/login" method="post" >
|
||||
<input type="text" name="user" placeholder="Nutzername" value="{{ username }}"><br>
|
||||
<input type="password" name="pass" placeholder="Passphrase"><br>
|
||||
<label>Automatisch abmelden in:</label>
|
||||
|
||||
@@ -5,7 +5,11 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
|
||||
<link rel="preconnect" href="https://github.io/">
|
||||
<link rel="stylesheet" href="https://vetrivelcsamy.github.io/cheltenham-classic/cheltenhamclassic.css">
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
|
||||
<script
|
||||
src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"
|
||||
integrity="sha384-/TgkGk7p307TH7EXJDuUlgG3Ce1UVolAOFopFekQkkXihi5u/6OCvVKyz1W+idaz"
|
||||
@@ -22,15 +26,14 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a href="/docs/impressum.html">Impressum</a>
|
||||
<a href="/docs/datenschutz.html">Datenschutz</a>
|
||||
<a href="/docs/kontakt.html">Kontakt</a>
|
||||
<div hx-get="/auth/headerbar" hx-trigger="load"></div>
|
||||
<div class="htmx-indicator loading"></div>
|
||||
<h1>Kontrollverlust</h1>
|
||||
<span>Verbuggte scheise hier. Komm hack mich doch, trau dich!</span>
|
||||
<div id="uptime-counter"></div>
|
||||
|
||||
<div hx-get="/header" hx-trigger="load"></div>
|
||||
<div id="main-frame">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+11
-10
@@ -1,15 +1,16 @@
|
||||
{% for p in posts %}
|
||||
|
||||
<div class="post">
|
||||
<div class="meta">
|
||||
{{ p[6] }} - {{ p[3] | timestamp }} <br>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ p[4] }}
|
||||
</div>
|
||||
{% if p[5] != 'none' %}
|
||||
<img src="/{{ p[5] }}">
|
||||
{% endif %}
|
||||
<div class="entry">
|
||||
<div class="meta">
|
||||
{{ p[6] }} - {{ p[3] | timestamp }} <br>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{ p[4] }}</p>
|
||||
</div>
|
||||
{% if p[5] != 'none' %}
|
||||
<img src="/{{ p[5] }}">
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="auth-rendertarget"></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div hx-get="/entry/create" hx-trigger="load" id="entry-rendertarget"></div>
|
||||
|
||||
Reference in New Issue
Block a user