Move Callcott to epubs. Small changes to templates

This commit is contained in:
HackerNCoder 2023-12-29 15:26:36 +01:00
parent 9d904cf5cc
commit 3ff9b48373
5 changed files with 15 additions and 17 deletions

View file

@ -0,0 +1,10 @@
title: Russian Justice
---
author: Mary Stevenson Callcott
---
publisher: Macmillan Company
---
pub_date: 1935
---
orig:
https://archive.org/details/russianjustice0000mary, russianjustice.zip

View file

@ -1,11 +0,0 @@
title: Soviet Justice
---
subtitle: Possible alt name: Russian Justice. Anna uses Stevens, not Stevenson, in TSW, but most places on the internet uses -on, so I presume that's her actual name.
---
author: Mary Stevenson Callcott
---
publisher: UKN.
---
pub_date: UKN. Presumed around 1936
---
ref: This Soviet World

View file

@ -12,8 +12,8 @@
{% for post in this.children %}
<li class="bib">
<span class="bib-title">{{ post.title }}</span>
{% if post.epub %}<span class="bib-orig">{% for item in post.epub %}[{% set urls = item.split(", ") %}{% for url in urls %}{% if "https://" in url %}<a href="{{ url }}">{{ url.split('https://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/epub/{{ url }}">EPUB</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}] {% endfor %}</span>{% endif %}
{% if post.orig %}<span class="bib-orig">{% for item in post.orig %}({% set urls = item.split(", ") %}{% for url in urls %}{% if "https://" in url %}<a href="{{ url }}">{{ url.split('https://')[1].split('/')[0] }}</a>{% elif "http://" in url %}<a href="{{ url }}">{{ url.split('http://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/cache/{{ url }}">cached</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}) {% endfor %}</span>{% endif %}<br>
{% if post.epub %}<span class="bib-orig">{% for item in post.epub %}[{% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}<a href="{{ url }}">{{ url.split('://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/epub/{{ url }}">EPUB</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}] {% endfor %}</span>{% endif %}
{% if post.orig %}<span class="bib-orig">{% for item in post.orig %}({% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}<a href="{{ url }}">{{ url.split('://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/cache/{{ url }}">cached</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}) {% endfor %}</span>{% endif %}<br>
{% if post.subtitle %}<span class="bib-small-txt">{{ post.subtitle }}</span><br>{% endif %}
{% if post.author %}<span class="bib-small-txt">by {{ post.author }}</span><br>{% endif %}
{% if post.publisher %}<span class="bib-small-txt italics">{{ post.publisher}}, </span>{% endif %}<span class="bib-small-txt italics">{{ post.pub_date }}</span>

View file

@ -31,8 +31,8 @@
<p>{% if this.publisher %}{{ this.publisher }}, {% endif %}{{ this.pub_date }}</p>
{% if this.author %}<p class="italics">{{ this.author }}</p>{% endif %}
<div class="mt-2">
{% if this.epub %}<p>Download EPUB:</p>{% for item in this.epub %}<p>{% set urls = item.split(", ") %}{% for url in urls %}{% if "https://" in url %}<a href="{{ url }}">{{ url.split('https://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/epub/{{ url }}">comlib.encryptionin.space</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}</p>{% endfor %}{% endif %}
{% if this.orig %}<p {% if this.epub %}class="mt-1"{% endif %}>Download source PDF:</p>{% for item in this.orig %}<p>{% set urls = item.split(", ") %}{% for url in urls %}{% if "https://" in url %}<a href="{{ url }}">{{ url.split('https://')[1].split('/')[0] }}</a>{% elif "http://" in url %}<a href="{{ url }}">{{ url.split('http://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/cache/{{ url }}">cached</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}</p>{% endfor %}{% endif %}
{% if this.epub %}<p>Download EPUB:</p>{% for item in this.epub %}<p>{% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}<a href="{{ url }}">{{ url.split('://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/epub/{{ url }}">comlib.encryptionin.space</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}</p>{% endfor %}{% endif %}
{% if this.orig %}<p {% if this.epub %}class="mt-1"{% endif %}>Download source PDF:</p>{% for item in this.orig %}<p>{% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}<a href="{{ url }}">{{ url.split('://')[1].split('/')[0] }}</a>{% else %}<a href="/lib/cache/{{ url }}">cached</a>{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}</p>{% endfor %}{% endif %}
</div>
</div>
</div>

View file

@ -4,8 +4,7 @@
{% for href, title in [
['/wishes', 'Wishes'],
] %}
<li{% if this.is_child_of(href) %} class="active"{% endif
%}><a href="{{ href|url }}">{{ title }}</a></li>
<li{% if this.is_child_of(href) %} class="active"{% endif %}><a href="{{ href|url }}">{{ title }}</a></li>
{% endfor %}
</ul>
</nav>