From b0fadf2591f3af957c1c8e0307d0bcef9e9f8538 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 27 Apr 2023 13:44:45 +0200 Subject: [PATCH 1/1] Moving forward. --- src/catalogue/api/views.py | 5 +- ...bookmedia_duration_alter_bookmedia_type.py | 23 + src/catalogue/models/book.py | 15 + src/catalogue/models/bookmedia.py | 3 +- src/catalogue/static/2022/book/filter.js | 21 +- src/catalogue/static/player/2022_player.js | 154 +++++- .../catalogue/2022/author_detail.html | 120 +++-- .../templates/catalogue/2022/book_box.html | 11 +- .../templates/catalogue/2022/book_detail.html | 60 ++- .../templates/catalogue/2022/collections.html | 16 +- .../catalogue/2022/tag_catalogue.html | 44 ++ .../catalogue/audiobook_zip_readme.txt | 12 +- .../templates/catalogue/book_list.html | 2 +- .../templates/catalogue/book_text.html | 57 ++- .../templates/catalogue/preview_ad.html | 6 +- .../catalogue/preview_ad_homepage.html | 21 +- .../catalogue/snippets/2022_jplayer.html | 19 +- .../snippets/2022_jplayer_reader.html | 99 ++++ .../templates/catalogue/viewer_base.html | 3 +- src/catalogue/templatetags/catalogue_tags.py | 13 +- src/catalogue/urls.py | 13 +- src/catalogue/views.py | 18 +- src/club/admin.py | 30 +- src/club/management/commands/send_receipts.py | 1 + src/club/models.py | 3 +- src/club/templates/club/receipt.texml | 2 +- src/club/templates/club/receipt_email.txt | 2 +- src/experiments/experiments.py | 8 +- src/funding/templates/funding/thanks.html | 2 +- .../picture/2022/picture_detail.html | 7 +- src/picture/views.py | 30 +- src/pz/admin.py | 2 + src/search/views.py | 22 +- .../templates/social/2022/my_shelf.html | 23 +- .../templates/social/carousel_2022.html | 10 +- src/social/templatetags/social_tags.py | 4 +- src/social/views.py | 9 +- src/sponsors/templates/sponsors/page.html | 1 - src/wolnelektury/settings/apps.py | 1 + src/wolnelektury/settings/custom.py | 4 + src/wolnelektury/settings/static.py | 1 + src/wolnelektury/static/2021/scripts/main.js | 104 ++-- src/wolnelektury/static/2022/more.scss | 289 ++--------- .../static/2022/styles/base/_fonts.scss | 66 ++- .../static/2022/styles/base/_global.scss | 8 + .../2022/styles/components/_avatar.scss | 6 + .../2022/styles/components/_hamburger.scss | 20 +- .../static/2022/styles/components/_media.scss | 31 +- .../2022/styles/components/_module.scss | 2 + .../2022/styles/components/_payments.scss | 3 + .../2022/styles/components/_player.scss | 111 ++++- .../2022/styles/components/_read_more.scss | 3 + .../2022/styles/components/_select.scss | 7 + .../2022/styles/components/_support.scss | 28 +- .../static/2022/styles/layout/_books.scss | 29 +- .../static/2022/styles/layout/_button.scss | 19 +- .../static/2022/styles/layout/_checkout.scss | 42 +- .../2022/styles/layout/_collections.scss | 16 +- .../static/2022/styles/layout/_container.scss | 9 +- .../static/2022/styles/layout/_content.scss | 6 +- .../static/2022/styles/layout/_footer.scss | 66 +-- .../static/2022/styles/layout/_main.scss | 2 +- .../static/2022/styles/layout/_module.scss | 3 + .../2022/styles/layout/_navigation.scss | 280 +++++++++-- .../static/2022/styles/layout/_quotes.scss | 84 +--- .../static/2022/styles/layout/_search.scss | 45 ++ .../static/2022/styles/layout/_section.scss | 14 +- .../static/2022/styles/layout/_simple.scss | 141 ++++++ .../static/2022/styles/layout/_taglist.scss | 18 + .../static/2022/styles/layout/_themes.scss | 13 +- .../2022/styles/layout/_your-books.scss | 30 +- .../static/2022/styles/local.scss | 56 ++- .../static/2022/styles/pages/_book.scss | 8 + .../static/2022/styles/pages/_homepage.scss | 300 +++++------ .../static/2022/styles/pages/_module.scss | 3 +- .../static/2022/styles/reader_player.scss | 470 ++++++++++++++++++ .../static/2022/styles/utils/_mixins.scss | 220 +++----- .../static/2022/styles/utils/_module.scss | 2 +- .../static/2022/styles/utils/_vars.scss | 4 + .../static/contrib/jquery-1.8.0.min.js | 2 + ...c_greek_greek-ext_latin_latin-ext-300.woff | Bin 0 -> 74148 bytes ..._greek_greek-ext_latin_latin-ext-300.woff2 | Bin 0 -> 57088 bytes ...k_greek-ext_latin_latin-ext-300italic.woff | Bin 0 -> 49116 bytes ..._greek-ext_latin_latin-ext-300italic.woff2 | Bin 0 -> 38424 bytes ...c_greek_greek-ext_latin_latin-ext-600.woff | Bin 0 -> 74348 bytes ..._greek_greek-ext_latin_latin-ext-600.woff2 | Bin 0 -> 57560 bytes ...c_greek_greek-ext_latin_latin-ext-700.woff | Bin 0 -> 74332 bytes ..._greek_greek-ext_latin_latin-ext-700.woff2 | Bin 0 -> 57276 bytes ...reek_greek-ext_latin_latin-ext-italic.woff | Bin 0 -> 49156 bytes ...eek_greek-ext_latin_latin-ext-italic.woff2 | Bin 0 -> 38432 bytes ...eek_greek-ext_latin_latin-ext-regular.woff | Bin 0 -> 74684 bytes ...ek_greek-ext_latin_latin-ext-regular.woff2 | Bin 0 -> 58004 bytes src/wolnelektury/templates/2022/base.html | 19 +- src/wolnelektury/templates/2022/header.html | 46 +- .../templates/2022/main_page.html | 81 +-- .../templates/2022/user_actions.html | 40 ++ .../templates/admin/long_filter.html | 19 + src/wolnelektury/views.py | 13 + 98 files changed, 2579 insertions(+), 1096 deletions(-) create mode 100644 src/catalogue/migrations/0043_alter_bookmedia_duration_alter_bookmedia_type.py create mode 100644 src/catalogue/templates/catalogue/2022/tag_catalogue.html create mode 100644 src/catalogue/templates/catalogue/snippets/2022_jplayer_reader.html create mode 100644 src/wolnelektury/static/2022/styles/components/_avatar.scss create mode 100644 src/wolnelektury/static/2022/styles/components/_payments.scss create mode 100644 src/wolnelektury/static/2022/styles/components/_read_more.scss create mode 100644 src/wolnelektury/static/2022/styles/layout/_search.scss create mode 100644 src/wolnelektury/static/2022/styles/layout/_simple.scss create mode 100644 src/wolnelektury/static/2022/styles/layout/_taglist.scss create mode 100644 src/wolnelektury/static/2022/styles/pages/_book.scss create mode 100644 src/wolnelektury/static/2022/styles/reader_player.scss create mode 100644 src/wolnelektury/static/contrib/jquery-1.8.0.min.js create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-300.woff create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-300.woff2 create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-300italic.woff create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-300italic.woff2 create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-600.woff create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-600.woff2 create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-700.woff create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-700.woff2 create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-italic.woff create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-italic.woff2 create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-regular.woff create mode 100644 src/wolnelektury/static/fonts/source-sans-pro/source-sans-pro-v21-cyrillic_greek_greek-ext_latin_latin-ext-regular.woff2 create mode 100644 src/wolnelektury/templates/2022/user_actions.html create mode 100644 src/wolnelektury/templates/admin/long_filter.html diff --git a/src/catalogue/api/views.py b/src/catalogue/api/views.py index c69c246ad..0f95f0ace 100644 --- a/src/catalogue/api/views.py +++ b/src/catalogue/api/views.py @@ -341,7 +341,10 @@ class TagView(RetrieveAPIView): obj = self.get_object() for data_field, model_field in fields.items(): setattr(obj, model_field, data.get(data_field, getattr(obj, model_field))) - obj.save(update_fields=fields.values(), quick=True) + if obj.pk: + obj.save(update_fields=fields.values(), quick=True) + else: + obj.save() return Response({}) diff --git a/src/catalogue/migrations/0043_alter_bookmedia_duration_alter_bookmedia_type.py b/src/catalogue/migrations/0043_alter_bookmedia_duration_alter_bookmedia_type.py new file mode 100644 index 000000000..52ae648c1 --- /dev/null +++ b/src/catalogue/migrations/0043_alter_bookmedia_duration_alter_bookmedia_type.py @@ -0,0 +1,23 @@ +# Generated by Django 4.0.8 on 2023-04-03 18:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('catalogue', '0042_tag_adjective_feminine_singular_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='bookmedia', + name='duration', + field=models.FloatField(blank=True, null=True), + ), + migrations.AlterField( + model_name='bookmedia', + name='type', + field=models.CharField(choices=[('mp3', 'MP3 file'), ('ogg', 'Ogg Vorbis file'), ('daisy', 'DAISY file'), ('audio.epub', 'EPUB+audio file'), ('sync', 'sync file')], db_index=True, max_length=20, verbose_name='type'), + ), + ] diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index f002158a3..85cfd63b9 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -414,6 +414,21 @@ class Book(models.Model): has_daisy_file.short_description = 'DAISY' has_daisy_file.boolean = True + def has_sync_file(self): + return self.has_media("sync") + + def get_sync(self): + with self.get_media('sync').first().file.open('r') as f: + sync = f.read().split('\n') + offset = float(sync[0]) + items = [] + for line in sync[1:]: + if not line: + continue + start, end, elid = line.split() + items.append([elid, float(start) + offset]) + return json.dumps(items) + def has_audio_epub_file(self): return self.has_media("audio.epub") diff --git a/src/catalogue/models/bookmedia.py b/src/catalogue/models/bookmedia.py index dc02d615d..77de04b48 100644 --- a/src/catalogue/models/bookmedia.py +++ b/src/catalogue/models/bookmedia.py @@ -30,6 +30,7 @@ class BookMedia(models.Model): ('ogg', FileFormat(name='Ogg Vorbis', ext='ogg')), ('daisy', FileFormat(name='DAISY', ext='daisy.zip')), ('audio.epub', FileFormat(name='EPUB+audio', ext='audio.epub')), + ('sync', FileFormat(name='sync', ext='sync.txt')), ]) format_choices = [(k, _('%s file' % t.name)) for k, t in formats.items()] @@ -38,7 +39,7 @@ class BookMedia(models.Model): part_name = models.CharField(_('part name'), default='', blank=True, max_length=512) index = models.IntegerField(_('index'), default=0) file = models.FileField(_('file'), max_length=600, upload_to=_file_upload_to, storage=BofhFileSystemStorage()) - duration = models.IntegerField(null=True, blank=True) + duration = models.FloatField(null=True, blank=True) uploaded_at = models.DateTimeField(_('creation date'), auto_now_add=True, editable=False, db_index=True) project_description = models.CharField(max_length=2048, blank=True) project_icon = models.CharField(max_length=2048, blank=True) diff --git a/src/catalogue/static/2022/book/filter.js b/src/catalogue/static/2022/book/filter.js index ac2674996..bdf6357ef 100644 --- a/src/catalogue/static/2022/book/filter.js +++ b/src/catalogue/static/2022/book/filter.js @@ -3,22 +3,41 @@ $(".quick-filter").each(function() { let bookList = $('#' + $(this).data('for')); let filterList = $('.' + $(this).data('filters')); + $(this).on('focus', function() { filterList.addClass('filters-enabled'); }); $(this).on('blur', function() { filterList.removeClass('filters-enabled'); }); + $(this).on('input propertychange', function() { let search = $(this).val().toLowerCase(); + bookList.children().each(function() { - found = !search || $("h2", this).text().toLowerCase().search(search) != -1; + found = !search || + $(".s", this).text().toLowerCase().search(search) != -1 + ; + if (found) + $(this).fadeIn(); + else + $(this).fadeOut(); + }); + + + + $('.filter-container', filterList).children().each(function() { + console.log($(this).text().toLowerCase()); + found = !search || + $(this).text().toLowerCase().search(search) != -1 + ; if (found) $(this).fadeIn(); else $(this).fadeOut(); }); }); + }); $(".l-books__sorting button").on('click', function() { diff --git a/src/catalogue/static/player/2022_player.js b/src/catalogue/static/player/2022_player.js index c72726188..dfac09615 100644 --- a/src/catalogue/static/player/2022_player.js +++ b/src/catalogue/static/player/2022_player.js @@ -1,19 +1,98 @@ (function($) { $(function() { + $(".book-right-column").remove(); + + if ($("#player-bar").length) { + $("h1").first().after($("
Możesz jednocześnie czytać i słuchać tej lektury!
")); + } + + $(".enable-player-bar").click(function() { + $('body').addClass('with-player-bar'); + $('.jp-play').click(); + return false; + }) + + + var smil = $("#smil").text(); + if (smil) { + smil = $.parseJSON(smil); + + $.each(smil, function(i, e) { + $('#' + e).addClass('syncable'); + }) + } + + + scrolling = false; + /*$(window).on('scroll', function() { + if (!scrolling) { + $("#locator").removeClass('snap'); + } + });*/ + + lastscroll = null; + + scrollTo = function() { + if (!scrolling && $('.playing-highlight').length && $('.playing-highlight')[0] != lastscroll) { + lastscroll = $('.playing-highlight')[0]; + scrolling = true; + $("html").animate({ + scrollTop: $('.playing-highlight').offset().top, + }, { + duration: 2000, + done: function() { + scrolling = false; + + }, + }); + } + } + + $.jPlayer.timeFormat.showHour = true; $(".jp-jplayer").each(function() { var $self = $(this); + var $root = $self.parent(); var $currentMedia = null var currentDuration = 0; var speed = 1; var totalDurationLeft = 0; + var totalDurationBefore = 0; var lastUpdate = 0; var player = null; + var doesUpdateSynchro = true; - var setMedia = function(elem, time=0) { + // TODO: will need class for attach + // may be added from sync data + $(".syncable").click(function() { + if (!$('body').hasClass('with-player-bar')) return; + let id = $(this).attr('id'); + if (!id) return; + for (let i=0; i { + d = parseFloat($(e).data('duration')); + if (time < d) { + setMedia($(e), time, cmd); + return false + } else { + time -= d; + } + }) + } + + var setMedia = function(elem, time=0, cmd='pause') { var media = {} media['mp3'] = elem.attr('data-mp3'); @@ -30,23 +109,70 @@ $(".c-media__caption .license", $root).html($(".license", elem).html()); $(".c-media__caption .project-logo", $root).html($(".project-icon", elem).html()); - player.jPlayer("setMedia", media); - player.jPlayer("option", "playbackRate", speed); - player.jPlayer("pause", time); + console.log('sm 1'); + doesUpdateSynchro = false; + if (!$currentMedia || $currentMedia[0] != elem[0]) { + console.log('set', player.jPlayer("setMedia", media)) + player.jPlayer("option", "playbackRate", speed); + } + doesUpdateSynchro = true; + player.jPlayer(cmd, time); $currentMedia = elem; $(".play-next", $root).prop("disabled", !elem.next().length); - let du = elem.data('duration'); + let du = parseFloat(elem.data('duration')); currentDuration = du; elem.nextAll().each(function() { - du += $(this).data('duration'); + du += parseFloat($(this).data('duration')); }); totalDurationLeft = du; + let pdu = 0; + elem.prevAll().each(function() { + pdu += parseFloat($(this).data('duration')); + }); + totalDurationBefore = pdu; + console.log('sm 3', du, pdu); + return player; }; + + var updateSynchrotext = function(position) { + if (!doesUpdateSynchro) return; + + let curElemId = null; + for (let i=0; i maxy) { + locator.addClass('down'); + } + } + } + } $self.jPlayer({ swfPath: "/static/js/contrib/jplayer/", @@ -105,8 +231,10 @@ _paq.push(['trackEvent', 'audiobook', 'chapter']); }); + console.log('READY 3!'); var initialElem = $('.jp-playlist li', $root).first(); var initialTime = 0; + console.log('READY 4!'); if (true || Modernizr.localstorage) { try { let speedStr = localStorage['audiobook-speed']; @@ -133,11 +261,17 @@ initialTime = last[2]; } } - setMedia(initialElem, initialTime); + console.log('READY 5!', initialElem, initialTime); + setMedia($(initialElem), initialTime); + console.log('READY 6!'); }, timeupdate: function(event) { t = event.jPlayer.status.currentTime; + + updateSynchrotext(totalDurationBefore + t); + + ttl = (totalDurationLeft - t) / speed; ttl = $.jPlayer.convertTime(ttl); $(".total-time-left").text('Czas do końca: ' + ttl); @@ -180,6 +314,12 @@ }); + $('#locator').on('click', function() { + $(this).toggleClass('snap'); + lastscroll = null; + }); + + }); })(jQuery) diff --git a/src/catalogue/templates/catalogue/2022/author_detail.html b/src/catalogue/templates/catalogue/2022/author_detail.html index 54486fbb5..716a4b5d5 100644 --- a/src/catalogue/templates/catalogue/2022/author_detail.html +++ b/src/catalogue/templates/catalogue/2022/author_detail.html @@ -6,72 +6,82 @@ {% block breadcrumbs %} Katalog - {{ tags.0.get_category_display|title }} + {% if tags %} + {{ tags.0.get_category_display|title }} + {% endif %} {% endblock %} {% block main %} -
-
- {% if tags.0.photo %} -
- {{ tags.0.name }} -
+
+
+ {% if tags.0.photo %} +
+ {{ tags.0.name }} +
+ {% endif %} +

