forked from internetarchive/openlibrary
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Project Runeberg as a trusted book provider
This is mostly copy/pasting of existing support for Project Gutenberg, with a `s/[gG]utenberg/[rR]uneberg/` replacement, but some things have had additional adjustment (like the `download_options` HTML page). Fixes internetarchive#9983
- Loading branch information
Showing
8 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
openlibrary/templates/book_providers/runeberg_download_options.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$def with(runeberg_id) | ||
|
||
<hr> | ||
<div class="cta-section"> | ||
<p class="cta-section-title">$_("Download Options")</p> | ||
<ul class="ebook-download-options"> | ||
<li><a href="https://runeberg.org/$(runeberg_id).zip" title="$_('Download all scanned images from Project Runeberg')">$_("Scanned images")</a></li> | ||
<li><a href="https://runeberg.org/download.pl?mode=jpgzip&work=$runeberg_id" title="$_('Download all color images from Project Runeberg')">$_("Color images")</a></li> | ||
<li><a href="https://runeberg.org/download.pl?mode=html&work=$runeberg_id" title="$_('Download all HTML files from Project Runeberg')">$_("HTML")</a></li> | ||
<li><a href="https://runeberg.org/download.pl?mode=txtzip&work=$runeberg_id" title="$_('Download all text and index files from Project Runeberg')">$_("Text and index files")</a></li> | ||
<li><a href="https://runeberg.org/download.pl?mode=ocrtext&work=$runeberg_id" title="$_('Download all OCR text from Project Runeberg')">$_("OCR text")</a></li> | ||
<li><a href="https://runeberg.org/download.pl?mode=work&work=$runeberg_id">$_("More at Project Runeberg")</a></li> | ||
</ul> | ||
</div> |
22 changes: 22 additions & 0 deletions
22
openlibrary/templates/book_providers/runeberg_read_button.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
$def with(runeberg_id, analytics_attr) | ||
|
||
<div class="cta-button-group"> | ||
<a | ||
href="https://runeberg.org/$runeberg_id/" | ||
title="$_('Read eBook from Project Runeberg')" | ||
class="cta-btn cta-btn--available cta-btn--read cta-btn--external cta-btn--runeberg" | ||
target="_blank" | ||
$:analytics_attr('Read') | ||
aria-haspopup="true" | ||
aria-controls="runeberg-toast" | ||
>$_('Read')</a> | ||
</div> | ||
|
||
$if render_once('runeberg-toast'): | ||
<div class="toast toast--book-provider" data-toast-trigger=".cta-btn--runeberg" id="runeberg-toast" style="display:none"> | ||
<div class="toast__body"> | ||
$:_('This book is available from <a href="https://runeberg.org/">Project Runeberg</a>. Project Runeberg is a trusted book provider of classic Nordic (Scandinavian) literature in electronic form.') | ||
<a href="https://runeberg.org/admin/">$_("Learn more")</a> | ||
</div> | ||
<a class="toast__close">×<span class="shift">$_("Close")</span></a> | ||
</div> |