Primer upload, esta en un estado bastante decente la pagina <3

This commit is contained in:
Daniel Cortes
2019-02-13 06:12:24 -03:00
commit 85dc398ab6
22 changed files with 1671 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
{% extends 'base.html' %}
{% block title %}admin/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 %}

46
www/templates/base.html Normal file
View File

@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>~/daniel-cortes/{% 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') }}">
</head>
<body>
<nav class="navbar">
<div class="container">
<a href="{{ url_for('index') }}" class="nav-brand">~/daniel-cortes</a>
<a href="{{ url_for('blog.index') }}" class="nav-link">/blog</a>
<a href="{{ url_for('projects.index') }}" class="nav-link">/projects</a>
<a href="{{ url_for('recommended.index') }}" class="nav-link">/recomended</a>
<a href="{{ url_for('now.index') }}" class="nav-link">/now</a>
{% if g.user %}
<a href="{{ url_for('blog.create') }}" class="nav-link logout">/create-post</a>
<a href="{{ url_for('now.update') }}" class="nav-link logout">/update-now</a>
<a href="{{ url_for('admin.logout') }}" class="nav-link logout">/logout</a>
{% endif %}
</div>
</nav>
<section class="container">
<div class="row">
<div class="content">
{% block content %}{% endblock %}
</div>
<div class="side">
<p>Hola! Esta es mi pagina la cual se me ocurrio crear por que puedo y tengo que usar mi VPS para algo.</p>
<p>Soy estudiante de Ingenieria Informatica y me gusta crear cosas en backend web y aplicaciones de escritorio por el momento.</p>
<p>Como se nota, lo peor que hago es diseño, aunque algo se intenta.</p>
<hr>
<ul>
<li><a href="twitter.com/skrd159">@skrd159</a></li>
<li><a href="reddit.com/user/Ryuuji159">/u/ryuuji159</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,15 @@
{% extends 'base.html' %}
{% block title %}blog/create{% endblock %}
{% block content %}
<form method="post">
<label for="title">~/title:</label>
<input type="text" class="u-full-width" id="title" name="title">
<label for="markdown">~/content:</label>
<textarea class="u-full-width" id="markdown" name="markdown"></textarea>
<label for="resume">~/resume:</label>
<textarea class="u-full-width" id="resume" name="resume"></textarea>
<input class="button-primary" type="submit" value="Upload">
</form>
{% endblock %}

View File

@@ -0,0 +1,25 @@
{% extends 'base.html' %}
{% block title %}blog{% endblock %}
{% block content %}
{% if not posts %}
<a href="https://www.youtube.com/watch?v=3-CNVOB6LE0">Nothing But Crickets!</a>
{% endif %}
{% for post in posts %}
<section class="post-preview">
<header class="post-title">
<a href="{{ url_for('blog.view', id=post['id']) }}">{{ post['title'] }}</a>
<p class="u-pull-right">{{post['created_at'].strftime('%Y-%m-%d')}}</p>
</header>
<article class="post-resume">
<p>{{ post['resume']}}</p>
</article>
</section>
{% if not loop.last %}
<hr>
{% endif %}
{% endfor %}
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends 'base.html' %}
{% block title %}blog/update/"{{ post['title'] }}"{% endblock %}
{% block content %}
<form method="post">
<label for="title">~/title:</label>
<input type="text" class="u-full-width" id="title" name="title" value={{ request.form['title'] or post['title'] }}>
<label for="markdown">~/content:</label>
<textarea class="u-full-width" id="markdown" name="markdown">{{ request.form['markdown'] or post['markdown'] }}</textarea>
<label for="resume">~/resume:</label>
<textarea class="u-full-width" id="resume" name="resume">{{ request.form['resume'] or post['resume'] }}</textarea>
<input class="button-primary" type="submit" value="upload">
</form>
{% endblock %}

View File

@@ -0,0 +1,22 @@
{% extends 'base.html' %}
{% block title %}blog/"{{ post['title'] }}"{% endblock %}
{% block content %}
<section class="post">
<article class="post-content">
{{ post['html']|safe }}
</article>
</section>
{% if g.user %}
<div class="row">
<form action="{{ url_for('blog.delete', id=post['id']) }}" method="post">
<input type="submit" class="button-primary u-pull-right" value="delete" onclick="return confirm('Estas seguro?')">
</form>
<a href="{{ url_for('blog.update', id=post['id']) }}" class="button button-primary u-pull-left">update</a>
</div>
{% endif %}
{% endblock %}

9
www/templates/empty.html Normal file
View File

@@ -0,0 +1,9 @@
{% extends 'base.html' %}
{% block title %}/dev/null{% endblock %}
{% block content %}
<a href="https://www.youtube.com/watch?v=3-CNVOB6LE0">Nothing But Crickets!</a>
{% endblock %}

View File

@@ -0,0 +1,16 @@
{% extends 'base.html' %}
{% block title %}now{% endblock %}
{% block content %}
<article class="now">
{{ now['html']|safe }}
</article>
{% if g.user %}
<div class="row">
<a href="{{ url_for('now.update') }}" class="button button-primary">update</a>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,11 @@
{% extends 'base.html' %}
{% block title %}now/update{% endblock %}
{% block content %}
<form method="post">
<label for="markdown">~/content:</label>
<textarea class="u-full-width" id="markdown" name="markdown">{{ request.form['markdown'] or now['markdown'] }}</textarea>
<input class="button-primary" type="submit" value="upload">
</form>
{% endblock %}