+ {% if tags %} + {{ tags.0.name }} + {% else %} + {{ title }} {% endif %} -

{{ tags.0.name }}

-
+
+
-
-
-
- - -
- {% for tag in tags %} - {% if forloop.counter > 1 %} - - {{ tag }} - ✖ - - {% endif %} - {% endfor %} -
+
+
+
+ + +
+ {% for tag in tags %} + {% if forloop.counter > 1 %} + + {{ tag }} + ✖ + + {% endif %} + {% endfor %} +
- + +
+
+ Sortuj: +
+ + +
-
- Sortuj: -
- - - -
-
-
+
+
-
-

{% nice_title_from_tags tags categories %}

+
+

{% nice_title_from_tags tags categories %}

+ {% if suggest %}
{% for tag in suggest %} - - {{ tag }} + + {{ tag }} {% endfor %}
-
+ {% endif %}
+
-
-
- {% for book in object_list %} - {% include "catalogue/2022/book_box.html" %} - {% endfor %} -
+
+
+ {% for book in object_list %} + {% include "catalogue/2022/book_box.html" %} + {% endfor %}
+
- {% if tags %} + {% if tags %}
{% with author=tags.0 %} @@ -79,19 +89,19 @@ {% endwith %} {% choose_cites 3 author=tags.0 as cites %} {% if cites %} -
-
-
+
+
+
- {% for fragment in cites %} -
- {% include "catalogue/2022/fragment_box.html" %} -
- {% endfor %} + {% for fragment in cites %} +
+ {% include "catalogue/2022/fragment_box.html" %} +
+ {% endfor %} +
-
{% endif %}
diff --git a/src/catalogue/templates/catalogue/2022/book_box.html b/src/catalogue/templates/catalogue/2022/book_box.html index dd3b8fd5e..8aabcd55e 100644 --- a/src/catalogue/templates/catalogue/2022/book_box.html +++ b/src/catalogue/templates/catalogue/2022/book_box.html @@ -1,7 +1,7 @@ {% load sorl_thumbnail %}
-

