added splash image to art categories
This commit is contained in:
parent
3b2815c87e
commit
a5e9e16b49
@ -14,8 +14,8 @@ art_print = Blueprint('art', __name__, template_folder='templates')
|
||||
@art_print.route('/')
|
||||
def root():
|
||||
tags = getTagDicts()
|
||||
print(tags)
|
||||
return render_template('art/index.html', tags = tags, urlprefix = urlprefix)
|
||||
#print(tags)
|
||||
return render_template('art/index.html', tags = tags, staticroot = staticbucketurl, urlprefix = urlprefix)
|
||||
|
||||
@art_print.route('/<tag>')
|
||||
def tag_view(tag):
|
||||
|
@ -17,6 +17,9 @@ def getTagDicts():
|
||||
for tag in tags:
|
||||
dicts.append(tag.to_dict())
|
||||
|
||||
for artdict in dicts:
|
||||
artdict['splash'] = artdict['splash'].get().to_dict()
|
||||
|
||||
return dicts
|
||||
|
||||
def getPopulatedTagDict(name):
|
||||
|
@ -3,12 +3,14 @@
|
||||
{% block title %}dev{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% for row in tags|batch(2) %}
|
||||
{% for row in tags|batch(4) %}
|
||||
<div class="row">
|
||||
{% for tag in row %}
|
||||
<div class="col-pad-6 card">
|
||||
<div class="col-pad-3 card">
|
||||
<h1>{{ tag.name }}</h1>
|
||||
<p>{{ tag.description }}</p>
|
||||
<img src="{{ staticroot }}art/{{ tag.splash.file_name }}.jpg" alt="{{ tag.splash.file_name }}">
|
||||
|
||||
<p>{{ tag.description }}{{ tag.image }}</p>
|
||||
<a href="/{{ urlprefix }}/{{ tag.doc_name }}" style="width:100%;" class="button">view</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user