Add stuff, pimp ui, ...

This commit is contained in:
Aaron Fischer 2017-03-22 01:02:51 +01:00
parent 2aeee6bc8f
commit d8ed8fd518
6 changed files with 81 additions and 22 deletions

View file

@ -0,0 +1,6 @@
{% extends "layout.html" %}
{% block content %}
<h1>Kommentarstream</h1>
<img src="/img/warning_clojure.png">
{% endblock %}

View file

@ -8,24 +8,39 @@
{% else %}
<a class="btn btn-secondary disabled" href="#">
{% endif %}
<span class="fa fa-arrow-left"></span>
Nächstes Bild
</a>
<a class="btn btn-secondary" href="/">
<span class="fa fa-home"></span>
Zur Gallerie
</a>
{% if prev-image %}
<a class="btn btn-secondary" href="/show/{{ prev-image.id }}">
{% else %}
<a class="btn btn-secondary disabled" href="#">
{% endif %}
Vorheriges Bild
<span class="fa fa-arrow-right"></span>
</a>
</div>
<div class="btn-group pull-left" role="group">
<a class="btn btn-primary btn-sm" href="/edit/{{ image.id }}">
<span class="fa fa-pencil"></span>
Bearbeiten
</a>
<a class="btn btn-danger btn-sm" href="/delete/{{ image.id }}">
<span class="fa fa-trash"></span>
Löschen
</a>
</div>
<div class="clearfix"></div>
<div class="pull-left">
<h1>{{ image.title }}</h1>
<br>
<p>{{ image.created_at|parse-date|date:"dd-MM-yyyy HH:mm" }}</p>
<br>
<div id="image-tags">
{% for tag in tags %}
<span class="tag tag-info">{{ tag.tagname }}</span>
@ -35,14 +50,19 @@
<div class="clearfix"></div>
<hr>
<div class="detail-image">
<a href="/images/raw/{{ image.hash }}.png">
<img class="card-img-top" src="/images/raw/{{ image.hash }}.png" alt="{{ image.title }}"/>
</a>
</div>
<hr>
<p>{{ image.created_at|parse-date|date:"dd-MM-yyyy HH:mm" }} Uhr</p>
{% if image.description|length > 0 %}
<div>
<div class="col-md7">
<p>{{ image.description|markdown-to-html|safe }}</p>
</div>
{% endif %}

View file

@ -1,20 +1,14 @@
{% extends "layout.html" %}
{% block content %}
<div>
{% for image in images %}
<a href="/show/{{ image.id }}" class="thumbnail-image">
<img src="/images/thumbnails/{{ image.hash }}.png" alt="{{ image.title }}">
</a>
{% endfor %}
</div>
<div class="clearfix"></div>
{% if pages|count > 1 %}
<nav aria-label="Page navigation" class="pull-right">
<ul class="pagination">
<li class="page-item{% ifequal current-page 1 %} disabled{% endifequal %}">
<a class="page-link" href="/page/{{ current-page|dec }}">Zurück</a>
<a class="page-link" href="/page/{{ current-page|dec }}">
<span class="fa fa-arrow-left"></span>
Zurück
</a>
</li>
{% for page in pages %}
@ -24,11 +18,24 @@
{% endfor %}
<li class="page-item{% ifequal current-page pages|count %} disabled{% endifequal %}">
<a class="page-link" href="/page/{{ current-page|inc }}">Weiter</a>
<a class="page-link" href="/page/{{ current-page|inc }}">
Weiter
<span class="fa fa-arrow-right"></span>
</a>
</li>
</ul>
</nav>
<div class="clearfix"></div>
{% endif %}
<div>
{% for image in images %}
<a href="/show/{{ image.id }}" class="thumbnail-image">
<img src="/images/thumbnails/{{ image.hash }}.png" alt="{{ image.title }}">
</a>
{% endfor %}
</div>
<div class="clearfix"></div>
{% endblock %}

View file

@ -6,21 +6,36 @@
<title>yenu -- the image sharing tool for friends</title>
</head>
<body>
<nav class="navbar navbar-inverse bg-faded">
<a class="navbar-brand" href="/">yenu</a>
<nav class="navbar bg-faded fixed-top">
<a class="navbar-brand" href="/">
<img src="/img/logo.png">
yenu
</a>
<ul class="nav navbar-nav mr-auto pull-right">
<li class="nav-item">
<a class="nav-link" href="/upload">Hochladen</a>
<a class="nav-link" href="/upload">
<span class="fa fa-upload"></span>
Hochladen
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/comments">Kommentarstream</a>
<a class="nav-link" href="/comments">
<span class="fa fa-comments"></span>
Kommentarstream
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/stats">Statistik</a>
<a class="nav-link" href="/statistics">
<span class="fa fa-bar-chart"></span>
Statistik
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Ausloggen</a>
<a class="nav-link" href="/logout">
<span class="fa fa-sign-out"></span>
Ausloggen
</a>
</li>
</ul>
</nav>

View file

@ -0,0 +1,6 @@
{% extends "layout.html" %}
{% block content %}
<h1>Statistiken</h1>
<img src="/img/warning_clojure.png">
{% endblock %}

View file

@ -48,5 +48,10 @@
;;:ext #"(png|jpg)"
]
[type hash ext]
(image-file type hash ext)))
(image-file type hash ext))
(GET "/statistics" []
(layout/render "statistics.html"))
(GET "/comments" []
(layout/render "comments.html")))