Se dejo mas bonito, con una vista de preview donde puedo editar los nombres de los archivos o eliminarlos ademas de una vista de about, donde alguien puede contactarme en caso de haber algun problema con sus imagenes

This commit is contained in:
Daniel Cortes
2019-02-20 03:42:27 -03:00
parent 6e9af8302d
commit 9f7d1b668b
10 changed files with 177 additions and 6 deletions

View File

@@ -0,0 +1,21 @@
{% extends 'base.html' %}
{% block title %}about{% endblock %}
{% block content %}
<h3>About This</h3>
<p>This page is a simple static file server mainly for things that i want to link in my main webpage. If for some reason, one of the files uploaded here belongs to you, and you dont want it here, send me a message and I will contact you.</p>
{% for message in get_flashed_messages() %}
<li class="flash">{{ message }}!!</li>
{% endfor %}
<form method="post">
<label for="name">~/name:</label>
<input type="text" class="u-full-width" id="name" name="name">
<label for="email">~/email:</label>
<input type="email" class="u-full-width" id="email" name="email">
<label for="message">~/message:</label>
<textarea id="message" name="message" class="u-full-width"></textarea>
<input type="submit" class="button-primary" value="Send">
</form>
{% endblock %}

View File

@@ -0,0 +1,10 @@
{% extends 'base.html' %}
{% block title %}about/thanks{% endblock %}
{% block content %}
<h3>Thanks</h3>
<p>
Thanks for sending a message, I will send you an email as soon as possible.
</p>
{% endblock %}

View File

@@ -12,6 +12,7 @@
<nav class="navbar">
<div class="container">
<a href="{{ url_for('index') }}" class="nav-brand">/files</a>
<a href="{{ url_for('about') }}" class="nav-link">/about</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>

View File

@@ -5,7 +5,7 @@
{% block content %}
<div class="file-listing">
{% for filename in filenames %}
<a href="{{ url_for('files.uploaded_file', filename=filename) }}">{{ filename }}</a>
<a href="{{ url_for('files.preview_file', filename=filename) }}">{{ filename }}</a>
{% endfor %}
</div>
{% endblock %}

View File

@@ -0,0 +1,26 @@
{% extends 'base.html' %}
{% block title %}preview/{{ filename }}{% endblock %}
{% block content %}
{% if g.user %}
<form method="post" action={{ url_for('files.delete_file', filename=filename) }}>
<input type="submit" class="button-primary u-pull-right" value="delete">
</form>
{% endif %}
<div class="row">
<h3 class="u-pull-left"><a href="{{ url_for('files.uploaded_file', filename=filename) }}">{{ filename }}</a></h3>
</div>
<img src="{{ url_for('files.uploaded_file', filename=filename) }}">
{% if g.user %}
<form action="{{ url_for('files.rename_file', filename=filename) }}" method="post">
<label for="new_name">~/rename</label>
<input type="text" class="u-full-width" id="new_name" name="new_name" value="{{ filename }}">
<input type="submit" class="button-primary u-pull-right" value="rename">
</form>
{% endif %}
{% endblock %}