login
Added login functionality. It's a bit clunky, but it deas what it needs to. Testing needed. The header now has a search bar, but the page itself needs to be created.
This commit is contained in:
parent
d4016ce80c
commit
dda864a92e
10 changed files with 153 additions and 29 deletions
|
@ -11,7 +11,15 @@
|
|||
<header>
|
||||
<span id="title">{{title}}</span>
|
||||
<div id="container">
|
||||
<button class="big-button">🔎</div>
|
||||
<form action="/search" method="get">
|
||||
<input type="text" name="q" placeholder="search">
|
||||
<input type="submit" value="🔎" class="big-button" id="search-button">
|
||||
</form>
|
||||
{% if login %}
|
||||
<a href="/user/{{userdata[0]}}"><button class="big-button">{{userdata[2]}}</button></a>
|
||||
{% else %}
|
||||
<a href="/login"><button class="big-button">Login</button></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
<div id="content">
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
{% if archives|length > 0 %}
|
||||
<div class="grid-container">
|
||||
{% for arch in archives %}
|
||||
<div class="grid-item clickable"><b>{{arch[0]}}</b></div>
|
||||
<div class="grid-item"><p>{{arch[1]|spacer}}</p></div>
|
||||
<div class="grid-item"><p>{{arch[2]|ctime}}</p></div>
|
||||
<a class="grid-item" href="/view/{{arch[0]}}"><div class="grid-item clickable"><b>{{arch[1]}}</b></div></a>
|
||||
<div class="grid-item"><p>{{arch[2]|spacer}}</p></div>
|
||||
<div class="grid-item"><p>{{arch[3]|ctime}}</p></div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
15
flask/templates/login.html
Normal file
15
flask/templates/login.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block meta %}
|
||||
<link rel="stylesheet" href="/static/login.css" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/login" method="post">
|
||||
<div class="grid-container">
|
||||
<span>Username: </span><input type="text" name="username" placeholder="Username">
|
||||
<span>Password: </span><input type="password" name="password" placeholder="******">
|
||||
<input type = 'submit' value = 'Login'/>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue