Explain file types. Link book pages. Add HTML link

This commit is contained in:
HackerNCoder 2024-01-24 02:57:49 +01:00
parent a8b62743e4
commit fa9801c9bf
3 changed files with 5 additions and 4 deletions

View file

@ -4,6 +4,6 @@ title: Welcome to the Comrades Library!
--- ---
body: body:
Here are some EPUBs I made. EPUB is an ebook format, you will need a program to read it (e.g. Calibre on PC or Koreader on Android), or an ebook reader (Kobo, etc.)
HTML is the format used for web browsers. You can read the books online in your browser using this format.
[Source code for website](https://lab.encryptionin.space/hackerncoder/comlib) Lastly, you can download the PDF (scan of the print book) used as a source to create the ebook at (<website\>, cached)

View file

@ -10,7 +10,7 @@
<ul class="list-none"> <ul class="list-none">
{% for post in this.children %} {% for post in this.children %}
<li class="bib"> <li class="bib">
<span class="bib-title">{{ post.title }}</span> <span class="bib-title"><a href="{{ post|url }}">{{ post.title }}</a></span>
{% 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.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.html %}<span class="bib-orig">[<a href="/lib/html/{{ post.html }}/">HTML</a>]</span>{% endif %} {% if post.html %}<span class="bib-orig">[<a href="/lib/html/{{ post.html }}/">HTML</a>]</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.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>

View file

@ -30,6 +30,7 @@
{% if this.subtitle %}<p class="subtitle">{{ this.subtitle }}</p>{% endif %} {% if this.subtitle %}<p class="subtitle">{{ this.subtitle }}</p>{% endif %}
<p>{% if this.publisher %}{{ this.publisher }}, {% endif %}{{ this.pub_date }}</p> <p>{% if this.publisher %}{{ this.publisher }}, {% endif %}{{ this.pub_date }}</p>
{% if this.author %}<p class="italics">{{ this.author }}</p>{% endif %} {% if this.author %}<p class="italics">{{ this.author }}</p>{% endif %}
{% if this.html %}<p class="mt-1"><a href="/lib/html/{{ this.html }}/">Read online</a></p>{% endif %}
<div class="mt-2"> <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 "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.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 %} {% 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 %}