+

{% for author in book.authors %} {{ author }}{% if not forloop.last %}, {% endif %} {% endfor %}

-

{{ book.title }}

+

{{ book.title }}

+ + {% for kind in book.kinds %}{{ kind }} {% endfor %} + {% for genre in book.genres %}{{ genre }} {% endfor %} + {% for epoch in book.epochs %}{{ epoch }} {% endfor %} + diff --git a/src/catalogue/templates/catalogue/2022/book_detail.html b/src/catalogue/templates/catalogue/2022/book_detail.html index a733709eb..7fd9dcf6a 100644 --- a/src/catalogue/templates/catalogue/2022/book_detail.html +++ b/src/catalogue/templates/catalogue/2022/book_detail.html @@ -19,11 +19,11 @@
-
-
+
+
{% with first_text=book.get_first_text %}
-
- {% likes_book book as likes %} + + + + {% likes_book book as likes %} +
{% if likes %}
{% csrf_token %} @@ -119,9 +122,42 @@
+ + + + + {% if accessible %} -
-
+
+
+
+ {% if accessible and first_text %} + + {% endif %} + {{ book.pretty_title }} + {% if accessible and first_text %} + + {% endif %} +
+
+
+ {% if likes %} + + {% csrf_token %} + + + {% else %} +
+ {% csrf_token %} + +
+ {% endif %} +
+
{% if book.has_mp3_file %} @@ -135,7 +171,9 @@ czytaj online {% endif %}
-
+
+
+
@@ -312,9 +350,9 @@

