tweak back card styling for series list
This commit is contained in:
parent
3ef82c8024
commit
b5412d5d33
|
@ -347,7 +347,7 @@ def publish(args):
|
||||||
with open(viewer_dir / 'index.html', 'w') as f:
|
with open(viewer_dir / 'index.html', 'w') as f:
|
||||||
f.write(viewer_template.render(depth=3, work=work, title=title, images=images))
|
f.write(viewer_template.render(depth=3, work=work, title=title, images=images))
|
||||||
|
|
||||||
def make_categorization(categorization, query, work_filter):
|
def make_categorization(categorization, query, work_filter, work_style_cards=False):
|
||||||
categorization_dir = args.destdir / 'site' / categorization
|
categorization_dir = args.destdir / 'site' / categorization
|
||||||
|
|
||||||
cats = [cat for (cat,) in cur.execute(query)]
|
cats = [cat for (cat,) in cur.execute(query)]
|
||||||
|
@ -374,6 +374,7 @@ def publish(args):
|
||||||
categorization=categorization,
|
categorization=categorization,
|
||||||
categories=cats,
|
categories=cats,
|
||||||
samples=cat_samples,
|
samples=cat_samples,
|
||||||
|
work_style_cards=work_style_cards,
|
||||||
))
|
))
|
||||||
|
|
||||||
make_categorization(
|
make_categorization(
|
||||||
|
@ -395,6 +396,7 @@ def publish(args):
|
||||||
'series',
|
'series',
|
||||||
'SELECT DISTINCT series FROM works WHERE series NOT NULL ORDER BY series',
|
'SELECT DISTINCT series FROM works WHERE series NOT NULL ORDER BY series',
|
||||||
lambda series: lambda work: work['series'] == series,
|
lambda series: lambda work: work['series'] == series,
|
||||||
|
work_style_cards=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
with resources.as_file(resources.files("dlibrary")) as r:
|
with resources.as_file(resources.files("dlibrary")) as r:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{% include 'nav.html' %}
|
{% include 'nav.html' %}
|
||||||
<div class="card-listing">
|
<div class="card-listing">
|
||||||
{% for cat in categories %}
|
{% for cat in categories %}
|
||||||
<div class="card category">
|
<div class="card {% if not work_style_cards %}category{% endif %}">
|
||||||
<a href="{{ root() }}{{ categorization }}/{{ urlcat(cat) }}/">
|
<a href="{{ root() }}{{ categorization }}/{{ urlcat(cat) }}/">
|
||||||
<div class="card-title">
|
<div class="card-title">
|
||||||
{{ cat }}
|
{{ cat }}
|
||||||
|
|
Loading…
Reference in a new issue