Primer upload
This commit is contained in:
13
files/templates/auth/login.html
Normal file
13
files/templates/auth/login.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}auth/login{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
<label for="username">~/username:</label>
|
||||
<input type="text" class="u-full-width" id="username" name="username">
|
||||
<label for="password">~/password:</label>
|
||||
<input type="password" class="u-full-width" id="password" name="password">
|
||||
<input class="button-primary" type="submit" value="Submit">
|
||||
</form>
|
||||
{% endblock %}
|
||||
26
files/templates/base.html
Normal file
26
files/templates/base.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>/files/{% block title %}{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='normalize.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='skeleton.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='icon-32x32.png') }}">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar">
|
||||
<div class="container">
|
||||
<a href="{{ url_for('index') }}" class="nav-brand">/files</a>
|
||||
{% if g.user %}
|
||||
<a href="{{ url_for('files.upload_file') }}" class="nav-link">/upload</a>
|
||||
<a href="{{ url_for('auth.logout') }}" class="nav-link">/logout</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
12
files/templates/files/index.html
Normal file
12
files/templates/files/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="file-listing">
|
||||
{% for filename in filenames %}
|
||||
<a href="{{ url_for('files.uploaded_file', filename=filename) }}">{{ filename }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
11
files/templates/files/upload.html
Normal file
11
files/templates/files/upload.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}upload{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<input type="file" class="u-full-width" name="file">
|
||||
<input type="submit" class="button-primary" value="upload">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user