Ta książka jest dostępna dla tysięcy dzieciaków dzięki darowiznom od osób takich jak Ty!

Dorzuć się!
-
- Dorzuć się! -
+
+ +
{% endif %}
diff --git a/src/catalogue/templates/catalogue/2022/collections.html b/src/catalogue/templates/catalogue/2022/collections.html index 4210c1b97..bdf36d506 100644 --- a/src/catalogue/templates/catalogue/2022/collections.html +++ b/src/catalogue/templates/catalogue/2022/collections.html @@ -14,17 +14,20 @@
+ + +
{% for collection in objects %}
-
-

- {{ collection.description|safe }} -

-
{% for book in collection.get_5_books %} {% include 'catalogue/2022/book_box.html' %} @@ -33,6 +36,7 @@
{% endfor %} +
{% endblock %} diff --git a/src/catalogue/templates/catalogue/2022/tag_catalogue.html b/src/catalogue/templates/catalogue/2022/tag_catalogue.html new file mode 100644 index 000000000..3d54c0b6d --- /dev/null +++ b/src/catalogue/templates/catalogue/2022/tag_catalogue.html @@ -0,0 +1,44 @@ +{% extends '2022/base.html' %} +{% load thumbnail %} + + +{% block settings %} +{% endblock %} + +{% block breadcrumbs %} + {{ whole_category }} +{% endblock %} + + +{% block main %} +
+
+

