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

View file

@ -1,20 +1,14 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% 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 %} {% if pages|count > 1 %}
<nav aria-label="Page navigation" class="pull-right"> <nav aria-label="Page navigation" class="pull-right">
<ul class="pagination"> <ul class="pagination">
<li class="page-item{% ifequal current-page 1 %} disabled{% endifequal %}"> <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> </li>
{% for page in pages %} {% for page in pages %}
@ -24,11 +18,24 @@
{% endfor %} {% endfor %}
<li class="page-item{% ifequal current-page pages|count %} disabled{% endifequal %}"> <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> </li>
</ul> </ul>
</nav> </nav>
<div class="clearfix"></div> <div class="clearfix"></div>
{% endif %} {% 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 %} {% endblock %}

View file

@ -6,21 +6,36 @@
<title>yenu -- the image sharing tool for friends</title> <title>yenu -- the image sharing tool for friends</title>
</head> </head>
<body> <body>
<nav class="navbar navbar-inverse bg-faded"> <nav class="navbar bg-faded fixed-top">
<a class="navbar-brand" href="/">yenu</a> <a class="navbar-brand" href="/">
<img src="/img/logo.png">
yenu
</a>
<ul class="nav navbar-nav mr-auto pull-right"> <ul class="nav navbar-nav mr-auto pull-right">
<li class="nav-item"> <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>
<li class="nav-item"> <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>
<li class="nav-item"> <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>
<li class="nav-item"> <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> </li>
</ul> </ul>
</nav> </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)" ;;:ext #"(png|jpg)"
] ]
[type hash ext] [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")))