From 58712acb99632c0c04e463327d333a879374036d Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Wed, 17 Jan 2024 00:47:23 +0100 Subject: [PATCH] Add HTML --- content/epubs/this-soviet-world/contents.lr | 2 ++ models/book.ini | 8 ++++++-- templates/bib.html | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/content/epubs/this-soviet-world/contents.lr b/content/epubs/this-soviet-world/contents.lr index 6b24c32..73a9e63 100644 --- a/content/epubs/this-soviet-world/contents.lr +++ b/content/epubs/this-soviet-world/contents.lr @@ -11,3 +11,5 @@ https://annas-archive.org/md5/3c2da922ea78b91c28c2b81b5c2da556, this-soviet-worl --- epub: this-soviet-world.epub, https://archive.org/details/this-soviet-world-anna-louise-strong +--- +html: this-soviet-world diff --git a/models/book.ini b/models/book.ini index 7d42519..f804934 100644 --- a/models/book.ini +++ b/models/book.ini @@ -26,10 +26,14 @@ type = string label = epub file name type = strings -[fields.image] -label = Image name +[fields.html] +label = html folder name type = string [fields.orig] label = Origin URL type = strings + +[fields.image] +label = Image name +type = string diff --git a/templates/bib.html b/templates/bib.html index a7e2ddb..8cf0b85 100644 --- a/templates/bib.html +++ b/templates/bib.html @@ -12,6 +12,7 @@
  • {{ post.title }} {% if post.epub %}{% for item in post.epub %}[{% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}{{ url.split('://')[1].split('/')[0] }}{% else %}EPUB{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}] {% endfor %}{% endif %} + {% if post.html %}[HTML]{% endif %} {% if post.orig %}{% for item in post.orig %}({% set urls = item.split(", ") %}{% for url in urls %}{% if "http" in url %}{{ url.split('://')[1].split('/')[0] }}{% else %}cached{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}) {% endfor %}{% endif %}
    {% if post.subtitle %}{{ post.subtitle }}
    {% endif %} {% if post.author %}by {{ post.author }}
    {% endif %}