show description in mobile view

This commit is contained in:
j 2023-08-31 12:22:57 +01:00
parent 628bc728ed
commit 900f9bb44d
2 changed files with 3 additions and 1 deletions

View file

@ -25,6 +25,8 @@ def index(request, fragment):
document = Document.objects.filter(id=ox.fromAZ(id)).first() document = Document.objects.filter(id=ox.fromAZ(id)).first()
if document and document.access(request.user): if document and document.access(request.user):
context['title'] = document.data['title'] context['title'] = document.data['title']
if document.data.get('description'):
context['description'] = document.data['description']
link = request.build_absolute_uri(document.get_absolute_url()) link = request.build_absolute_uri(document.get_absolute_url())
# FIXME: get preview image or fragment parse from url # FIXME: get preview image or fragment parse from url
public_id = ox.toAZ(document.id) public_id = ox.toAZ(document.id)

View file

@ -22,7 +22,7 @@
<img src="/{{id}}/{{icon}}128.jpg" alt="" style="padding-top: 64px; -moz-user-drag: none; -o-user-drag: none; -webkit-user-drag: none"> <img src="/{{id}}/{{icon}}128.jpg" alt="" style="padding-top: 64px; -moz-user-drag: none; -o-user-drag: none; -webkit-user-drag: none">
<div style="position: absolute; width: 512px; left: 0; right: 0; margin: auto; -moz-user-select: text; -o-user-select: text; -webkit-user-select: text"> <div style="position: absolute; width: 512px; left: 0; right: 0; margin: auto; -moz-user-select: text; -o-user-select: text; -webkit-user-select: text">
<div style="padding: 16px 0 8px 0; font-weight: bold; font-size: 13px">{{title}}</div> <div style="padding: 16px 0 8px 0; font-weight: bold; font-size: 13px">{{title}}</div>
<div>{{description_html|safe}}</div> <div>{{description|safe}}</div>
{% for c in clips %} {% for c in clips %}
<div style="clear:both; padding-top: 4px"> <div style="clear:both; padding-top: 4px">
<img src="/{{id}}/96p{{c.in}}.jpg" alt="" style="float: left; margin-right: 8px"> <img src="/{{id}}/96p{{c.in}}.jpg" alt="" style="float: left; margin-right: 8px">