{{ whole_category }}

+
+
+ + + + +
+
    + {% for tag in tags %} +
  • + {% if tag.photo %} + {% thumbnail tag.photo '40x40' crop='center' as thumb %} + + {% endthumbnail %} + {% endif %} + {{ tag }} +
  • + {% endfor %} +
+
+ + +{% endblock %} diff --git a/src/catalogue/templates/catalogue/audiobook_zip_readme.txt b/src/catalogue/templates/catalogue/audiobook_zip_readme.txt index 62d72368b..eaa63a536 100644 --- a/src/catalogue/templates/catalogue/audiobook_zip_readme.txt +++ b/src/catalogue/templates/catalogue/audiobook_zip_readme.txt @@ -1,5 +1,5 @@ -Ten audiobook pochodzi z darmowej biblioteki internetowej Wolne Lektury. Znajdziesz w niej tysiące ebooków i setki audiobooków. -Wolne Lektury to projekt prowadzony przez fundację Nowoczesna Polska. Jesteśmy organizacją pozarządową. Działamy dzięki wsparciu darczyńców takich jak Ty. +Ten audiobook pochodzi z darmowej biblioteki internetowej Wolne Lektury. Znajdziesz w niej tysiące ebooków i audiobooków. +Wolne Lektury to projekt prowadzony przez fundację Wolne Lektury. Jesteśmy organizacją pozarządową. Działamy dzięki wsparciu darczyńców takich jak Ty. Wspólnie możemy udostępnić kolejne książki. Wspieraj Wolne Lektury stałą comiesięczną kwotą. Dzięki temu wcześniej uzyskasz dostęp do wyjątkowych publikacji! Możesz też wesprzeć nas jednorazowo. Wejdź na https://wolnelektury.pl/pomagam/ i dorzuć się do nowych nagrań. @@ -9,18 +9,18 @@ Audiobooki Wolnych Lektur są udostępniane na wolnych licencjach, co oznacza, {% endif %}{% if meta.cover_by %}Okładka na podstawie: {{ meta.cover_by|safe }}{% if meta.cover_source %}, {{ meta.cover_source }}{% endif %}. -{% endif %}Przekaż 1% na wolną bibliotekę KRS 0000070056: https://wolnelektury.pl/info/wesprzyj-nas/ +{% endif %}Przekaż 1,5%, by wszystkie dzieciaki w Polsce miały dostęp do darmowych książek KRS 0000070056: https://wolnelektury.pl/info/wesprzyj-nas/ Zostań Przyjacielem Wolnych Lektur: https://wolnelektury.pl/pomagam/ Słuchaj nas na YouTube: https://wolnelektury.pl/re/WolneLekturyYT/ -Fundacja Nowoczesna Polska +Wolne Lektury ul. Marszałkowska 84/92 lok. 125 00-514 Warszawa tel./fax: +48 22 621 30 17 -e-mail:fundacja@nowoczesnapolska.org.pl -www.nowoczesnapolska.org.pl +e-mail:fundacja@wolnelektury.pl +www.fundacja.wolnelektury.pl Organizacja Pożytku Publicznego Sąd Rejestrowy dla M.St. Warszawy w Warszawie, diff --git a/src/catalogue/templates/catalogue/book_list.html b/src/catalogue/templates/catalogue/book_list.html index d11daffc6..0107f5fd6 100644 --- a/src/catalogue/templates/catalogue/book_list.html +++ b/src/catalogue/templates/catalogue/book_list.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %} {% load i18n %} {% load catalogue_tags %} {% load chunk from chunks %} diff --git a/src/catalogue/templates/catalogue/book_text.html b/src/catalogue/templates/catalogue/book_text.html index 78067d747..70915da13 100644 --- a/src/catalogue/templates/catalogue/book_text.html +++ b/src/catalogue/templates/catalogue/book_text.html @@ -10,12 +10,12 @@ {% block extrahead %} - - + + {% endblock %} {% block menu %} @@ -84,7 +84,7 @@ ← {{ prev.title }} {% endif %}
- {% content_warning book %} + {% content_warning book %}
{{ book_text|safe }} @@ -109,9 +109,18 @@ + {% endblock big-pane %} {% block footer %} + {% if book.has_sync_file %} +
+ {% include 'catalogue/snippets/2022_jplayer_reader.html' %} +
+ + {% endif %}
{% if book.parent %} {% for b in book.ancestors %} @@ -121,23 +130,23 @@ {{ b.title }}
    {% endfor %} - {% for b in book.get_siblings %} -
  1. - {% if b == book %} - {{ b.title }} -
    - {% else %} - {{ b.title }} - {% endif %} -
  2. - {% endfor %} + {% for b in book.get_siblings %} +
  3. + {% if b == book %} + {{ b.title }} +
    + {% else %} + {{ b.title }} + {% endif %} +
  4. + {% endfor %} - {% for b in book.ancestor.all %} + {% for b in book.ancestor.all %}
{% if not forloop.counter.last %} {% endif %} - {% endfor %} + {% endfor %} {% else %} {{ book.title }}
@@ -150,7 +159,7 @@
- {% book_info book %} + {% book_info book %}
{% if book.other_versions.exists %} @@ -185,6 +194,11 @@ {% endfor %}
+ +
+ +
+ {% localize off %} + {% endlocalize %} {% endblock footer %} diff --git a/src/catalogue/templates/catalogue/preview_ad.html b/src/catalogue/templates/catalogue/preview_ad.html index 85b4ed2ff..a6732fc3d 100644 --- a/src/catalogue/templates/catalogue/preview_ad.html +++ b/src/catalogue/templates/catalogue/preview_ad.html @@ -14,10 +14,10 @@ {% endif %}