Primer upload

This commit is contained in:
Daniel Cortes
2019-02-19 01:19:41 -03:00
commit 2633f84fc7
14 changed files with 1299 additions and 0 deletions

View 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
View 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>

View 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 %}

View 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 %}