Cleanup
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 25 Aug 2023 10:25:52 +0000 (12:25 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 25 Aug 2023 10:25:52 +0000 (12:25 +0200)
174 files changed:
src/ajaxable/templates/ajaxable/form_on_page.html
src/api/templates/api/main.html
src/api/templates/oauth/authorize_token.html
src/catalogue/static/2022/book/filter.js [deleted file]
src/catalogue/static/book/filter.js [new file with mode: 0644]
src/catalogue/static/player/2022_player.js [deleted file]
src/catalogue/static/player/player.js [new file with mode: 0644]
src/catalogue/templates/catalogue/2022/author_box.html [deleted file]
src/catalogue/templates/catalogue/2022/author_detail.html [deleted file]
src/catalogue/templates/catalogue/2022/book_box.html [deleted file]
src/catalogue/templates/catalogue/2022/book_detail.html [deleted file]
src/catalogue/templates/catalogue/2022/book_fragments.html [deleted file]
src/catalogue/templates/catalogue/2022/book_list.html [deleted file]
src/catalogue/templates/catalogue/2022/collection.html [deleted file]
src/catalogue/templates/catalogue/2022/collection_box.html [deleted file]
src/catalogue/templates/catalogue/2022/collections.html [deleted file]
src/catalogue/templates/catalogue/2022/dynamic_book_list.html [deleted file]
src/catalogue/templates/catalogue/2022/dynamic_themed_book_list.html [deleted file]
src/catalogue/templates/catalogue/2022/fragment_box.html [deleted file]
src/catalogue/templates/catalogue/2022/fragment_slider_box.html [deleted file]
src/catalogue/templates/catalogue/2022/set_detail.html [deleted file]
src/catalogue/templates/catalogue/2022/tag_catalogue.html [deleted file]
src/catalogue/templates/catalogue/2022/theme_detail.html [deleted file]
src/catalogue/templates/catalogue/2022/themed_book_list.html [deleted file]
src/catalogue/templates/catalogue/author_box.html [new file with mode: 0644]
src/catalogue/templates/catalogue/author_detail.html [new file with mode: 0644]
src/catalogue/templates/catalogue/book_box.html [new file with mode: 0644]
src/catalogue/templates/catalogue/book_detail.html [new file with mode: 0644]
src/catalogue/templates/catalogue/book_fragments.html [new file with mode: 0644]
src/catalogue/templates/catalogue/book_list.html [new file with mode: 0644]
src/catalogue/templates/catalogue/book_text.html
src/catalogue/templates/catalogue/catalogue.html
src/catalogue/templates/catalogue/collection.html [new file with mode: 0644]
src/catalogue/templates/catalogue/collection_box.html [new file with mode: 0644]
src/catalogue/templates/catalogue/collections.html [new file with mode: 0644]
src/catalogue/templates/catalogue/differentiate_tags.html
src/catalogue/templates/catalogue/dynamic_book_list.html [new file with mode: 0644]
src/catalogue/templates/catalogue/dynamic_themed_book_list.html [new file with mode: 0644]
src/catalogue/templates/catalogue/fragment_box.html [new file with mode: 0644]
src/catalogue/templates/catalogue/fragment_slider_box.html [new file with mode: 0644]
src/catalogue/templates/catalogue/recent_audiobooks_list.html
src/catalogue/templates/catalogue/recent_daisy_list.html
src/catalogue/templates/catalogue/recent_list.html
src/catalogue/templates/catalogue/set_detail.html [new file with mode: 0644]
src/catalogue/templates/catalogue/snippets/2022_jplayer.html [deleted file]
src/catalogue/templates/catalogue/snippets/2022_jplayer_link.html [deleted file]
src/catalogue/templates/catalogue/snippets/2022_jplayer_reader.html [deleted file]
src/catalogue/templates/catalogue/snippets/jplayer.html [new file with mode: 0644]
src/catalogue/templates/catalogue/snippets/jplayer_link.html [new file with mode: 0644]
src/catalogue/templates/catalogue/snippets/jplayer_reader.html [new file with mode: 0644]
src/catalogue/templates/catalogue/tag_catalogue.html [new file with mode: 0644]
src/catalogue/templates/catalogue/theme_detail.html [new file with mode: 0644]
src/catalogue/templates/catalogue/themed_book_list.html [new file with mode: 0644]
src/catalogue/templates/catalogue/viewer_base.html
src/catalogue/views.py
src/club/templates/club/2022/donation_step1.html [deleted file]
src/club/templates/club/2022/donation_step1_form.html [deleted file]
src/club/templates/club/2022/donation_step2.html [deleted file]
src/club/templates/club/2022/donation_step3.html [deleted file]
src/club/templates/club/2022/donation_step4.html [deleted file]
src/club/templates/club/2022/donation_step_base.html [deleted file]
src/club/templates/club/donation_step1.html [new file with mode: 0644]
src/club/templates/club/donation_step1_form.html [new file with mode: 0644]
src/club/templates/club/donation_step2.html [new file with mode: 0644]
src/club/templates/club/donation_step3.html [new file with mode: 0644]
src/club/templates/club/donation_step4.html [new file with mode: 0644]
src/club/templates/club/donation_step_base.html [new file with mode: 0644]
src/club/templates/club/index.html
src/club/templates/club/schedule.html
src/club/templates/club/year_summary.html
src/club/templates/payu/rec_payment.html
src/club/views.py
src/dictionary/templates/dictionary/note_list.html
src/education/templates/education/course_detail.html
src/experiments/templates/experiments/main_switch.html
src/funding/admin.py
src/funding/models.py
src/funding/templates/funding/2022/includes/funding.html [deleted file]
src/funding/templates/funding/2022/includes/funding_box.html [deleted file]
src/funding/templates/funding/2022/offer_detail.html [deleted file]
src/funding/templates/funding/2022/offer_list.html [deleted file]
src/funding/templates/funding/disable_notifications.html
src/funding/templates/funding/includes/funding.html
src/funding/templates/funding/includes/funding_box.html [new file with mode: 0644]
src/funding/templates/funding/no_thanks.html
src/funding/templates/funding/offer_detail.html [new file with mode: 0644]
src/funding/templates/funding/offer_list.html [new file with mode: 0644]
src/funding/templates/funding/thanks.html
src/funding/templates/funding/wlfund.html
src/funding/templatetags/funding_tags.py
src/funding/views.py
src/infopages/admin.py
src/infopages/migrations/0003_alter_infopage_options_remove_infopage_main_page.py [new file with mode: 0644]
src/infopages/models.py
src/infopages/templates/infopages/2022/infopage.html [deleted file]
src/infopages/templates/infopages/infopage.html [new file with mode: 0644]
src/infopages/templates/infopages/on_main.html [deleted file]
src/infopages/templatetags/__init__.py [deleted file]
src/infopages/templatetags/infopages_tags.py [deleted file]
src/infopages/views.py
src/isbn/templates/isbn/add_isbn.html
src/isbn/templates/isbn/assigned_isbn.html
src/isbn/templates/isbn/confirm_isbn_wl.html
src/isbn/templates/isbn/wl_dc_tags.html
src/lesmianator/templates/lesmianator/2022/lesmianator.html [deleted file]
src/lesmianator/templates/lesmianator/lesmianator.html [new file with mode: 0644]
src/lesmianator/views.py
src/libraries/templates/libraries/catalog_view.html
src/libraries/templates/libraries/library_view.html
src/libraries/templates/libraries/main_view.html
src/messaging/templates/messaging/contact_detail.html
src/messaging/templates/messaging/contact_form.html
src/newsletter/templates/newsletter/2022/subscribe_form.html [deleted file]
src/newsletter/templates/newsletter/2022/subscribed.html [deleted file]
src/newsletter/templates/newsletter/subscribe_form.html [new file with mode: 0644]
src/newsletter/templates/newsletter/subscribed.html [new file with mode: 0644]
src/newsletter/views.py
src/paypal/templates/paypal/cancel.html
src/pdcounter/templates/pdcounter/2022/author_detail.html [deleted file]
src/pdcounter/templates/pdcounter/2022/book_detail.html [deleted file]
src/pdcounter/templates/pdcounter/author_detail.html [new file with mode: 0644]
src/pdcounter/templates/pdcounter/book_detail.html [new file with mode: 0644]
src/pdcounter/views.py
src/picture/templates/picture/2022/picture_detail.html [deleted file]
src/picture/templates/picture/picture_detail.html [new file with mode: 0644]
src/picture/views.py
src/polls/templates/polls/poll.html
src/push/templates/push/notification_form.html
src/push/templates/push/notification_sent.html
src/references/templates/references/map.html
src/reporting/templates/reporting/main.html
src/search/templates/search/results.html
src/social/templates/social/2022/my_shelf.html [deleted file]
src/social/templates/social/carousel.html [new file with mode: 0644]
src/social/templates/social/carousel_2022.html [deleted file]
src/social/templates/social/my_shelf.html [new file with mode: 0644]
src/social/templatetags/social_tags.py
src/social/views.py
src/stats/templates/stats/top.html
src/waiter/templates/waiter/wait.html
src/wolnelektury/settings/static.py
src/wolnelektury/static/2021/scripts/main.js [deleted file]
src/wolnelektury/static/js/2022.js [deleted file]
src/wolnelektury/static/js/header.js [new file with mode: 0644]
src/wolnelektury/static/js/main.js [new file with mode: 0644]
src/wolnelektury/templates/2022/base.html [deleted file]
src/wolnelektury/templates/2022/base_simple.html [deleted file]
src/wolnelektury/templates/2022/footer.html [deleted file]
src/wolnelektury/templates/2022/header.html [deleted file]
src/wolnelektury/templates/2022/hotjar.html [deleted file]
src/wolnelektury/templates/2022/main_page.html [deleted file]
src/wolnelektury/templates/2022/paginate.html [deleted file]
src/wolnelektury/templates/2022/user_actions.html [deleted file]
src/wolnelektury/templates/404.html
src/wolnelektury/templates/account/base.html
src/wolnelektury/templates/base.html [new file with mode: 0644]
src/wolnelektury/templates/base_simple.html [new file with mode: 0644]
src/wolnelektury/templates/footer.html [new file with mode: 0644]
src/wolnelektury/templates/forms/form_detail.html
src/wolnelektury/templates/forms/form_sent.html
src/wolnelektury/templates/header.html [new file with mode: 0644]
src/wolnelektury/templates/hotjar.html [new file with mode: 0644]
src/wolnelektury/templates/lang-switcher.html [new file with mode: 0644]
src/wolnelektury/templates/main_page.html [new file with mode: 0644]
src/wolnelektury/templates/pagination/pagination.html
src/wolnelektury/templates/publish_plan.html
src/wolnelektury/templates/registration/login.html
src/wolnelektury/templates/registration/register.html
src/wolnelektury/templates/site_base.html
src/wolnelektury/templates/socialaccount/base.html
src/wolnelektury/templates/socialaccount/login_cancelled.html
src/wolnelektury/templates/user.html
src/wolnelektury/templates/user_actions.html [new file with mode: 0644]
src/wolnelektury/views.py

index d88cadb..ec5d414 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block titleextra %}{{ title }}{% endblock %}
 
index 06688d0..72c455a 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 {% load build_absolute_uri from fnp_common %}
 
index 70c5e49..60e5abd 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
diff --git a/src/catalogue/static/2022/book/filter.js b/src/catalogue/static/2022/book/filter.js
deleted file mode 100644 (file)
index 2ff4262..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-(function($) {
-
-    let unpagedSearch = null;
-    if (!$(".quick-filter").val() && !$('.l-pagination li').length) {
-        unpagedSearch = '';
-    }
-    
-    function get_page(page, search, ordering, callback) {
-        get_page_by_url('.?page=' + page + '&order=' + ordering + '&search=' + search, callback);
-    }
-
-    let lastFulfilledPage = 0;
-
-    function get_page_by_url(url, callback) {
-        let requestTime = + new Date();
-        $.get(
-            url,
-            function(data) {
-                if (lastFulfilledPage > requestTime) return;
-                lastFulfilledPage = requestTime;
-
-                html = $(data);
-                objectList = $('#object-list', html);
-                paginate = $('#paginate', html);
-
-                ids = new Set(); 
-                $(".icon-like", objectList).each(
-                    (i, e)=>{
-                        ids.add($(e).attr('data-book'));
-                    }
-                );
-                ids = [...ids].join(',');
-                $.refreshLikes(ids);
-
-                $('#book-list').html(objectList.children());
-                $('#paginator').html(paginate.children());
-                history.replaceState({}, '', url);
-                callback && callback();
-            }
-        )
-    }
-
-    $("#paginator").on('click', 'a', function() {
-        get_page_by_url(url=$(this).attr('href'));
-        return false;
-    });
-
-    $(".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();
-
-            if (!search.startsWith(unpagedSearch)) {
-                get_page(1, search, 'title', function() {
-                    if ($('.l-pagination li').length) {
-                        unpagedSearch = null;
-                    }
-                })
-            } else {
-                bookList.children().each(function() {
-                    found = !search ||
-                        $(".s", this).text().toLowerCase().search(search) != -1
-                    ;
-                    if (found) 
-                        $(this).fadeIn();
-                    else
-                        $(this).fadeOut();
-                });
-            }
-
-            $('.filter-container', filterList).children().each(function() {
-                found = !search ||
-                    $(this).text().toLowerCase().search(search) != -1
-                    ;
-                if (found) 
-                    $(this).fadeIn();
-                else
-                    $(this).fadeOut();
-            });
-        });
-
-    });
-
-    $(".l-books__sorting button").on('click', function() {
-        if ($(this).hasClass('is-active')) return;
-        $(".is-active", $(this).parent()).removeClass("is-active");
-        $(this).addClass("is-active");
-        let prop = $(this).attr('data-order');
-        $(".l-books__sorting select").val(prop);
-        if (prop == '-') prop = '';
-        resort(prop);
-    });
-    $(".l-books__sorting select").on('change', function() {
-        let prop = $(this).val();
-        $(".is-active", $(this).parent()).removeClass("is-active");
-        $("[data-order='" + prop +"']", $(this).parent()).addClass("is-active");
-        if (prop == '-') prop = '';
-        resort(prop);
-    });
-
-    function resort(prop) {
-        // do we NOW have pages (possibly after filtering)?
-        // if we don't have pages, we can just sort here.
-        let havePages = $('.l-pagination li').length > 0;
-
-        $(".l-books__item").css('opacity', '0');
-        setTimeout(function() {
-            if (havePages) {
-                get_page(1, '', prop);
-            } else {
-                if (prop) {
-                    $(".l-books__item").each(function() {
-                        $(this).css('order', $(this).attr('data-' + prop));
-                    });
-                } else {
-                    $(".l-books__item").css('order', '');
-                }
-                setTimeout(function() {
-                    $(".l-books__item").css('opacity', '100%');
-                }, 200);
-            }
-        }, 200);
-    }
-    
-})(jQuery);
diff --git a/src/catalogue/static/book/filter.js b/src/catalogue/static/book/filter.js
new file mode 100644 (file)
index 0000000..2ff4262
--- /dev/null
@@ -0,0 +1,134 @@
+(function($) {
+
+    let unpagedSearch = null;
+    if (!$(".quick-filter").val() && !$('.l-pagination li').length) {
+        unpagedSearch = '';
+    }
+    
+    function get_page(page, search, ordering, callback) {
+        get_page_by_url('.?page=' + page + '&order=' + ordering + '&search=' + search, callback);
+    }
+
+    let lastFulfilledPage = 0;
+
+    function get_page_by_url(url, callback) {
+        let requestTime = + new Date();
+        $.get(
+            url,
+            function(data) {
+                if (lastFulfilledPage > requestTime) return;
+                lastFulfilledPage = requestTime;
+
+                html = $(data);
+                objectList = $('#object-list', html);
+                paginate = $('#paginate', html);
+
+                ids = new Set(); 
+                $(".icon-like", objectList).each(
+                    (i, e)=>{
+                        ids.add($(e).attr('data-book'));
+                    }
+                );
+                ids = [...ids].join(',');
+                $.refreshLikes(ids);
+
+                $('#book-list').html(objectList.children());
+                $('#paginator').html(paginate.children());
+                history.replaceState({}, '', url);
+                callback && callback();
+            }
+        )
+    }
+
+    $("#paginator").on('click', 'a', function() {
+        get_page_by_url(url=$(this).attr('href'));
+        return false;
+    });
+
+    $(".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();
+
+            if (!search.startsWith(unpagedSearch)) {
+                get_page(1, search, 'title', function() {
+                    if ($('.l-pagination li').length) {
+                        unpagedSearch = null;
+                    }
+                })
+            } else {
+                bookList.children().each(function() {
+                    found = !search ||
+                        $(".s", this).text().toLowerCase().search(search) != -1
+                    ;
+                    if (found) 
+                        $(this).fadeIn();
+                    else
+                        $(this).fadeOut();
+                });
+            }
+
+            $('.filter-container', filterList).children().each(function() {
+                found = !search ||
+                    $(this).text().toLowerCase().search(search) != -1
+                    ;
+                if (found) 
+                    $(this).fadeIn();
+                else
+                    $(this).fadeOut();
+            });
+        });
+
+    });
+
+    $(".l-books__sorting button").on('click', function() {
+        if ($(this).hasClass('is-active')) return;
+        $(".is-active", $(this).parent()).removeClass("is-active");
+        $(this).addClass("is-active");
+        let prop = $(this).attr('data-order');
+        $(".l-books__sorting select").val(prop);
+        if (prop == '-') prop = '';
+        resort(prop);
+    });
+    $(".l-books__sorting select").on('change', function() {
+        let prop = $(this).val();
+        $(".is-active", $(this).parent()).removeClass("is-active");
+        $("[data-order='" + prop +"']", $(this).parent()).addClass("is-active");
+        if (prop == '-') prop = '';
+        resort(prop);
+    });
+
+    function resort(prop) {
+        // do we NOW have pages (possibly after filtering)?
+        // if we don't have pages, we can just sort here.
+        let havePages = $('.l-pagination li').length > 0;
+
+        $(".l-books__item").css('opacity', '0');
+        setTimeout(function() {
+            if (havePages) {
+                get_page(1, '', prop);
+            } else {
+                if (prop) {
+                    $(".l-books__item").each(function() {
+                        $(this).css('order', $(this).attr('data-' + prop));
+                    });
+                } else {
+                    $(".l-books__item").css('order', '');
+                }
+                setTimeout(function() {
+                    $(".l-books__item").css('opacity', '100%');
+                }, 200);
+            }
+        }, 200);
+    }
+    
+})(jQuery);
diff --git a/src/catalogue/static/player/2022_player.js b/src/catalogue/static/player/2022_player.js
deleted file mode 100644 (file)
index dfac096..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-(function($) {
-    $(function() {
-
-        $(".book-right-column").remove();
-
-        if ($("#player-bar").length) {
-            $("h1").first().after($("<div class='dynamic-insert'><a href='#' class='enable-player-bar'><div class='text'><i class='icon icon-play' style='border: 1px solid black; border-radius: 100%; padding: 1em; margin-right: 1em;'></i> Możesz jednocześnie czytać i słuchać tej lektury!</div></a></div>"));
-        }
-        
-        $(".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;
-
-            // 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<smil.length; ++i) {
-                    if (smil[i][0] == id) {
-                        setMediaFromTime(smil[i][1], 'play');
-                        //player.jPlayer('play');
-                        return;
-                    }
-                }
-            });
-
-            var setMediaFromTime = function(time, cmd='pause') {
-                $('.jp-playlist li', $root).each((i, e) => {
-                    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');
-                media['oga'] = elem.attr('data-ogg');
-                media['id'] = elem.attr('data-media-id');
-
-                $(".c-player__head", $root).html(
-                    $(".attribution", elem).html())
-                ;
-                $(".c-player__info", $root).html(
-                    $(".title", elem).html()
-                );
-                $(".c-media__caption .content", $root).html($(".project-description", elem).html());
-                $(".c-media__caption .license", $root).html($(".license", elem).html());
-                $(".c-media__caption .project-logo", $root).html($(".project-icon", elem).html());
-
-                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 = parseFloat(elem.data('duration'));
-                currentDuration = du;
-                elem.nextAll().each(function() {
-                    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<smil.length; ++i) {
-                    // can faster
-                    if (smil[i][1] <= position) curElemId = smil[i][0];
-                    else break;
-                }
-                $(".playing-highlight").removeClass("playing-highlight");
-                if (curElemId !== null) {
-                    let curElem = $("#" + curElemId);
-                    curElem.addClass("playing-highlight");
-
-                    let miny = window.scrollY;
-                    let maxy = miny + window.innerHeight;
-                    let y = curElem.offset().top;
-
-                    let locator = $("#locator");
-                    // TODO: if snap then roll
-                    locator.removeClass('up').removeClass('down');
-                    if (locator.hasClass('snap')) {
-                        console.log('SCROLL!');
-                        scrollTo();
-                    } else {
-                        if (y < miny) {
-                            locator.addClass('up');
-                        }
-                        if (y > maxy) {
-                            locator.addClass('down');
-                        }
-                    }
-                }
-            }
-            
-        $self.jPlayer({
-            swfPath: "/static/js/contrib/jplayer/",
-            solution: "html,flash",
-            supplied: 'oga,mp3',
-            cssSelectorAncestor: "#" + $self.attr("data-player"),
-            useStateClassSkin: true,
-
-            ready: function() {
-                player = $(this);
-
-                let selectItem = $('.c-select li');
-                selectItem.on('click', function() {
-                    let speedStr = $(this).data('speed');
-                    speed = parseFloat(speedStr);
-                    player.jPlayer("option", "playbackRate", speed);
-                    localStorage['audiobook-speed'] = speedStr;
-                    _paq.push(['trackEvent', 'audiobook', 'speed', speedStr]);
-                });
-                
-                $('.jp-play', $root).click(function() {
-                    _paq.push(['trackEvent', 'audiobook', 'play']);
-                });
-                $('.jp-seek-bar', $root).click(function() {
-                    _paq.push(['trackEvent', 'audiobook', 'seek']);
-                });
-                $('.jp-mute', $root).click(function() {
-                    _paq.push(['trackEvent', 'audiobook', 'mute']);
-                });
-                $('.jp-volume-bar', $root).click(function() {
-                    _paq.push(['trackEvent', 'audiobook', 'volume']);
-                });
-
-                $('.play-next', $root).click(function() {
-                    let p = $currentMedia.next();
-                    if (p.length) {
-                        setMedia(p).jPlayer("play");
-                        _paq.push(['trackEvent', 'audiobook', 'next']);
-                    }
-                });
-                $('.play-prev', $root).click(function() {
-                    let p = $currentMedia.prev();
-                    if (p.length) {
-                        setMedia(p).jPlayer("play");
-                        _paq.push(['trackEvent', 'audiobook', 'prev']);
-                    } else {
-                        // If in first part, restart it.
-                        setMedia($currentMedia).jPlayer("play");
-                        _paq.push(['trackEvent', 'audiobook', 'rewind']);
-                    }
-                });
-
-                $('.jp-playlist li', $root).click(function() {
-                    setMedia($(this)).jPlayer("play");
-                    $('.c-player__chapters').removeClass('is-active');
-                    _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'];
-                        if (speedStr) {
-                            speed = parseFloat(speedStr);
-                            $(".speed .is-active").removeClass("is-active");
-                            $(".speed [data-speed='" + speedStr + "']").addClass("is-active");
-                        }
-                    } catch {}
-
-                    try {
-                        audiobooks = JSON.parse(localStorage["audiobook-history"]);
-                    } catch {
-                        audiobooks = {};
-                    }
-                    last = audiobooks[$root.attr("data-book-slug")]
-                    // Fallback for book id;
-                    if (!last) {
-                        last = audiobooks[$root.attr("data-book-id")]
-                    }
-
-                    if (last) {
-                        initialElem = $('[data-media-id="' + last[1] + '"]', $root).first();
-                        initialTime = last[2];
-                    }
-                }
-                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);
-
-                $(".time-left").text('– ' + $.jPlayer.convertTime(
-                    currentDuration - t,
-                ));
-                
-                
-                if (Math.abs(t - lastUpdate) > 3) {
-                    try {
-                        audiobooks = JSON.parse(localStorage["audiobook-history"]);
-                    } catch {
-                        audiobooks = {};
-                    }
-                    if (t && event.jPlayer.status.duration - t > 10) {
-                        audiobooks[$root.attr("data-book-slug")] = [
-                            Date.now(),
-                            event.jPlayer.status.media.id,
-                            event.jPlayer.status.currentTime
-                        ];
-                    } else {
-                        delete audiobooks[$root.attr("data-book-slug")];
-                    }
-                    // Remove old book id, if present.
-                    delete audiobooks[$root.attr("data-book-id")];
-                    localStorage["audiobook-history"] = JSON.stringify(audiobooks);
-                    lastUpdate = t;
-                }
-            },
-
-
-            ended: function(event) {
-                let p = $currentMedia.next();
-                if (p.length) {
-                    setMedia(p).jPlayer("play");
-                }
-            }
-        });
-      });
-
-
-   $('#locator').on('click', function() {
-       $(this).toggleClass('snap');
-       lastscroll = null;
-   });
-
-        
-
-    });
-})(jQuery)
diff --git a/src/catalogue/static/player/player.js b/src/catalogue/static/player/player.js
new file mode 100644 (file)
index 0000000..dfac096
--- /dev/null
@@ -0,0 +1,325 @@
+(function($) {
+    $(function() {
+
+        $(".book-right-column").remove();
+
+        if ($("#player-bar").length) {
+            $("h1").first().after($("<div class='dynamic-insert'><a href='#' class='enable-player-bar'><div class='text'><i class='icon icon-play' style='border: 1px solid black; border-radius: 100%; padding: 1em; margin-right: 1em;'></i> Możesz jednocześnie czytać i słuchać tej lektury!</div></a></div>"));
+        }
+        
+        $(".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;
+
+            // 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<smil.length; ++i) {
+                    if (smil[i][0] == id) {
+                        setMediaFromTime(smil[i][1], 'play');
+                        //player.jPlayer('play');
+                        return;
+                    }
+                }
+            });
+
+            var setMediaFromTime = function(time, cmd='pause') {
+                $('.jp-playlist li', $root).each((i, e) => {
+                    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');
+                media['oga'] = elem.attr('data-ogg');
+                media['id'] = elem.attr('data-media-id');
+
+                $(".c-player__head", $root).html(
+                    $(".attribution", elem).html())
+                ;
+                $(".c-player__info", $root).html(
+                    $(".title", elem).html()
+                );
+                $(".c-media__caption .content", $root).html($(".project-description", elem).html());
+                $(".c-media__caption .license", $root).html($(".license", elem).html());
+                $(".c-media__caption .project-logo", $root).html($(".project-icon", elem).html());
+
+                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 = parseFloat(elem.data('duration'));
+                currentDuration = du;
+                elem.nextAll().each(function() {
+                    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<smil.length; ++i) {
+                    // can faster
+                    if (smil[i][1] <= position) curElemId = smil[i][0];
+                    else break;
+                }
+                $(".playing-highlight").removeClass("playing-highlight");
+                if (curElemId !== null) {
+                    let curElem = $("#" + curElemId);
+                    curElem.addClass("playing-highlight");
+
+                    let miny = window.scrollY;
+                    let maxy = miny + window.innerHeight;
+                    let y = curElem.offset().top;
+
+                    let locator = $("#locator");
+                    // TODO: if snap then roll
+                    locator.removeClass('up').removeClass('down');
+                    if (locator.hasClass('snap')) {
+                        console.log('SCROLL!');
+                        scrollTo();
+                    } else {
+                        if (y < miny) {
+                            locator.addClass('up');
+                        }
+                        if (y > maxy) {
+                            locator.addClass('down');
+                        }
+                    }
+                }
+            }
+            
+        $self.jPlayer({
+            swfPath: "/static/js/contrib/jplayer/",
+            solution: "html,flash",
+            supplied: 'oga,mp3',
+            cssSelectorAncestor: "#" + $self.attr("data-player"),
+            useStateClassSkin: true,
+
+            ready: function() {
+                player = $(this);
+
+                let selectItem = $('.c-select li');
+                selectItem.on('click', function() {
+                    let speedStr = $(this).data('speed');
+                    speed = parseFloat(speedStr);
+                    player.jPlayer("option", "playbackRate", speed);
+                    localStorage['audiobook-speed'] = speedStr;
+                    _paq.push(['trackEvent', 'audiobook', 'speed', speedStr]);
+                });
+                
+                $('.jp-play', $root).click(function() {
+                    _paq.push(['trackEvent', 'audiobook', 'play']);
+                });
+                $('.jp-seek-bar', $root).click(function() {
+                    _paq.push(['trackEvent', 'audiobook', 'seek']);
+                });
+                $('.jp-mute', $root).click(function() {
+                    _paq.push(['trackEvent', 'audiobook', 'mute']);
+                });
+                $('.jp-volume-bar', $root).click(function() {
+                    _paq.push(['trackEvent', 'audiobook', 'volume']);
+                });
+
+                $('.play-next', $root).click(function() {
+                    let p = $currentMedia.next();
+                    if (p.length) {
+                        setMedia(p).jPlayer("play");
+                        _paq.push(['trackEvent', 'audiobook', 'next']);
+                    }
+                });
+                $('.play-prev', $root).click(function() {
+                    let p = $currentMedia.prev();
+                    if (p.length) {
+                        setMedia(p).jPlayer("play");
+                        _paq.push(['trackEvent', 'audiobook', 'prev']);
+                    } else {
+                        // If in first part, restart it.
+                        setMedia($currentMedia).jPlayer("play");
+                        _paq.push(['trackEvent', 'audiobook', 'rewind']);
+                    }
+                });
+
+                $('.jp-playlist li', $root).click(function() {
+                    setMedia($(this)).jPlayer("play");
+                    $('.c-player__chapters').removeClass('is-active');
+                    _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'];
+                        if (speedStr) {
+                            speed = parseFloat(speedStr);
+                            $(".speed .is-active").removeClass("is-active");
+                            $(".speed [data-speed='" + speedStr + "']").addClass("is-active");
+                        }
+                    } catch {}
+
+                    try {
+                        audiobooks = JSON.parse(localStorage["audiobook-history"]);
+                    } catch {
+                        audiobooks = {};
+                    }
+                    last = audiobooks[$root.attr("data-book-slug")]
+                    // Fallback for book id;
+                    if (!last) {
+                        last = audiobooks[$root.attr("data-book-id")]
+                    }
+
+                    if (last) {
+                        initialElem = $('[data-media-id="' + last[1] + '"]', $root).first();
+                        initialTime = last[2];
+                    }
+                }
+                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);
+
+                $(".time-left").text('– ' + $.jPlayer.convertTime(
+                    currentDuration - t,
+                ));
+                
+                
+                if (Math.abs(t - lastUpdate) > 3) {
+                    try {
+                        audiobooks = JSON.parse(localStorage["audiobook-history"]);
+                    } catch {
+                        audiobooks = {};
+                    }
+                    if (t && event.jPlayer.status.duration - t > 10) {
+                        audiobooks[$root.attr("data-book-slug")] = [
+                            Date.now(),
+                            event.jPlayer.status.media.id,
+                            event.jPlayer.status.currentTime
+                        ];
+                    } else {
+                        delete audiobooks[$root.attr("data-book-slug")];
+                    }
+                    // Remove old book id, if present.
+                    delete audiobooks[$root.attr("data-book-id")];
+                    localStorage["audiobook-history"] = JSON.stringify(audiobooks);
+                    lastUpdate = t;
+                }
+            },
+
+
+            ended: function(event) {
+                let p = $currentMedia.next();
+                if (p.length) {
+                    setMedia(p).jPlayer("play");
+                }
+            }
+        });
+      });
+
+
+   $('#locator').on('click', function() {
+       $(this).toggleClass('snap');
+       lastscroll = null;
+   });
+
+        
+
+    });
+})(jQuery)
diff --git a/src/catalogue/templates/catalogue/2022/author_box.html b/src/catalogue/templates/catalogue/2022/author_box.html
deleted file mode 100644 (file)
index 3b474bf..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<div class="row">
-  <h2>
-    {% if tag.category == 'author' %}O autorze
-    {% elif tag.category == 'kind' %}O rodzaju
-    {% elif tag.category == 'genre' %}O gatunku
-    {% elif tag.category == 'epoch' %}O epoce
-    {% elif tag.category == 'set' %}Półka
-    {% endif %}
-  </h2>
-  <div>
-    {% if tag.photo %}
-      <figure class="l-author__photo">
-        <img src="{{ tag.photo.url }}" alt="{{ tag.name }}">
-        <figcaption>
-          {{ tag.photo_attribution|safe }}
-        </figcaption>
-      </figure>
-    {% endif %}
-    <article class="l-author__info">
-      {% if tag.category == 'set' %}
-        {% load chunks %}
-        {% chunk 'polka-how-to' %}
-      {% else %}
-      <h3><a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a></h3>
-      <div class="l-article__overlay" data-max-height="327">
-        {{ tag.description|safe }}
-      </div>
-      <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
-      {% endif %}
-    </article>
-  </div>
-</div>
diff --git a/src/catalogue/templates/catalogue/2022/author_detail.html b/src/catalogue/templates/catalogue/2022/author_detail.html
deleted file mode 100644 (file)
index 9b00d8b..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-{% extends '2022/base.html' %}
-{% load catalogue_tags %}
-
-{% load choose_cites from social_tags %}
-
-
-{% block breadcrumbs %}
-  <a href="/katalog/"><span>Katalog</span></a>
-  {% if tags %}
-    <a href="{{ main_tag.get_absolute_catalogue_url }}"><span>{{ main_tag.get_category_display|title }}</span></a>
-  {% endif %}
-{% endblock %}
-
-{% block main %}
-  <div class="l-section">
-    <div class="l-author__header">
-      {% if main_tag.photo %}
-        <figure>
-          <img src="{{ main_tag.photo.url }}" alt="{{ main_tag.name }}">
-        </figure>
-      {% endif %}
-      <h1>
-        {% if main_tag %}
-          {{ main_tag.name }}
-        {% else %}
-          {{ title }}
-        {% endif %}
-      </h1>
-    </div>
-  </div>
-
-  <div class="l-section">
-    <div class="l-books__header">
-      <div class="l-books__input">
-        <i class="icon icon-filter"></i>
-        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter">
-        <div class="filter-container">
-          {% for tag in tags %}
-            {% if tag is not main_tag %}
-              <span class="filter filter-category-{{ tag.category }}">
-                <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
-                <a href="{% catalogue_url list_type tags -tag %}">✖</a>
-              </span>
-            {% endif %}
-          {% endfor %}
-        </div>
-
-      </div>
-      <div class="l-books__sorting">
-        <span>Sortuj:</span>
-        <div>
-          <button data-order="data-pop">najpopularniejsze</button>
-          <button class="is-active">alfabetycznie</button>
-          <!--button>chronologicznie</button-->
-        </div>
-      </div>
-    </div>
-  </div>
-  <div class="with-filter">
-
-    <div class="row">
-      <h2>{% nice_title_from_tags tags categories %}</h2>
-      {% if suggest %}
-        <div class="filter-container">
-          {% for tag in suggest %}
-            <span class="filter filter-category-{{ tag.category }}">
-              <a href="{% catalogue_url list_type tags tag %}">{{ tag }}</a>
-            </span>
-          {% endfor %}
-        </div>
-      {% endif %}
-    </div>
-  </div>
-
-  <div class="l-section l-section--col">
-    <div class="l-books__grid" id="book-list">
-      {% for book in object_list %}
-        {% include "catalogue/2022/book_box.html" %}
-      {% endfor %}
-    </div>
-  </div>
-
-  {% if tags %}
-    <section class="l-section">
-      <div class="l-author">
-        {% with tag=main_tag %}
-          {% include 'catalogue/2022/author_box.html' %}
-        {% endwith %}
-        {% choose_cites 3 author=main_tag as cites %}
-        {% if cites %}
-          <div class="row">
-            <div class="l-author__quotes">
-              <div class="l-author__quotes__slider">
-
-                {% for fragment in cites %}
-                  <div class="l-author__quotes__slider__item">
-                    {% include "catalogue/2022/fragment_slider_box.html" %}
-                  </div>
-                {% endfor %}
-
-              </div>
-            </div>
-          </div>
-        {% endif %}
-      </div>
-    </section>
-    {% endif %}
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/book_box.html b/src/catalogue/templates/catalogue/2022/book_box.html
deleted file mode 100644 (file)
index 97c61d9..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-{% load sorl_thumbnail %}
-
-<article class="l-books__item book-container-activator" data-pop="-{{ book.popularity.count }}" data-longpress="hover">
-  <figure class="l-books__item__img book-container book-container-{{ book.pk }}" data-book="{{ book.pk }}">
-    <a href="{{ book.get_absolute_url }}">
-      {% if book.is_picture %}
-        {% if book.image_file %}
-          {% thumbnail book.image_file "170x240" crop="center" as im %}
-          <img src="{{ im.url }}"
-               srcset="{{ im.url }} 1x, {{ im.url|resolution:"2x" }} 2x"
-               width="{{ im.x }}" height="{{ im.y }}" />
-          {% endthumbnail %}
-        {% endif %}
-      {% else %}
-        {% if book.cover_clean %}
-          <img src="{{ book.cover_clean.url }}" alt="{{ book.title }}">
-        {% endif %}
-      {% endif %}
-    </a>
-
-    <div class="set-tools">
-      <div class="sets"></div>
-      <form method="post" action="{% url 'social_add_set_tag' %}" class="add-set-tag">
-        {% csrf_token %} {# this needs to be copied in with JS #}
-        <input type="hidden" name="book" value="{{ book.id }}">
-        <input name="name" placeholder="nazwa półki" />
-        <button type="submit"></button>
-      </form>
-    </div>
-
-  </figure>
-  <div class="l-books__item__actions">
-    {% if book.is_book %}
-      <span class="icon icon-book-alt" title="książka"></span>
-    {% endif %}
-    {% if book.has_mp3_file %}
-      <span class="icon icon-audio" title="audiobook"></span>
-    {% endif %}
-    {% if book.is_picture %}
-      <span class="icon icon-picture" title="obraz"></span>
-    {% endif %}
-    <a href="{{ book.get_absolute_url }}" class="icon icon-like" data-book="{{ book.pk }}" data-book-slug="{{ book.slug }}"></a>
-  </div>
-  <h3 class="s">
-    {% for author in book.authors %}
-      <a href="{{ author.get_absolute_url }}">{{ author }}</a>{% if not forloop.last %}, {% endif %}
-    {% endfor %}
-  </h3>
-  <h2 class="s"><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h2>
-  <span class="other-info s">
-    {% for kind in book.kinds %}{{ kind }} {% endfor %}
-    {% for genre in book.genres %}{{ genre }} {% endfor %}
-    {% for epoch in book.epochs %}{{ epoch }} {% endfor %}
-  </span>
-</article>
diff --git a/src/catalogue/templates/catalogue/2022/book_detail.html b/src/catalogue/templates/catalogue/2022/book_detail.html
deleted file mode 100644 (file)
index c2db0b1..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-{% extends '2022/base.html' %}
-
-{% load chunks %}
-{% load static %}
-{% load choose_cites from social_tags %}
-{% load catalogue_tags %}
-{% load likes_book from social_tags %}
-
-
-{% block global-content %}
-    <div class="l-container">
-      <div class="l-breadcrumb">
-        <a href="/"><span>Strona główna</span></a>
-        <a href="/katalog/lektury/"><span>Literatura</span></a>
-        {% for ancestor in book.ancestors %}
-          <a href="{{ ancestor.get_absolute_url }}">{{ ancestor.title }}</a>
-        {% endfor %}
-      </div>
-    </div>
-
-
-    <main class="l-main page-book">
-      <section class="l-section lay-s-col-rev">
-        {% with first_text=book.get_first_text %}
-          <aside class="l-aside">
-            <figure class="only-l">
-              {% if accessible and first_text %}
-                <a href="{% url 'book_text' first_text.slug %}">
-              {% endif %}
-              <img src="{% if book.cover_clean %}{{ book.cover_clean.url }}{% endif %}" alt="{{ book.pretty_title }}" width="240">
-              {% if accessible and first_text %}
-                </a>
-              {% endif %}
-            </figure>
-
-            {% if book.parent or book.get_children %}
-              <ul class="l-aside__zbiory">
-                {% if book.parent %}
-                  {% for b in book.ancestors %}
-                    <li>
-                      <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
-                      <ul>
-                  {% endfor %}
-                  {% for b in book.get_siblings %}
-                    <li>
-                      {% if b == book %}
-                        <strong>{{ b.title }}</strong>
-                        <ul>
-                          {% for c in book.get_children %}
-                            <li>
-                              <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
-                            </li>
-                          {% endfor %}
-                        </ul>
-                      {% else %}
-                        <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
-                      {% endif %}
-                    </li>
-                  {% endfor %}
-
-                  {% for b in book.ancestor.all %}
-                      </ul>
-                    </li>
-                  {% endfor %}
-                {% else %}
-                  <li>
-                    <strong>{{ book.title }}</strong>
-                    <ul>
-                      {% for c in book.get_children %}
-                        <li>
-                          <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
-                        </li>
-                      {% endfor %}
-                    </ul>
-                  </li>
-                {% endif %}
-              </ul>
-            {% endif  %}
-
-            <ul class="l-aside__info">
-              <li><span>Epoka:</span> {% for tag in book.epochs %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
-              <li><span>Rodzaj:</span> {% for tag in book.kinds %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
-              <li><span>Gatunek:</span> {% for tag in book.genres %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
-
-            </ul>
-          </aside>
-          <div class="l-content">
-            <header class="l-header">
-              <div class="l-header__content">
-                <p>{% for author in book.authors %}<a href="{{ author.get_absolute_url }}">{{ author.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
-                </p>
-                <h1><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h1>
-                {% with translators=book.translators %}
-                {% if translators %}
-                  <p class="l-header__translators">
-                    {% if translators.0 != 'tłumacz nieznany' %}
-                      tłum.
-                    {% endif %}
-                    {% for translator in translators %}
-                      {{ translator }}{% if not forloop.last %}, {% endif %}
-                    {% endfor %}
-                  </p>
-                {% endif %}
-                {% endwith %}
-              </div>
-
-
-
-              {% likes_book book as likes %}
-              <div class="l-header__actions only-l">
-                {% if likes %}
-                  <form method='post' action='{% url 'social_unlike_book' book.slug %}'>
-                    {% csrf_token %}
-                    <button class="l-button l-button--fav">
-                      <img src="{% static '2022/images/faved.svg' %}" alt="Usuń z ulubionych">
-                    </button>
-                  </form>
-                {% else %}
-                  <form method='post' action='{% url 'social_like_book' book.slug %}'>
-                    {% csrf_token %}
-                    <button class="l-button l-button--fav">
-                      <img src="{% static '2022/images/fav.svg' %}" alt="Dodaj do ulubionych">
-                    </button>
-                  </form>
-                {% endif %}
-              </div>
-            </header>
-            <article class="l-article">
-
-
-
-
-
-              {% if accessible %}
-                <div class="c-media">
-                  <div class="lay-row lay-l-block lay-spread">
-                    <figure class="only-s book-cover-small">
-                      {% if accessible and first_text %}
-                        <a href="{% url 'book_text' first_text.slug %}">
-                      {% endif %}
-                      <img src="{% if book.cover_clean %}{{ book.cover_clean.url }}{% endif %}" alt="{{ book.pretty_title }}">
-                      {% if accessible and first_text %}
-                        </a>
-                      {% endif %}
-                    </figure>
-                    <div class="lay-col lay-spread lay-grow">
-                      <div class="l-header__actions only-s">
-                        {% if likes %}
-                          <form method='post' action='{% url 'social_unlike_book' book.slug %}'>
-                            {% csrf_token %}
-                            <button class="l-button l-button--fav">
-                              <img src="{% static '2022/images/faved.svg' %}" alt="Usuń z ulubionych">
-                            </button>
-                          </form>
-                        {% else %}
-                          <form method='post' action='{% url 'social_like_book' book.slug %}'>
-                            {% csrf_token %}
-                            <button class="l-button l-button--fav">
-                              <img src="{% static '2022/images/fav.svg' %}" alt="Dodaj do ulubionych">
-                            </button>
-                          </form>
-                        {% endif %}
-                      </div>
-                      <div class="c-media__actions lay-col lay-l-row">
-                        <div class="c-media__btn">
-                          {% if book.has_mp3_file %}
-                            <button class="l-button l-button--media" id="audiobook"><i class="icon icon-audio"></i> pobierz audiobook</button>
-                          {% endif %}
-                        </div>
-                        <div class="c-media__btn">
-                          <button class="l-button l-button--media" id="ebook"><i class="icon icon-book"></i> pobierz książkę</button>
-                        </div>
-                        <div class="c-media__btn">
-                          {% if first_text %}
-                            <a href="{% url 'book_text' first_text.slug %}" class="l-button l-button--media l-button--media--full"><i class="icon icon-eye"></i> czytaj online</a>
-                          {% endif %}
-                        </div>
-                      </div>
-                    </div>
-                  </div>
-
-
-
-                  {% if book.has_mp3_file %}
-                    {% include 'catalogue/snippets/2022_jplayer.html' %}
-                  {% else %}
-                    {% with ch=book.get_child_audiobook %}
-                      {% if ch %}
-                        {% include 'catalogue/snippets/2022_jplayer_link.html' with book=ch %}
-                      {% endif %}
-                    {% endwith %}
-
-                  {% endif %}
-
-
-
-
-                  <div class="c-media__popup" data-popup="ebook">
-                    <div class="c-media__popup__box">
-                      <div class="c-media__popup__box__lead">
-                        <h2>Pobieranie e-booka</h2>
-                        <p>Wybierz wersję dla siebie:</p>
-                      </div>
-                      <div class="c-media__popup__box__items">
-                        {% if book.pdf_file %}
-                          <div class="c-media__popup__box__item">
-                            <div>
-                              <h3>.pdf</h3>
-                              <p>Jeśli planujesz wydruk albo lekturę na urządzeniu mobilnym bez dodatkowych aplikacji.</p>
-                            </div>
-                            <div>
-                              <a href="{{ book.pdf_url }}" class="l-button l-button--media l-button--media--full">.pdf</a>
-                            </div>
-                          </div>
-                        {% endif %}
-                        {% if book.epub_file %}
-                          <div class="c-media__popup__box__item">
-                            <div>
-                              <h3>.epub</h3>
-                              <p>Uniwersalny format e-booków, obsługiwany przez większość czytników sprzętowych i aplikacji na urządzenia mobilne.</p>
-                            </div>
-                            <div>
-                              <a href="{{ book.epub_url }}" class="l-button l-button--media l-button--media--full">.epub</a>
-                            </div>
-                          </div>
-                        {% endif %}
-                        {% if book.mobi_file %}
-                          <div class="c-media__popup__box__item">
-                            <div>
-                              <h3>.mobi</h3>
-                              <p>Natywny format dla czytnika Amazon Kindle.</p>
-                            </div>
-                            <div>
-                              <a href="{{ book.mobi_url }}" class="l-button l-button--media l-button--media--full">.mobi</a>
-                            </div>
-                          </div>
-                        {% endif %}
-                        {% if book.synchro_file %}
-                          <div class="c-media__popup__box__item">
-                            <div>
-                              <h3>synchrobook (epub3)</h3>
-                              <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format (np. ..., ..., ...).</p>
-                            </div>
-                            <div>
-                              <a href="#" class="l-button l-button--media l-button--media--full">synchrobook</a>
-                            </div>
-                          </div>
-                        {% endif %}
-                        {% if book.txt_file or book.fb2_file %}
-                          <div class="c-media__popup__box__item">
-                            <div>
-                              <h3>inne formaty</h3>
-                              <ul>
-                                <li><a href="{% url 'custom_pdf_form' book.slug %}">Stwórz własny PDF</a></li>
-                                {% if book.txt_file %}<li><a href="{{ book.txt_url }}">plik tekstowy (.txt)</a></li>{% endif %}
-                                {% if book.fb2_file %}<li><a href="{{ book.fb2_url }}">FictionBook</a></li>{% endif %}
-                              </ul>
-                            </div>
-                          </div>
-                        {% endif %}
-                      </div>
-                      <button class="c-media__popup__close">
-                        <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
-                      </button>
-                    </div>
-                  </div>
-                  {% if book.has_mp3_file %}
-                    <div class="c-media__popup" data-popup="audiobook">
-                      <div class="c-media__popup__box">
-                        <div class="c-media__popup__box__lead">
-                          <h2>Pobieranie audiobooka</h2>
-                          <p>Wybierz wersję dla siebie:</p>
-                        </div>
-                        <div class="c-media__popup__box__items">
-                          <div class="c-media__popup__box__item">
-                            <div>
-                              <h3>.mp3</h3>
-                              <p>Uniwersalny format, obsługiwany przez wszystkie urządzenia.</p>
-                            </div>
-                            <div>
-                              <a href="{% url 'download_zip_mp3' book.slug %}" class="l-button l-button--media l-button--media--full">.mp3</a>
-                            </div>
-                          </div>
-                          {% if book.has_ogg_file %}
-                            <div class="c-media__popup__box__item">
-                              <div>
-                                <h3>OggVorbis</h3>
-                                <p>Otwarty format plików audio, oferujący nagranie w najwyższej jakości dźwiękowej.</p>
-                              </div>
-                              <div>
-                                <a href="{% url 'download_zip_ogg' book.slug %}" class="l-button l-button--media l-button--media--full">.ogg</a>
-                              </div>
-                            </div>
-                          {% endif %}
-                          {% if book.has_daisy_file %}
-                            <div class="c-media__popup__box__item">
-                              <div>
-                                <h3>DAISY</h3>
-                                <p>Format dla osób z dysfunkcjami czytania.</p>
-                              </div>
-                              <div>
-                                {% for dsy in book.media_daisy %}
-                                  <a href="{{ dsy.file.url }}" class="l-button l-button--media l-button--media--full">DAISY</a>
-                                {% endfor %}
-                              </div>
-                            </div>
-                          {% endif %}
-                          {% if book.has_audio_epub_file %}
-                            <div class="c-media__popup__box__item">
-                              <div>
-                                <h3>EPUB + audiobook</h3>
-                                <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format.</p>
-                              </div>
-                              <div>
-                                {% for epub in book.media_audio_epub %}
-                                  <a href="{{ epub.file.url }}" class="l-button l-button--media l-button--media--full">EPUB+audio</a>
-                                {% endfor %}
-                              </div>
-                            </div>
-                          {% endif %}
-                        </div>
-                        <button class="c-media__popup__close">
-                          <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
-                        </button>
-                      </div>
-                    </div>
-                  {% endif %}
-                </div>
-              {% else %}
-                <div style="margin-bottom: 1.5rem; font-size: 15px; like-height: 150%; color: #808080;">
-                  {% chunk 'book-preview-warn' %}
-                </div>
-
-                <div class="l-checkout__box">
-                  {% include 'club/2022/donation_step1_form.html' with form=donation_form %}
-                </div>
-              {% endif %}
-
-              <div class="l-article__overlay" data-max-height="327">
-                {% content_warning book %}
-                {{ book.abstract|safe }}
-
-                {% if book.toc %}
-                  <div class="toc">
-                    <h4>Spis treści:</h4>
-                    {{ book.toc|safe }}
-                  </div>
-                {% endif %}
-              </div>
-              <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
-            </article>
-            {% if accessible %}
-            <div class="c-support">
-              <div>
-                <h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki <span>darowiznom</span> od osób takich jak <span>Ty</span>!</h2>
-                <a href="{% url 'club_join' %}?pk_campaign=layout">Dorzuć się!</a>
-              </div>
-              <div class="bg">
-                <!-- img src="{% static '2022/images/dziecko.jpeg' %}" alt="Dorzuć się!" -->
-              </div>
-            </div>
-            {% endif %}
-          </div>
-        {% endwith %}
-      </section>
-
-      {% for tag in book.authors %}
-        <section class="l-section">
-          <div class="l-author">
-            {% include 'catalogue/2022/author_box.html' %}
-
-            {% if forloop.first %}
-              {% choose_cites 3 book=book as cites %}
-              {% if cites %}
-                <div class="row">
-                  <div class="l-author__quotes">
-                    <div class="l-author__quotes__slider">
-                      {% for fragment in cites %}
-                        {% include "catalogue/2022/fragment_slider_box.html" %}
-                      {% endfor %}
-                    </div>
-                  </div>
-                </div>
-              {% endif %}
-            {% endif %}
-          </div>
-        </section>
-      {% endfor %}
-
-      <section class="l-section">
-        <div class="l-themes__wrapper">
-          {% with book.related_themes as themes %}
-            {% if themes %}
-              <h2>Motywy występujące w tym utworze <a href="/katalog/motyw/"><span>Wszystkie motywy</span> <i class="icon icon-arrow-right"></i></a></h2>
-              <div class="l-themes l-article__overlay" data-max-height="80">
-                <ul>
-                  {% for item in themes %}
-                    <li><a href="{% url 'book_fragments' book.slug item.slug %}">{{ item }}&nbsp;({{ item.count}})</a></li>
-                  {% endfor %}
-                </ul>
-              </div>
-              <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Zobacz więcej</button>
-
-            {% endif %}
-          {% endwith %}
-          <ul class="links">
-            {% if book.wiki_link %}
-              <li><a href="{{ book.wiki_link }}">strona utworu w Wikipedii</a></li>
-            {% endif %}
-           {% if accessible %}
-            <li>
-              <a href="{{ book.xml_url }}">źródłowy plik XML</a>
-            </li>
-            <li>
-              <a target="_blank" href="{% url 'poem_from_book' book.slug %}">miksuj treść utworu</a>
-            </li>
-            <li>
-              <a target="_blank" href="{{ book.get_extra_info_json.about }}">utwór na Platformie Redakcyjnej</a>
-            </li>
-           {% endif %}
-          </ul>
-        </div>
-      </section>
-    </main>
-
-
-
-
-
-    <section class="l-section">
-      <div class="l-books__wrapper">
-        <div class="l-container">
-          <h2>Czytaj także</h2>
-          <div class="l-books">
-            {% if book.other_versions %}
-              {% for rel in book.other_versions %}
-                <article class="l-books__item">
-                  <figure class="l-books__item__img">
-                    <a href="{{ rel.get_absolute_url }}">
-                      <img src="{% if rel.cover_clean %}{{ rel.cover_clean.url }}{% endif %}" alt="{{ rel.pretty_title }}">
-                    </a>
-                  </figure>
-                  <h3>
-                    {% for author in rel.authors %}
-                      <a href="{{ author.get_absolute_url }}">{{ author }}</a>
-                    {% endfor %}
-                  </h3>
-                  <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
-                </article>
-              {% endfor %}
-            {% endif %}
-
-
-            {% related_books_2022 book taken=book.other_versions|length as related_books %}
-            {% for rel in related_books %}
-              <article class="l-books__item">
-                <figure class="l-books__item__img">
-                  <a href="{{ rel.get_absolute_url }}">
-                    <img src="{% if rel.cover_clean %}{{ rel.cover_clean.url }}{% endif %}" alt="{{ rel.pretty_title }}">
-                  </a>
-                </figure>
-                <h3>
-                  {% for author in rel.authors %}
-                    <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
-                  {% endfor %}
-                </h3>
-                <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
-              </article>
-            {% endfor %}
-
-            <article class="l-books__item l-books__item--link">
-              <a href="/katalog/kolekcje/">i wiele innych książek, wierszy, obrazów, audiobooków…</a>
-              <a href="/katalog/kolekcje/" class="icon-link"><i class="icon icon-all"></i></a>
-            </article>
-
-          </div>
-        </div>
-      </div>
-    </section>
-
-
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/book_fragments.html b/src/catalogue/templates/catalogue/2022/book_fragments.html
deleted file mode 100644 (file)
index d1d4f24..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-{% extends '2022/base.html' %}
-{% load pagination_tags %}
-
-{% block global-content %}
-  <div class="l-container">
-    <div class="l-breadcrumb">
-      <a href="/"><span>Strona główna</span></a>
-      <a href="/katalog/lektury/"><span>Literatura</span></a>
-      {% for ancestor in fragment.book.ancestors %}
-        <a href="{{ ancestor.get_absolute_url }}">{{ ancestor.title }}</a>
-      {% endfor %}
-      <a href="{{ fragment.book.get_absolute_url }}"><span>{{ book.title }}</span></a>
-    </div>
-  </div>
-
-  <main class="l-main">
-
-    <div class="l-section">
-      <div class="l-author__header">
-        <h1>
-          <span>Motyw:</span> {{ theme.name }}
-          <span>w utworze</span>
-          <a href="{{ book.get_absolute_url }}">{{ book }}</a>
-        </h1>
-      </div>
-    </div>
-
-    <!-- div class="l-section">
-         <div class="l-books__header">
-         <div class="l-books__input">
-         <i class="icon icon-filter"></i>
-         <input type="text" placeholder="filtry, tytuł">
-         </div>
-         <div class="l-books__sorting">
-         <span>Sortuj:</span>
-         <div>
-         <button>autorzy</button>
-         <button>epoki</button>
-         <button>gatunki</button>
-         <button>rodzaje</button>
-         <button class="is-active">motywy</button>
-         </div>
-         </div>
-         </div>
-         </div -->
-
-    {% autopaginate fragments 10 %}
-
-    <div class="l-section l-section--col">
-      <div class="l-theme">
-        <div class="l-theme__col">
-          <div class="l-books__col">
-
-            {% for fragment in fragments %}
-              {% include 'catalogue/2022/fragment_box.html' %}
-            {% endfor %}
-            {% paginate using '2022/paginate.html' %}
-          </div>
-        </div>
-        <div class="l-theme__col">
-          <div class="l-theme__info">
-            <h3>Motyw: {{ theme.name }}</h3>
-            {{ theme.description|safe }}
-            <!--
-                 <h3>Motyw w sztuce <i class="icon icon-arrow-left"></i> <i class="icon icon-arrow-right"></i></h3>
-                 <div class="l-theme__info__slider">
-                 <img src="images/motyw.jpg" alt="">
-                 <img src="images/motyw.jpg" alt="">
-                 <img src="images/motyw.jpg" alt="">
-                 </div>
-            -->
-          </div>
-        </div>
-      </div>
-    </div>
-  </main>
-
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/book_list.html b/src/catalogue/templates/catalogue/2022/book_list.html
deleted file mode 100644 (file)
index 1652e7a..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-{% extends '2022/base.html' %}
-{% load catalogue_tags %}
-{% load thumbnail %}
-{% load pagination_tags %}
-
-{% load choose_cites from social_tags %}
-
-
-{% block breadcrumbs %}
-  <a href="/katalog/"><span>Katalog</span></a>
-  {% if main_tag %}
-    <a href="{{ main_tag.get_absolute_catalogue_url }}"><span>{{ main_tag.get_category_display|title }}</span></a>
-  {% endif %}
-{% endblock %}
-
-{% block main %}
-  <div class="l-section">
-    <div class="l-author__header">
-      {% if main_tag.photo %}
-        {% thumbnail main_tag.photo '40x40' crop='top' as th %}
-        <figure>
-          <img src="{{ th.url }}" alt="{{ main_tag.name }}" srcset="{{ th.url }} 1x, {{ th.url|resolution:"2x" }} 2x">
-        </figure>
-        {% endthumbnail %}
-      {% endif %}
-      <h1>
-        {% if main_tag %}
-          {{ main_tag.name }}
-        {% else %}
-          {{ view.title }}
-        {% endif %}
-      </h1>
-    </div>
-  </div>
-
-  <div class="l-section">
-    <div class="l-books__header">
-      <div class="l-books__input">
-        <i class="icon icon-filter"></i>
-        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter" value="{{ request.GET.search }}">
-        <div class="filter-container">
-          {% for tag in tags %}
-            {% if tag is not main_tag %}
-              <span class="filter filter-category-{{ tag.category }}">
-                <a href="{% catalogue_url view.list_type tag %}">{{ tag }}</a>
-                <a href="{% catalogue_url view.list_type tags -tag %}">✖</a>
-              </span>
-            {% endif %}
-          {% endfor %}
-        </div>
-
-      </div>
-      {% if view.get_orderings %}
-      <div class="l-books__sorting">
-        <span>Sortuj:</span>
-        <div>
-          {% for ordering in view.get_orderings %}
-            <button
-                {% if ordering.default %}
-                data-order="-"
-                {% else %}
-                data-order="{{ ordering.slug }}"
-                {% endif %}
-                {% if ordering.active %}
-                class="is-active"
-                {% endif %}
-            >{{ ordering.name }}</button>
-          {% endfor %}
-          <select name="sorting">
-            {% for ordering in view.get_orderings %}
-              <option
-                  {% if ordering.default %}
-                  value="-"
-                  {% else %}
-                  value="{{ ordering.slug }}"
-                  {% endif %}
-                  {% if ordering.active %}
-                  selected="selected"
-                  {% endif %}
-              >{{ ordering.name }}</option>
-          {% endfor %}
-          </select>
-        </div>
-      </div>
-      {% endif %}
-    </div>
-  </div>
-  <div class="l-section">
-  <div class="with-filter">
-    <div class="row">
-      <h2 class="header">{% nice_title_from_tags tags suggested_tags_by_category %}</h2>
-      {% if suggested_tags %}
-        <div class="filter-container">
-          {% for tag in suggested_tags %}
-            <span class="filter filter-category-{{ tag.category }}">
-              <a href="{% catalogue_url view.list_type tags tag %}">{{ tag }}</a>
-            </span>
-          {% endfor %}
-        </div>
-      {% endif %}
-    </div>
-  </div>
-  </div>
-
-  {% autopaginate object_list view.page_size %}
-
-  <div class="l-section l-section--col">
-    <div class="l-books__grid" id="book-list">
-      {% for book in object_list %}
-        {% include "catalogue/2022/book_box.html" %}
-      {% endfor %}
-    </div>
-  </div>
-
-  <div id="paginator">
-    {% paginate using '2022/paginate.html' %}
-  </div>
-
-  {% if main_tag %}
-    <section class="l-section">
-      <div class="l-author">
-        {% with tag=main_tag %}
-          {% include 'catalogue/2022/author_box.html' %}
-        {% endwith %}
-        {% choose_cites 3 author=main_tag as cites %}
-        {% if cites %}
-          <div class="row">
-            <div class="l-author__quotes">
-              <div class="l-author__quotes__slider">
-
-                {% for fragment in cites %}
-                  <div class="l-author__quotes__slider__item">
-                    {% include "catalogue/2022/fragment_slider_box.html" %}
-                  </div>
-                {% endfor %}
-
-              </div>
-            </div>
-          </div>
-        {% endif %}
-      </div>
-    </section>
-    {% endif %}
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/collection.html b/src/catalogue/templates/catalogue/2022/collection.html
deleted file mode 100644 (file)
index 38c52d8..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-{% extends '2022/base.html' %}
-
-
-{% block breadcrumbs %}
-  <a href="/katalog/"><span>Katalog</span></a>
-  <a href="/katalog/kolekcje/"><span>Kolekcje</span></a>
-{% endblock %}
-
-
-{% block main %}
-
-  <div class="l-section">
-    <div class="l-author__header">
-      <h1>{{ collection.title }}</h1>
-    </div>
-  </div>
-
-  <div class="l-author__info">
-    <p>
-      {{ collection.description|safe }}
-    </p>
-  </div>
-
-  <div class="l-section">
-    <div class="l-books__header">
-      <div class="l-books__input">
-        <i class="icon icon-filter"></i>
-        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list">
-      </div>
-      <div class="l-books__sorting">
-        <span>Sortuj:</span>
-        <div>
-          <button data-order="data-pop">najpopularniejsze</button>
-          <button class="is-active">alfabetycznie</button>
-          <!--button>chronologicznie</button-->
-        </div>
-      </div>
-    </div>
-  </div>
-
-  <div class="l-section l-section--col">
-    <div class="l-books__grid" id="book-list">
-      {% for book in collection.get_books %}
-        {% include "catalogue/2022/book_box.html" %}
-      {% endfor %}
-    </div>
-  </div>
-
-
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/collection_box.html b/src/catalogue/templates/catalogue/2022/collection_box.html
deleted file mode 100644 (file)
index 495fe23..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<div class="c-collectionbox">
-  <a href="{{ collection.get_absolute_url }}">
-    <div class="c-collectionbox-covers">
-      {% for c in collection.example3 %}
-        <img src="{{ c.cover_clean.url }}">
-      {% endfor %}
-    </div>
-    {{ collection.title }}
-  </a>
-</div>
diff --git a/src/catalogue/templates/catalogue/2022/collections.html b/src/catalogue/templates/catalogue/2022/collections.html
deleted file mode 100644 (file)
index bdf36d5..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-{% extends '2022/base.html' %}
-
-
-{% block breadcrumbs %}
-  <a href="/katalog/"><span>Katalog</span></a>
-{% endblock %}
-
-
-{% block main %}
-
-  <div class="l-section">
-    <div class="l-author__header">
-      <h1>Kolekcje</h1>
-    </div>
-  </div>
-
-  <div class="l-search-bar">
-    <div class="l-search-bar__input">
-      <i class="icon icon-filter"></i>
-      <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="collections">
-    </div>
-  </div>
-
-  <div id="collections">
-  {% for collection in objects %}
-    <section class="l-section">
-      <div class="l-collections -js-collections">
-        <div class="l-collections__header">
-          <h3><a class="s" href="{{ collection.get_absolute_url }}">{{ collection.title }}</a></h3>
-        </div>
-        <div class="l-books">
-          {% for book in collection.get_5_books %}
-            {% include 'catalogue/2022/book_box.html' %}
-          {% endfor %}
-        </div>
-      </div>
-    </section>
-  {% endfor %}
-  </div>
-
-
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/dynamic_book_list.html b/src/catalogue/templates/catalogue/2022/dynamic_book_list.html
deleted file mode 100644 (file)
index 0511be5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{% load pagination_tags %}
-{% autopaginate object_list view.page_size %}
-
-<div>
-<div id="object-list">
-  {% for book in object_list %}
-    {% include "catalogue/2022/book_box.html" %}
-  {% endfor %}
-</div>
-
-<div id="paginate">
-  {% paginate using '2022/paginate.html' %}
-</div>
-</div>
diff --git a/src/catalogue/templates/catalogue/2022/dynamic_themed_book_list.html b/src/catalogue/templates/catalogue/2022/dynamic_themed_book_list.html
deleted file mode 100644 (file)
index 3346d88..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{% load pagination_tags %}
-{% autopaginate object_list view.themed_page_size %}
-
-<div>
-<div id="object-list">
-  {% for fragment in object_list %}
-    {% include "catalogue/2022/fragment_box.html" %}
-  {% endfor %}
-</div>
-
-<div id="paginate">
-  {% paginate using '2022/paginate.html' %}
-</div>
-</div>
diff --git a/src/catalogue/templates/catalogue/2022/fragment_box.html b/src/catalogue/templates/catalogue/2022/fragment_box.html
deleted file mode 100644 (file)
index b6be44f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<article class="l-books__item">
-  <figure class="l-books__item__img">
-    <a href="{{ fragment.get_absolute_url }}">
-      {% if fragment.book.cover_clean %}
-        <img src="{{ fragment.book.cover_clean.url }}" alt="{{ fragment.book.title }}">
-      {% endif %}
-    </a>
-    <div class="l-books__item__actions">
-      <a href="{{ fragment.book.get_absolute_url }}" class="icon icon-book-alt"></a>
-      {% if fragment.book.has_mp3_file %}
-        <a href="{{ fragment.book.get_absolute_url }}" class="icon icon-audio"></a>
-      {% endif %}
-    </div>
-  </figure>
-  <div class="l-books__item__content s">
-    <h3>
-      {% for author in fragment.book.authors %}
-        <a href="{{ author.get_absolute_url }}">{{ author }}</a>{% if not forloop.last %}, {% endif %}
-      {% endfor %}
-    </h3>
-    <h2><a href="{{ fragment.book.get_absolute_url }}">{{ fragment.book.title }}</a></h2>
-    <div class="fragment-text">
-      {{ fragment.short_text|safe }}
-    </div>
-    <a href="{{ fragment.get_absolute_url }}">Czytaj więcej</a>
-  </div>
-</article>
diff --git a/src/catalogue/templates/catalogue/2022/fragment_slider_box.html b/src/catalogue/templates/catalogue/2022/fragment_slider_box.html
deleted file mode 100644 (file)
index 2522ce6..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<a class="l-author__quotes__slider__item" href="{{ fragment.get_absolute_url }}">
-  <em>
-    {% if fragment.short_text %}
-      {{ fragment.short_text|safe }}
-    {% else %}
-      {{ fragment.text|safe }}
-    {% endif %}
-  </em>
-  <p>{{ fragment.book.pretty_title }}</p>
-</a>
diff --git a/src/catalogue/templates/catalogue/2022/set_detail.html b/src/catalogue/templates/catalogue/2022/set_detail.html
deleted file mode 100644 (file)
index e835a86..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-{% extends '2022/base.html' %}
-
-{% load choose_cites from social_tags %}
-
-
-{% block breadcrumbs %}
-  <a href="/ludzie/polka/"><span>Półka</span></a>
-{% endblock %}
-
-{% block main %}
-  <div class="l-section">
-    <div class="l-author__header">
-      <h1>{{ tags.0.name }}</h1>
-    </div>
-  </div>
-
-  <div class="l-section">
-    <div class="l-books__header">
-      <div class="l-books__input">
-        <i class="icon icon-filter"></i>
-        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list">
-      </div>
-      <div class="l-books__sorting">
-        <span>Sortuj:</span>
-        <div>
-          <button data-order="data-pop">najpopularniejsze</button>
-          <button class="is-active">alfabetycznie</button>
-          <!--button>chronologicznie</button-->
-        </div>
-      </div>
-    </div>
-  </div>
-
-  <div class="l-section l-section--col">
-    <div class="l-books__grid" id="book-list">
-      {% for book in object_list %}
-        {% include "catalogue/2022/book_box.html" %}
-      {% endfor %}
-    </div>
-  </div>
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/tag_catalogue.html b/src/catalogue/templates/catalogue/2022/tag_catalogue.html
deleted file mode 100644 (file)
index a44e5b2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-{% extends '2022/base.html' %}
-{% load thumbnail %}
-
-
-{% block settings %}
-{% endblock %}
-
-{% block breadcrumbs %}
-  <span>{{ whole_category }}</span>
-{% endblock %}
-
-
-{% block main %}
-  <div class="l-section">
-    <div class="l-author__header">
-      <h1>{{ whole_category }}</h1>
-    </div>
-  </div>
-
-  <div class="l-search-bar">
-    <div class="l-search-bar__input">
-      <i class="icon icon-filter"></i>
-      <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="tag-list">
-    </div>
-  </div>
-
-
-  <div class="l-section l-taglist">
-    <ul id="tag-list">
-      {% for tag in tags %}
-        <li>
-          {% if tag.photo %}
-            {% thumbnail tag.photo '40x40' crop='top' as thumb %}
-            <img src="{{ thumb.url }}" class="c-avatar">
-            {% endthumbnail %}
-          {% endif %}
-          <a class="s" href="{{ tag.get_absolute_url }}">{{ tag }} ({{ tag.count }})</a>
-        </li>
-      {% endfor %}
-    </ul>
- </div>
-
-
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/theme_detail.html b/src/catalogue/templates/catalogue/2022/theme_detail.html
deleted file mode 100644 (file)
index df34d17..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-{% extends '2022/base.html' %}
-{% load catalogue_tags %}
-{% load pagination_tags %}
-
-{% block global-content %}
-  <div class="l-container">
-    <div class="l-breadcrumb">
-      <a href="/"><span>Strona główna</span></a>
-      <a href="/katalog/"><span>Katalog</span></a>
-      <a href="/katalog/motyw/"><span>Motyw</span></a>
-      <span>{{ main_tag.name }}</span>
-    </div>
-  </div>
-
-  <main class="l-main">
-
-    <div class="l-section">
-      <div class="l-author__header">
-        <h1><span>Motyw:</span> {{ main_tag.name }}</h1>
-      </div>
-    </div>
-
-
-    <div class="l-section">
-      <div class="l-books__header">
-        <div class="l-books__input">
-          <i class="icon icon-filter"></i>
-          <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter">
-          <div class="filter-container">
-            {% for tag in tags %}
-              {% if tag is not main_tag %}
-                <span class="filter filter-category-{{ tag.category }}">
-                  <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
-                  <a href="{% catalogue_url list_type tags -tag %}">✖</a>
-                </span>
-              {% endif %}
-            {% endfor %}
-          </div>
-
-        </div>
-      </div>
-    </div>
-    <div class="with-filter">
-      <div class="row">
-        <h2>{% nice_title_from_tags tags categories %}</h2>
-        {% if suggest %}
-          <div class="filter-container">
-            {% for tag in suggest %}
-              <span class="filter filter-category-{{ tag.category }}">
-                <a href="{% catalogue_url list_type tags tag %}">{{ tag }}</a>
-              </span>
-            {% endfor %}
-          </div>
-        {% endif %}
-      </div>
-    </div>
-
-    {% autopaginate object_list 10 %}
-
-    <div class="l-section l-section--col">
-      <div class="l-theme">
-        <div class="l-theme__col">
-          <div class="l-books__col">
-
-            {% for fragment in object_list %}
-              {% include 'catalogue/2022/fragment_box.html' %}
-            {% endfor %}
-            {% paginate using '2022/paginate.html' %}
-          </div>
-        </div>
-        <div class="l-theme__col">
-          <div class="l-theme__info">
-            <h3>Motyw: {{ main_tag.name }}</h3>
-            {{ main_tag.description|safe }}
-            <!--
-                 <h3>Motyw w sztuce <i class="icon icon-arrow-left"></i> <i class="icon icon-arrow-right"></i></h3>
-                 <div class="l-theme__info__slider">
-                 <img src="images/motyw.jpg" alt="">
-                 <img src="images/motyw.jpg" alt="">
-                 <img src="images/motyw.jpg" alt="">
-                 </div>
-            -->
-          </div>
-        </div>
-      </div>
-    </div>
-  </main>
-
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/2022/themed_book_list.html b/src/catalogue/templates/catalogue/2022/themed_book_list.html
deleted file mode 100644 (file)
index 7957106..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-{% extends '2022/base.html' %}
-{% load catalogue_tags %}
-{% load pagination_tags %}
-
-{% block global-content %}
-  <div class="l-container">
-    <div class="l-breadcrumb">
-      <a href="/"><span>Strona główna</span></a>
-      <a href="/katalog/"><span>Katalog</span></a>
-      <a href="/katalog/motyw/"><span>Motyw</span></a>
-      <span>{{ main_tag.name }}</span>
-    </div>
-  </div>
-
-  <main class="l-main">
-
-    <div class="l-section">
-      <div class="l-author__header">
-        <h1><span>Motyw:</span> {{ main_tag.name }}</h1>
-      </div>
-    </div>
-
-
-    <div class="l-section">
-      <div class="l-books__header">
-        <div class="l-books__input">
-          <i class="icon icon-filter"></i>
-          <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter" value="{{ request.GET.search }}">
-          <div class="filter-container">
-            {% for tag in tags %}
-              {% if tag is not main_tag %}
-                <span class="filter filter-category-{{ tag.category }}">
-                  <a href="{% catalogue_url view.list_type tag %}">{{ tag }}</a>
-                  <a href="{% catalogue_url view.list_type tags -tag %}">✖</a>
-                </span>
-              {% endif %}
-            {% endfor %}
-          </div>
-
-        </div>
-      </div>
-    </div>
-    <div class="with-filter">
-      <div class="row">
-        <h2 class="header">{% nice_title_from_tags tags categories %}</h2>
-        {% if suggested_tags %}
-          <div class="filter-container">
-            {% for tag in suggested_tags %}
-              <span class="filter filter-category-{{ tag.category }}">
-                <a href="{% catalogue_url view.list_type tags tag %}">{{ tag }}</a>
-              </span>
-            {% endfor %}
-          </div>
-        {% endif %}
-      </div>
-    </div>
-
-    {% autopaginate object_list view.themed_page_size %}
-
-    <div class="l-section l-section--col">
-      <div class="l-theme">
-        <div class="l-theme__col">
-          <div class="l-books__col" id="book-list">
-            {% for fragment in object_list %}
-              {% include 'catalogue/2022/fragment_box.html' %}
-            {% endfor %}
-          </div>
-        </div>
-        <div class="l-theme__col">
-          <div class="l-theme__info">
-            <h3>Motyw: {{ main_tag.name }}</h3>
-            {{ main_tag.description|safe }}
-            <!--
-                 <h3>Motyw w sztuce <i class="icon icon-arrow-left"></i> <i class="icon icon-arrow-right"></i></h3>
-                 <div class="l-theme__info__slider">
-                 <img src="images/motyw.jpg" alt="">
-                 <img src="images/motyw.jpg" alt="">
-                 <img src="images/motyw.jpg" alt="">
-                 </div>
-            -->
-          </div>
-        </div>
-      </div>
-      <div id="paginator">
-        {% paginate using '2022/paginate.html' %}
-      </div>
-    </div>
-  </main>
-
-{% endblock %}
diff --git a/src/catalogue/templates/catalogue/author_box.html b/src/catalogue/templates/catalogue/author_box.html
new file mode 100644 (file)
index 0000000..3b474bf
--- /dev/null
@@ -0,0 +1,32 @@
+<div class="row">
+  <h2>
+    {% if tag.category == 'author' %}O autorze
+    {% elif tag.category == 'kind' %}O rodzaju
+    {% elif tag.category == 'genre' %}O gatunku
+    {% elif tag.category == 'epoch' %}O epoce
+    {% elif tag.category == 'set' %}Półka
+    {% endif %}
+  </h2>
+  <div>
+    {% if tag.photo %}
+      <figure class="l-author__photo">
+        <img src="{{ tag.photo.url }}" alt="{{ tag.name }}">
+        <figcaption>
+          {{ tag.photo_attribution|safe }}
+        </figcaption>
+      </figure>
+    {% endif %}
+    <article class="l-author__info">
+      {% if tag.category == 'set' %}
+        {% load chunks %}
+        {% chunk 'polka-how-to' %}
+      {% else %}
+      <h3><a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a></h3>
+      <div class="l-article__overlay" data-max-height="327">
+        {{ tag.description|safe }}
+      </div>
+      <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
+      {% endif %}
+    </article>
+  </div>
+</div>
diff --git a/src/catalogue/templates/catalogue/author_detail.html b/src/catalogue/templates/catalogue/author_detail.html
new file mode 100644 (file)
index 0000000..ae2c495
--- /dev/null
@@ -0,0 +1,108 @@
+{% extends 'base.html' %}
+{% load catalogue_tags %}
+
+{% load choose_cites from social_tags %}
+
+
+{% block breadcrumbs %}
+  <a href="/katalog/"><span>Katalog</span></a>
+  {% if tags %}
+    <a href="{{ main_tag.get_absolute_catalogue_url }}"><span>{{ main_tag.get_category_display|title }}</span></a>
+  {% endif %}
+{% endblock %}
+
+{% block main %}
+  <div class="l-section">
+    <div class="l-author__header">
+      {% if main_tag.photo %}
+        <figure>
+          <img src="{{ main_tag.photo.url }}" alt="{{ main_tag.name }}">
+        </figure>
+      {% endif %}
+      <h1>
+        {% if main_tag %}
+          {{ main_tag.name }}
+        {% else %}
+          {{ title }}
+        {% endif %}
+      </h1>
+    </div>
+  </div>
+
+  <div class="l-section">
+    <div class="l-books__header">
+      <div class="l-books__input">
+        <i class="icon icon-filter"></i>
+        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter">
+        <div class="filter-container">
+          {% for tag in tags %}
+            {% if tag is not main_tag %}
+              <span class="filter filter-category-{{ tag.category }}">
+                <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
+                <a href="{% catalogue_url list_type tags -tag %}">✖</a>
+              </span>
+            {% endif %}
+          {% endfor %}
+        </div>
+
+      </div>
+      <div class="l-books__sorting">
+        <span>Sortuj:</span>
+        <div>
+          <button data-order="data-pop">najpopularniejsze</button>
+          <button class="is-active">alfabetycznie</button>
+          <!--button>chronologicznie</button-->
+        </div>
+      </div>
+    </div>
+  </div>
+  <div class="with-filter">
+
+    <div class="row">
+      <h2>{% nice_title_from_tags tags categories %}</h2>
+      {% if suggest %}
+        <div class="filter-container">
+          {% for tag in suggest %}
+            <span class="filter filter-category-{{ tag.category }}">
+              <a href="{% catalogue_url list_type tags tag %}">{{ tag }}</a>
+            </span>
+          {% endfor %}
+        </div>
+      {% endif %}
+    </div>
+  </div>
+
+  <div class="l-section l-section--col">
+    <div class="l-books__grid" id="book-list">
+      {% for book in object_list %}
+        {% include "catalogue/book_box.html" %}
+      {% endfor %}
+    </div>
+  </div>
+
+  {% if tags %}
+    <section class="l-section">
+      <div class="l-author">
+        {% with tag=main_tag %}
+          {% include 'catalogue/author_box.html' %}
+        {% endwith %}
+        {% choose_cites 3 author=main_tag as cites %}
+        {% if cites %}
+          <div class="row">
+            <div class="l-author__quotes">
+              <div class="l-author__quotes__slider">
+
+                {% for fragment in cites %}
+                  <div class="l-author__quotes__slider__item">
+                    {% include "catalogue/fragment_slider_box.html" %}
+                  </div>
+                {% endfor %}
+
+              </div>
+            </div>
+          </div>
+        {% endif %}
+      </div>
+    </section>
+    {% endif %}
+{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_box.html b/src/catalogue/templates/catalogue/book_box.html
new file mode 100644 (file)
index 0000000..97c61d9
--- /dev/null
@@ -0,0 +1,55 @@
+{% load sorl_thumbnail %}
+
+<article class="l-books__item book-container-activator" data-pop="-{{ book.popularity.count }}" data-longpress="hover">
+  <figure class="l-books__item__img book-container book-container-{{ book.pk }}" data-book="{{ book.pk }}">
+    <a href="{{ book.get_absolute_url }}">
+      {% if book.is_picture %}
+        {% if book.image_file %}
+          {% thumbnail book.image_file "170x240" crop="center" as im %}
+          <img src="{{ im.url }}"
+               srcset="{{ im.url }} 1x, {{ im.url|resolution:"2x" }} 2x"
+               width="{{ im.x }}" height="{{ im.y }}" />
+          {% endthumbnail %}
+        {% endif %}
+      {% else %}
+        {% if book.cover_clean %}
+          <img src="{{ book.cover_clean.url }}" alt="{{ book.title }}">
+        {% endif %}
+      {% endif %}
+    </a>
+
+    <div class="set-tools">
+      <div class="sets"></div>
+      <form method="post" action="{% url 'social_add_set_tag' %}" class="add-set-tag">
+        {% csrf_token %} {# this needs to be copied in with JS #}
+        <input type="hidden" name="book" value="{{ book.id }}">
+        <input name="name" placeholder="nazwa półki" />
+        <button type="submit"></button>
+      </form>
+    </div>
+
+  </figure>
+  <div class="l-books__item__actions">
+    {% if book.is_book %}
+      <span class="icon icon-book-alt" title="książka"></span>
+    {% endif %}
+    {% if book.has_mp3_file %}
+      <span class="icon icon-audio" title="audiobook"></span>
+    {% endif %}
+    {% if book.is_picture %}
+      <span class="icon icon-picture" title="obraz"></span>
+    {% endif %}
+    <a href="{{ book.get_absolute_url }}" class="icon icon-like" data-book="{{ book.pk }}" data-book-slug="{{ book.slug }}"></a>
+  </div>
+  <h3 class="s">
+    {% for author in book.authors %}
+      <a href="{{ author.get_absolute_url }}">{{ author }}</a>{% if not forloop.last %}, {% endif %}
+    {% endfor %}
+  </h3>
+  <h2 class="s"><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h2>
+  <span class="other-info s">
+    {% for kind in book.kinds %}{{ kind }} {% endfor %}
+    {% for genre in book.genres %}{{ genre }} {% endfor %}
+    {% for epoch in book.epochs %}{{ epoch }} {% endfor %}
+  </span>
+</article>
diff --git a/src/catalogue/templates/catalogue/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html
new file mode 100644 (file)
index 0000000..713d65a
--- /dev/null
@@ -0,0 +1,482 @@
+{% extends 'base.html' %}
+
+{% load chunks %}
+{% load static %}
+{% load choose_cites from social_tags %}
+{% load catalogue_tags %}
+{% load likes_book from social_tags %}
+
+
+{% block global-content %}
+    <div class="l-container">
+      <div class="l-breadcrumb">
+        <a href="/"><span>Strona główna</span></a>
+        <a href="/katalog/lektury/"><span>Literatura</span></a>
+        {% for ancestor in book.ancestors %}
+          <a href="{{ ancestor.get_absolute_url }}">{{ ancestor.title }}</a>
+        {% endfor %}
+      </div>
+    </div>
+
+
+    <main class="l-main page-book">
+      <section class="l-section lay-s-col-rev">
+        {% with first_text=book.get_first_text %}
+          <aside class="l-aside">
+            <figure class="only-l">
+              {% if accessible and first_text %}
+                <a href="{% url 'book_text' first_text.slug %}">
+              {% endif %}
+              <img src="{% if book.cover_clean %}{{ book.cover_clean.url }}{% endif %}" alt="{{ book.pretty_title }}" width="240">
+              {% if accessible and first_text %}
+                </a>
+              {% endif %}
+            </figure>
+
+            {% if book.parent or book.get_children %}
+              <ul class="l-aside__zbiory">
+                {% if book.parent %}
+                  {% for b in book.ancestors %}
+                    <li>
+                      <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
+                      <ul>
+                  {% endfor %}
+                  {% for b in book.get_siblings %}
+                    <li>
+                      {% if b == book %}
+                        <strong>{{ b.title }}</strong>
+                        <ul>
+                          {% for c in book.get_children %}
+                            <li>
+                              <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
+                            </li>
+                          {% endfor %}
+                        </ul>
+                      {% else %}
+                        <a href="{{ b.get_absolute_url }}">{{ b.title }}</a>
+                      {% endif %}
+                    </li>
+                  {% endfor %}
+
+                  {% for b in book.ancestor.all %}
+                      </ul>
+                    </li>
+                  {% endfor %}
+                {% else %}
+                  <li>
+                    <strong>{{ book.title }}</strong>
+                    <ul>
+                      {% for c in book.get_children %}
+                        <li>
+                          <a href="{{ c.get_absolute_url }}">{{ c.title }}</a>
+                        </li>
+                      {% endfor %}
+                    </ul>
+                  </li>
+                {% endif %}
+              </ul>
+            {% endif  %}
+
+            <ul class="l-aside__info">
+              <li><span>Epoka:</span> {% for tag in book.epochs %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
+              <li><span>Rodzaj:</span> {% for tag in book.kinds %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
+              <li><span>Gatunek:</span> {% for tag in book.genres %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
+
+            </ul>
+          </aside>
+          <div class="l-content">
+            <header class="l-header">
+              <div class="l-header__content">
+                <p>{% for author in book.authors %}<a href="{{ author.get_absolute_url }}">{{ author.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
+                </p>
+                <h1><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h1>
+                {% with translators=book.translators %}
+                {% if translators %}
+                  <p class="l-header__translators">
+                    {% if translators.0 != 'tłumacz nieznany' %}
+                      tłum.
+                    {% endif %}
+                    {% for translator in translators %}
+                      {{ translator }}{% if not forloop.last %}, {% endif %}
+                    {% endfor %}
+                  </p>
+                {% endif %}
+                {% endwith %}
+              </div>
+
+
+
+              {% likes_book book as likes %}
+              <div class="l-header__actions only-l">
+                {% if likes %}
+                  <form method='post' action='{% url 'social_unlike_book' book.slug %}'>
+                    {% csrf_token %}
+                    <button class="l-button l-button--fav">
+                      <img src="{% static '2022/images/faved.svg' %}" alt="Usuń z ulubionych">
+                    </button>
+                  </form>
+                {% else %}
+                  <form method='post' action='{% url 'social_like_book' book.slug %}'>
+                    {% csrf_token %}
+                    <button class="l-button l-button--fav">
+                      <img src="{% static '2022/images/fav.svg' %}" alt="Dodaj do ulubionych">
+                    </button>
+                  </form>
+                {% endif %}
+              </div>
+            </header>
+            <article class="l-article">
+
+
+
+
+
+              {% if accessible %}
+                <div class="c-media">
+                  <div class="lay-row lay-l-block lay-spread">
+                    <figure class="only-s book-cover-small">
+                      {% if accessible and first_text %}
+                        <a href="{% url 'book_text' first_text.slug %}">
+                      {% endif %}
+                      <img src="{% if book.cover_clean %}{{ book.cover_clean.url }}{% endif %}" alt="{{ book.pretty_title }}">
+                      {% if accessible and first_text %}
+                        </a>
+                      {% endif %}
+                    </figure>
+                    <div class="lay-col lay-spread lay-grow">
+                      <div class="l-header__actions only-s">
+                        {% if likes %}
+                          <form method='post' action='{% url 'social_unlike_book' book.slug %}'>
+                            {% csrf_token %}
+                            <button class="l-button l-button--fav">
+                              <img src="{% static '2022/images/faved.svg' %}" alt="Usuń z ulubionych">
+                            </button>
+                          </form>
+                        {% else %}
+                          <form method='post' action='{% url 'social_like_book' book.slug %}'>
+                            {% csrf_token %}
+                            <button class="l-button l-button--fav">
+                              <img src="{% static '2022/images/fav.svg' %}" alt="Dodaj do ulubionych">
+                            </button>
+                          </form>
+                        {% endif %}
+                      </div>
+                      <div class="c-media__actions lay-col lay-l-row">
+                        <div class="c-media__btn">
+                          {% if book.has_mp3_file %}
+                            <button class="l-button l-button--media" id="audiobook"><i class="icon icon-audio"></i> pobierz audiobook</button>
+                          {% endif %}
+                        </div>
+                        <div class="c-media__btn">
+                          <button class="l-button l-button--media" id="ebook"><i class="icon icon-book"></i> pobierz książkę</button>
+                        </div>
+                        <div class="c-media__btn">
+                          {% if first_text %}
+                            <a href="{% url 'book_text' first_text.slug %}" class="l-button l-button--media l-button--media--full"><i class="icon icon-eye"></i> czytaj online</a>
+                          {% endif %}
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+
+
+
+                  {% if book.has_mp3_file %}
+                    {% include 'catalogue/snippets/jplayer.html' %}
+                  {% else %}
+                    {% with ch=book.get_child_audiobook %}
+                      {% if ch %}
+                        {% include 'catalogue/snippets/jplayer_link.html' with book=ch %}
+                      {% endif %}
+                    {% endwith %}
+
+                  {% endif %}
+
+
+
+
+                  <div class="c-media__popup" data-popup="ebook">
+                    <div class="c-media__popup__box">
+                      <div class="c-media__popup__box__lead">
+                        <h2>Pobieranie e-booka</h2>
+                        <p>Wybierz wersję dla siebie:</p>
+                      </div>
+                      <div class="c-media__popup__box__items">
+                        {% if book.pdf_file %}
+                          <div class="c-media__popup__box__item">
+                            <div>
+                              <h3>.pdf</h3>
+                              <p>Jeśli planujesz wydruk albo lekturę na urządzeniu mobilnym bez dodatkowych aplikacji.</p>
+                            </div>
+                            <div>
+                              <a href="{{ book.pdf_url }}" class="l-button l-button--media l-button--media--full">.pdf</a>
+                            </div>
+                          </div>
+                        {% endif %}
+                        {% if book.epub_file %}
+                          <div class="c-media__popup__box__item">
+                            <div>
+                              <h3>.epub</h3>
+                              <p>Uniwersalny format e-booków, obsługiwany przez większość czytników sprzętowych i aplikacji na urządzenia mobilne.</p>
+                            </div>
+                            <div>
+                              <a href="{{ book.epub_url }}" class="l-button l-button--media l-button--media--full">.epub</a>
+                            </div>
+                          </div>
+                        {% endif %}
+                        {% if book.mobi_file %}
+                          <div class="c-media__popup__box__item">
+                            <div>
+                              <h3>.mobi</h3>
+                              <p>Natywny format dla czytnika Amazon Kindle.</p>
+                            </div>
+                            <div>
+                              <a href="{{ book.mobi_url }}" class="l-button l-button--media l-button--media--full">.mobi</a>
+                            </div>
+                          </div>
+                        {% endif %}
+                        {% if book.synchro_file %}
+                          <div class="c-media__popup__box__item">
+                            <div>
+                              <h3>synchrobook (epub3)</h3>
+                              <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format (np. ..., ..., ...).</p>
+                            </div>
+                            <div>
+                              <a href="#" class="l-button l-button--media l-button--media--full">synchrobook</a>
+                            </div>
+                          </div>
+                        {% endif %}
+                        {% if book.txt_file or book.fb2_file %}
+                          <div class="c-media__popup__box__item">
+                            <div>
+                              <h3>inne formaty</h3>
+                              <ul>
+                                <li><a href="{% url 'custom_pdf_form' book.slug %}">Stwórz własny PDF</a></li>
+                                {% if book.txt_file %}<li><a href="{{ book.txt_url }}">plik tekstowy (.txt)</a></li>{% endif %}
+                                {% if book.fb2_file %}<li><a href="{{ book.fb2_url }}">FictionBook</a></li>{% endif %}
+                              </ul>
+                            </div>
+                          </div>
+                        {% endif %}
+                      </div>
+                      <button class="c-media__popup__close">
+                        <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
+                      </button>
+                    </div>
+                  </div>
+                  {% if book.has_mp3_file %}
+                    <div class="c-media__popup" data-popup="audiobook">
+                      <div class="c-media__popup__box">
+                        <div class="c-media__popup__box__lead">
+                          <h2>Pobieranie audiobooka</h2>
+                          <p>Wybierz wersję dla siebie:</p>
+                        </div>
+                        <div class="c-media__popup__box__items">
+                          <div class="c-media__popup__box__item">
+                            <div>
+                              <h3>.mp3</h3>
+                              <p>Uniwersalny format, obsługiwany przez wszystkie urządzenia.</p>
+                            </div>
+                            <div>
+                              <a href="{% url 'download_zip_mp3' book.slug %}" class="l-button l-button--media l-button--media--full">.mp3</a>
+                            </div>
+                          </div>
+                          {% if book.has_ogg_file %}
+                            <div class="c-media__popup__box__item">
+                              <div>
+                                <h3>OggVorbis</h3>
+                                <p>Otwarty format plików audio, oferujący nagranie w najwyższej jakości dźwiękowej.</p>
+                              </div>
+                              <div>
+                                <a href="{% url 'download_zip_ogg' book.slug %}" class="l-button l-button--media l-button--media--full">.ogg</a>
+                              </div>
+                            </div>
+                          {% endif %}
+                          {% if book.has_daisy_file %}
+                            <div class="c-media__popup__box__item">
+                              <div>
+                                <h3>DAISY</h3>
+                                <p>Format dla osób z dysfunkcjami czytania.</p>
+                              </div>
+                              <div>
+                                {% for dsy in book.media_daisy %}
+                                  <a href="{{ dsy.file.url }}" class="l-button l-button--media l-button--media--full">DAISY</a>
+                                {% endfor %}
+                              </div>
+                            </div>
+                          {% endif %}
+                          {% if book.has_audio_epub_file %}
+                            <div class="c-media__popup__box__item">
+                              <div>
+                                <h3>EPUB + audiobook</h3>
+                                <p>Książka elektroniczna i audiobook w jednym. Wymaga aplikacji obsługującej format.</p>
+                              </div>
+                              <div>
+                                {% for epub in book.media_audio_epub %}
+                                  <a href="{{ epub.file.url }}" class="l-button l-button--media l-button--media--full">EPUB+audio</a>
+                                {% endfor %}
+                              </div>
+                            </div>
+                          {% endif %}
+                        </div>
+                        <button class="c-media__popup__close">
+                          <img src="{% static '2022/images/close.svg' %}" alt="Zamknij">
+                        </button>
+                      </div>
+                    </div>
+                  {% endif %}
+                </div>
+              {% else %}
+                <div style="margin-bottom: 1.5rem; font-size: 15px; like-height: 150%; color: #808080;">
+                  {% chunk 'book-preview-warn' %}
+                </div>
+
+                <div class="l-checkout__box">
+                  {% include 'club/donation_step1_form.html' with form=donation_form %}
+                </div>
+              {% endif %}
+
+              <div class="l-article__overlay" data-max-height="327">
+                {% content_warning book %}
+                {{ book.abstract|safe }}
+
+                {% if book.toc %}
+                  <div class="toc">
+                    <h4>Spis treści:</h4>
+                    {{ book.toc|safe }}
+                  </div>
+                {% endif %}
+              </div>
+              <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
+            </article>
+            {% if accessible %}
+            <div class="c-support">
+              <div>
+                <h2>Ta książka jest dostępna dla tysięcy dzieciaków dzięki <span>darowiznom</span> od osób takich jak <span>Ty</span>!</h2>
+                <a href="{% url 'club_join' %}?pk_campaign=layout">Dorzuć się!</a>
+              </div>
+              <div class="bg">
+                <!-- img src="{% static '2022/images/dziecko.jpeg' %}" alt="Dorzuć się!" -->
+              </div>
+            </div>
+            {% endif %}
+          </div>
+        {% endwith %}
+      </section>
+
+      {% for tag in book.authors %}
+        <section class="l-section">
+          <div class="l-author">
+            {% include 'catalogue/author_box.html' %}
+
+            {% if forloop.first %}
+              {% choose_cites 3 book=book as cites %}
+              {% if cites %}
+                <div class="row">
+                  <div class="l-author__quotes">
+                    <div class="l-author__quotes__slider">
+                      {% for fragment in cites %}
+                        {% include "catalogue/fragment_slider_box.html" %}
+                      {% endfor %}
+                    </div>
+                  </div>
+                </div>
+              {% endif %}
+            {% endif %}
+          </div>
+        </section>
+      {% endfor %}
+
+      <section class="l-section">
+        <div class="l-themes__wrapper">
+          {% with book.related_themes as themes %}
+            {% if themes %}
+              <h2>Motywy występujące w tym utworze <a href="/katalog/motyw/"><span>Wszystkie motywy</span> <i class="icon icon-arrow-right"></i></a></h2>
+              <div class="l-themes l-article__overlay" data-max-height="80">
+                <ul>
+                  {% for item in themes %}
+                    <li><a href="{% url 'book_fragments' book.slug item.slug %}">{{ item }}&nbsp;({{ item.count}})</a></li>
+                  {% endfor %}
+                </ul>
+              </div>
+              <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Zobacz więcej</button>
+
+            {% endif %}
+          {% endwith %}
+          <ul class="links">
+            {% if book.wiki_link %}
+              <li><a href="{{ book.wiki_link }}">strona utworu w Wikipedii</a></li>
+            {% endif %}
+           {% if accessible %}
+            <li>
+              <a href="{{ book.xml_url }}">źródłowy plik XML</a>
+            </li>
+            <li>
+              <a target="_blank" href="{% url 'poem_from_book' book.slug %}">miksuj treść utworu</a>
+            </li>
+            <li>
+              <a target="_blank" href="{{ book.get_extra_info_json.about }}">utwór na Platformie Redakcyjnej</a>
+            </li>
+           {% endif %}
+          </ul>
+        </div>
+      </section>
+    </main>
+
+
+
+
+
+    <section class="l-section">
+      <div class="l-books__wrapper">
+        <div class="l-container">
+          <h2>Czytaj także</h2>
+          <div class="l-books">
+            {% if book.other_versions %}
+              {% for rel in book.other_versions %}
+                <article class="l-books__item">
+                  <figure class="l-books__item__img">
+                    <a href="{{ rel.get_absolute_url }}">
+                      <img src="{% if rel.cover_clean %}{{ rel.cover_clean.url }}{% endif %}" alt="{{ rel.pretty_title }}">
+                    </a>
+                  </figure>
+                  <h3>
+                    {% for author in rel.authors %}
+                      <a href="{{ author.get_absolute_url }}">{{ author }}</a>
+                    {% endfor %}
+                  </h3>
+                  <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
+                </article>
+              {% endfor %}
+            {% endif %}
+
+
+            {% related_books_2022 book taken=book.other_versions|length as related_books %}
+            {% for rel in related_books %}
+              <article class="l-books__item">
+                <figure class="l-books__item__img">
+                  <a href="{{ rel.get_absolute_url }}">
+                    <img src="{% if rel.cover_clean %}{{ rel.cover_clean.url }}{% endif %}" alt="{{ rel.pretty_title }}">
+                  </a>
+                </figure>
+                <h3>
+                  {% for author in rel.authors %}
+                    <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
+                  {% endfor %}
+                </h3>
+                <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
+              </article>
+            {% endfor %}
+
+            <article class="l-books__item l-books__item--link">
+              <a href="/katalog/kolekcje/">i wiele innych książek, wierszy, obrazów, audiobooków…</a>
+              <a href="/katalog/kolekcje/" class="icon-link"><i class="icon icon-all"></i></a>
+            </article>
+
+          </div>
+        </div>
+      </div>
+    </section>
+
+
+{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_fragments.html b/src/catalogue/templates/catalogue/book_fragments.html
new file mode 100644 (file)
index 0000000..82cc83b
--- /dev/null
@@ -0,0 +1,78 @@
+{% extends 'base.html' %}
+{% load pagination_tags %}
+
+{% block global-content %}
+  <div class="l-container">
+    <div class="l-breadcrumb">
+      <a href="/"><span>Strona główna</span></a>
+      <a href="/katalog/lektury/"><span>Literatura</span></a>
+      {% for ancestor in fragment.book.ancestors %}
+        <a href="{{ ancestor.get_absolute_url }}">{{ ancestor.title }}</a>
+      {% endfor %}
+      <a href="{{ fragment.book.get_absolute_url }}"><span>{{ book.title }}</span></a>
+    </div>
+  </div>
+
+  <main class="l-main">
+
+    <div class="l-section">
+      <div class="l-author__header">
+        <h1>
+          <span>Motyw:</span> {{ theme.name }}
+          <span>w utworze</span>
+          <a href="{{ book.get_absolute_url }}">{{ book }}</a>
+        </h1>
+      </div>
+    </div>
+
+    <!-- div class="l-section">
+         <div class="l-books__header">
+         <div class="l-books__input">
+         <i class="icon icon-filter"></i>
+         <input type="text" placeholder="filtry, tytuł">
+         </div>
+         <div class="l-books__sorting">
+         <span>Sortuj:</span>
+         <div>
+         <button>autorzy</button>
+         <button>epoki</button>
+         <button>gatunki</button>
+         <button>rodzaje</button>
+         <button class="is-active">motywy</button>
+         </div>
+         </div>
+         </div>
+         </div -->
+
+    {% autopaginate fragments 10 %}
+
+    <div class="l-section l-section--col">
+      <div class="l-theme">
+        <div class="l-theme__col">
+          <div class="l-books__col">
+
+            {% for fragment in fragments %}
+              {% include 'catalogue/fragment_box.html' %}
+            {% endfor %}
+            {% paginate %}
+          </div>
+        </div>
+        <div class="l-theme__col">
+          <div class="l-theme__info">
+            <h3>Motyw: {{ theme.name }}</h3>
+            {{ theme.description|safe }}
+            <!--
+                 <h3>Motyw w sztuce <i class="icon icon-arrow-left"></i> <i class="icon icon-arrow-right"></i></h3>
+                 <div class="l-theme__info__slider">
+                 <img src="images/motyw.jpg" alt="">
+                 <img src="images/motyw.jpg" alt="">
+                 <img src="images/motyw.jpg" alt="">
+                 </div>
+            -->
+          </div>
+        </div>
+      </div>
+    </div>
+  </main>
+
+{% endblock %}
diff --git a/src/catalogue/templates/catalogue/book_list.html b/src/catalogue/templates/catalogue/book_list.html
new file mode 100644 (file)
index 0000000..1f0d2c5
--- /dev/null
@@ -0,0 +1,144 @@
+{% extends 'base.html' %}
+{% load catalogue_tags %}
+{% load thumbnail %}
+{% load pagination_tags %}
+
+{% load choose_cites from social_tags %}
+
+
+{% block breadcrumbs %}
+  <a href="/katalog/"><span>Katalog</span></a>
+  {% if main_tag %}
+    <a href="{{ main_tag.get_absolute_catalogue_url }}"><span>{{ main_tag.get_category_display|title }}</span></a>
+  {% endif %}
+{% endblock %}
+
+{% block main %}
+  <div class="l-section">
+    <div class="l-author__header">
+      {% if main_tag.photo %}
+        {% thumbnail main_tag.photo '40x40' crop='top' as th %}
+        <figure>
+          <img src="{{ th.url }}" alt="{{ main_tag.name }}" srcset="{{ th.url }} 1x, {{ th.url|resolution:"2x" }} 2x">
+        </figure>
+        {% endthumbnail %}
+      {% endif %}
+      <h1>
+        {% if main_tag %}
+          {{ main_tag.name }}
+        {% else %}
+          {{ view.title }}
+        {% endif %}
+      </h1>
+    </div>
+  </div>
+
+  <div class="l-section">
+    <div class="l-books__header">
+      <div class="l-books__input">
+        <i class="icon icon-filter"></i>
+        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter" value="{{ request.GET.search }}">
+        <div class="filter-container">
+          {% for tag in tags %}
+            {% if tag is not main_tag %}
+              <span class="filter filter-category-{{ tag.category }}">
+                <a href="{% catalogue_url view.list_type tag %}">{{ tag }}</a>
+                <a href="{% catalogue_url view.list_type tags -tag %}">✖</a>
+              </span>
+            {% endif %}
+          {% endfor %}
+        </div>
+
+      </div>
+      {% if view.get_orderings %}
+      <div class="l-books__sorting">
+        <span>Sortuj:</span>
+        <div>
+          {% for ordering in view.get_orderings %}
+            <button
+                {% if ordering.default %}
+                data-order="-"
+                {% else %}
+                data-order="{{ ordering.slug }}"
+                {% endif %}
+                {% if ordering.active %}
+                class="is-active"
+                {% endif %}
+            >{{ ordering.name }}</button>
+          {% endfor %}
+          <select name="sorting">
+            {% for ordering in view.get_orderings %}
+              <option
+                  {% if ordering.default %}
+                  value="-"
+                  {% else %}
+                  value="{{ ordering.slug }}"
+                  {% endif %}
+                  {% if ordering.active %}
+                  selected="selected"
+                  {% endif %}
+              >{{ ordering.name }}</option>
+          {% endfor %}
+          </select>
+        </div>
+      </div>
+      {% endif %}
+    </div>
+  </div>
+  <div class="l-section">
+  <div class="with-filter">
+    <div class="row">
+      <h2 class="header">{% nice_title_from_tags tags suggested_tags_by_category %}</h2>
+      {% if suggested_tags %}
+        <div class="filter-container">
+          {% for tag in suggested_tags %}
+            <span class="filter filter-category-{{ tag.category }}">
+              <a href="{% catalogue_url view.list_type tags tag %}">{{ tag }}</a>
+            </span>
+          {% endfor %}
+        </div>
+      {% endif %}
+    </div>
+  </div>
+  </div>
+
+  {% autopaginate object_list view.page_size %}
+
+  <div class="l-section l-section--col">
+    <div class="l-books__grid" id="book-list">
+      {% for book in object_list %}
+        {% include "catalogue/book_box.html" %}
+      {% endfor %}
+    </div>
+  </div>
+
+  <div id="paginator">
+    {% paginate %}
+  </div>
+
+  {% if main_tag %}
+    <section class="l-section">
+      <div class="l-author">
+        {% with tag=main_tag %}
+          {% include 'catalogue/author_box.html' %}
+        {% endwith %}
+        {% choose_cites 3 author=main_tag as cites %}
+        {% if cites %}
+          <div class="row">
+            <div class="l-author__quotes">
+              <div class="l-author__quotes__slider">
+
+                {% for fragment in cites %}
+                  <div class="l-author__quotes__slider__item">
+                    {% include "catalogue/fragment_slider_box.html" %}
+                  </div>
+                {% endfor %}
+
+              </div>
+            </div>
+          </div>
+        {% endif %}
+      </div>
+    </section>
+    {% endif %}
+{% endblock %}
index 758c8cb..16cc728 100644 (file)
 {% block footer %}
   {% if book.has_sync_file %}
     <div id="player-bar">
-      {% include 'catalogue/snippets/2022_jplayer_reader.html' %}
+      {% include 'catalogue/snippets/jplayer_reader.html' %}
     </div>
     <script type="application/json" id="smil">
      {{ book.get_sync|safe }}
index b0102d8..662b1ee 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
 {% load i18n %}
 {% load catalogue_tags reporting_stats %}
 
diff --git a/src/catalogue/templates/catalogue/collection.html b/src/catalogue/templates/catalogue/collection.html
new file mode 100644 (file)
index 0000000..70257f8
--- /dev/null
@@ -0,0 +1,50 @@
+{% extends 'base.html' %}
+
+
+{% block breadcrumbs %}
+  <a href="/katalog/"><span>Katalog</span></a>
+  <a href="/katalog/kolekcje/"><span>Kolekcje</span></a>
+{% endblock %}
+
+
+{% block main %}
+
+  <div class="l-section">
+    <div class="l-author__header">
+      <h1>{{ collection.title }}</h1>
+    </div>
+  </div>
+
+  <div class="l-author__info">
+    <p>
+      {{ collection.description|safe }}
+    </p>
+  </div>
+
+  <div class="l-section">
+    <div class="l-books__header">
+      <div class="l-books__input">
+        <i class="icon icon-filter"></i>
+        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list">
+      </div>
+      <div class="l-books__sorting">
+        <span>Sortuj:</span>
+        <div>
+          <button data-order="data-pop">najpopularniejsze</button>
+          <button class="is-active">alfabetycznie</button>
+          <!--button>chronologicznie</button-->
+        </div>
+      </div>
+    </div>
+  </div>
+
+  <div class="l-section l-section--col">
+    <div class="l-books__grid" id="book-list">
+      {% for book in collection.get_books %}
+        {% include "catalogue/book_box.html" %}
+      {% endfor %}
+    </div>
+  </div>
+
+
+{% endblock %}
diff --git a/src/catalogue/templates/catalogue/collection_box.html b/src/catalogue/templates/catalogue/collection_box.html
new file mode 100644 (file)
index 0000000..495fe23
--- /dev/null
@@ -0,0 +1,10 @@
+<div class="c-collectionbox">
+  <a href="{{ collection.get_absolute_url }}">
+    <div class="c-collectionbox-covers">
+      {% for c in collection.example3 %}
+        <img src="{{ c.cover_clean.url }}">
+      {% endfor %}
+    </div>
+    {{ collection.title }}
+  </a>
+</div>
diff --git a/src/catalogue/templates/catalogue/collections.html b/src/catalogue/templates/catalogue/collections.html
new file mode 100644 (file)
index 0000000..8fda39d
--- /dev/null
@@ -0,0 +1,42 @@
+{% extends 'base.html' %}
+
+
+{% block breadcrumbs %}
+  <a href="/katalog/"><span>Katalog</span></a>
+{% endblock %}
+
+
+{% block main %}
+
+  <div class="l-section">
+    <div class="l-author__header">
+      <h1>Kolekcje</h1>
+    </div>
+  </div>
+
+  <div class="l-search-bar">
+    <div class="l-search-bar__input">
+      <i class="icon icon-filter"></i>
+      <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="collections">
+    </div>
+  </div>
+
+  <div id="collections">
+  {% for collection in objects %}
+    <section class="l-section">
+      <div class="l-collections -js-collections">
+        <div class="l-collections__header">
+          <h3><a class="s" href="{{ collection.get_absolute_url }}">{{ collection.title }}</a></h3>
+        </div>
+        <div class="l-books">
+          {% for book in collection.get_5_books %}
+            {% include 'catalogue/book_box.html' %}
+          {% endfor %}
+        </div>
+      </div>
+    </section>
+  {% endfor %}
+  </div>
+
+
+{% endblock %}
index 494674b..c3a0c71 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 {% load catalogue_tags %}
 
diff --git a/src/catalogue/templates/catalogue/dynamic_book_list.html b/src/catalogue/templates/catalogue/dynamic_book_list.html
new file mode 100644 (file)
index 0000000..bd0acc6
--- /dev/null
@@ -0,0 +1,14 @@
+{% load pagination_tags %}
+{% autopaginate object_list view.page_size %}
+
+<div>
+<div id="object-list">
+  {% for book in object_list %}
+    {% include "catalogue/book_box.html" %}
+  {% endfor %}
+</div>
+
+<div id="paginate">
+  {% paginate %}
+</div>
+</div>
diff --git a/src/catalogue/templates/catalogue/dynamic_themed_book_list.html b/src/catalogue/templates/catalogue/dynamic_themed_book_list.html
new file mode 100644 (file)
index 0000000..4b5d0a7
--- /dev/null
@@ -0,0 +1,14 @@
+{% load pagination_tags %}
+{% autopaginate object_list view.themed_page_size %}
+
+<div>
+<div id="object-list">
+  {% for fragment in object_list %}
+    {% include "catalogue/fragment_box.html" %}
+  {% endfor %}
+</div>
+
+<div id="paginate">
+  {% paginate %}
+</div>
+</div>
diff --git a/src/catalogue/templates/catalogue/fragment_box.html b/src/catalogue/templates/catalogue/fragment_box.html
new file mode 100644 (file)
index 0000000..b6be44f
--- /dev/null
@@ -0,0 +1,27 @@
+<article class="l-books__item">
+  <figure class="l-books__item__img">
+    <a href="{{ fragment.get_absolute_url }}">
+      {% if fragment.book.cover_clean %}
+        <img src="{{ fragment.book.cover_clean.url }}" alt="{{ fragment.book.title }}">
+      {% endif %}
+    </a>
+    <div class="l-books__item__actions">
+      <a href="{{ fragment.book.get_absolute_url }}" class="icon icon-book-alt"></a>
+      {% if fragment.book.has_mp3_file %}
+        <a href="{{ fragment.book.get_absolute_url }}" class="icon icon-audio"></a>
+      {% endif %}
+    </div>
+  </figure>
+  <div class="l-books__item__content s">
+    <h3>
+      {% for author in fragment.book.authors %}
+        <a href="{{ author.get_absolute_url }}">{{ author }}</a>{% if not forloop.last %}, {% endif %}
+      {% endfor %}
+    </h3>
+    <h2><a href="{{ fragment.book.get_absolute_url }}">{{ fragment.book.title }}</a></h2>
+    <div class="fragment-text">
+      {{ fragment.short_text|safe }}
+    </div>
+    <a href="{{ fragment.get_absolute_url }}">Czytaj więcej</a>
+  </div>
+</article>
diff --git a/src/catalogue/templates/catalogue/fragment_slider_box.html b/src/catalogue/templates/catalogue/fragment_slider_box.html
new file mode 100644 (file)
index 0000000..2522ce6
--- /dev/null
@@ -0,0 +1,10 @@
+<a class="l-author__quotes__slider__item" href="{{ fragment.get_absolute_url }}">
+  <em>
+    {% if fragment.short_text %}
+      {{ fragment.short_text|safe }}
+    {% else %}
+      {{ fragment.text|safe }}
+    {% endif %}
+  </em>
+  <p>{{ fragment.book.pretty_title }}</p>
+</a>
index 14ac342..2d49a97 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
 {% load i18n %}
 {% load catalogue_tags %}
 
@@ -16,7 +16,7 @@
   <div class="l-section l-section--col">
     <div class="l-books__grid" id="book-list">
       {% for book in object_list %}
-        {% include "catalogue/2022/book_box.html" %}
+        {% include "catalogue/book_box.html" %}
       {% endfor %}
     </div>
   </div>
index e4f6f69..71aa130 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
 {% load i18n %}
 {% load catalogue_tags %}
 
@@ -17,7 +17,7 @@
   <div class="l-section l-section--col">
     <div class="l-books__grid" id="book-list">
       {% for book in object_list %}
-        {% include "catalogue/2022/book_box.html" %}
+        {% include "catalogue/book_box.html" %}
       {% endfor %}
     </div>
   </div>
index 70a5f5c..86a9d4f 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
 {% load i18n %}
 {% load catalogue_tags %}
 
@@ -25,7 +25,7 @@
   <div class="l-section l-section--col">
     <div class="l-books__grid" id="book-list">
       {% for book in object_list %}
-        {% include "catalogue/2022/book_box.html" %}
+        {% include "catalogue/book_box.html" %}
       {% endfor %}
     </div>
   </div>
diff --git a/src/catalogue/templates/catalogue/set_detail.html b/src/catalogue/templates/catalogue/set_detail.html
new file mode 100644 (file)
index 0000000..bf19a5f
--- /dev/null
@@ -0,0 +1,41 @@
+{% extends 'base.html' %}
+
+{% load choose_cites from social_tags %}
+
+
+{% block breadcrumbs %}
+  <a href="/ludzie/polka/"><span>Półka</span></a>
+{% endblock %}
+
+{% block main %}
+  <div class="l-section">
+    <div class="l-author__header">
+      <h1>{{ tags.0.name }}</h1>
+    </div>
+  </div>
+
+  <div class="l-section">
+    <div class="l-books__header">
+      <div class="l-books__input">
+        <i class="icon icon-filter"></i>
+        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list">
+      </div>
+      <div class="l-books__sorting">
+        <span>Sortuj:</span>
+        <div>
+          <button data-order="data-pop">najpopularniejsze</button>
+          <button class="is-active">alfabetycznie</button>
+          <!--button>chronologicznie</button-->
+        </div>
+      </div>
+    </div>
+  </div>
+
+  <div class="l-section l-section--col">
+    <div class="l-books__grid" id="book-list">
+      {% for book in object_list %}
+        {% include "catalogue/book_box.html" %}
+      {% endfor %}
+    </div>
+  </div>
+{% endblock %}
diff --git a/src/catalogue/templates/catalogue/snippets/2022_jplayer.html b/src/catalogue/templates/catalogue/snippets/2022_jplayer.html
deleted file mode 100644 (file)
index 6c941d7..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-{% load i18n l10n catalogue_tags %}
-
-{% with audiobooks=book.get_audiobooks %}
-  <div class="c-media__player" id="jp_container_{{ book.pk }}" data-book-slug="{{ book.slug }}">
-    <div class="jp-jplayer" data-player="jp_container_{{ book.pk }}"
-         data-supplied="oga,mp3"></div>
-
-    <div class="c-player__head">
-      <span>&nbsp;</span>
-    </div>
-
-    <div class="c-player">
-      <div class="c-player__btns">
-        <button class="play-prev" data-s-ord="2"><i class="icon icon-prev"></i></button>
-        <button class="c-player__btn--md jp-play" data-s-ord="3"><i class="icon icon-play"></i></button>
-        <button class="play-next" data-s-ord="4"><i class="icon icon-next"></i></button>
-        <div class="c-select speed" data-s-ord="1">
-          <ul>
-            <li data-speed="2">2×</li>
-            <li data-speed="1.75">1.75×</li>
-            <li data-speed="1.5">1.5×</li>
-            <li data-speed="1.25">1.25×</li>
-            <li data-speed="1" class="is-active">1×</li>
-            <li data-speed="0.75">0.75×</li>
-            <li data-speed="0.5">0.5×</li>
-          </ul>
-        </div>
-      </div>
-
-      <div class="c-player__timeline">
-        <div class="c-player__chapters">
-          {% if audiobooks.0|length > 1 %}
-            <span>
-              <span class="only-l">Rozdziały</span>
-              <span class="only-s">Roz.</span>
-            </span>
-          {% endif %}
-          <ul class="jp-playlist">
-            {% localize off %}
-            {% for i in audiobooks.0 %}
-              <li
-                  data-mp3='{{ i.mp3.file.url }}'
-                  data-ogg='{{ i.ogg.file.url }}'
-                  data-media-id="{{ i.mp3.id }}"
-                  data-duration="{{ i.mp3.duration }}"
-              >
-                {% with extra_info=i.mp3.get_extra_info_json %}
-                  <span class="title">
-                    {{ i.mp3.part_name }}
-                  </span>
-                  <span class="attribution">
-                    {% trans "Artist:" %}&nbsp;<span class='artist'>{{ extra_info.artist_name }}</span>,
-                    {% trans "director:" %}&nbsp;<span class='director'>{{ extra_info.director_name }}</span>
-                  </span>
-                  <span class="license">
-                    {% if extra_info.license %}{% license_icon extra_info.license %}{% endif %}
-                  </span>
-                  <span class="project-icon">
-                    {% if i.mp3.project_icon %}<img class="project-icon" src="{{ i.mp3.project_icon }}">{% endif %}
-                  </span>
-                  <span class="project-description">
-                    {% if i.mp3.project_description %}{{ i.mp3.project_description }}{% else %}
-                      {% with fb=extra_info.funded_by %}
-                        {% if fb %}Dofinansowano ze środków: {{ fb }}.{% endif %}
-                      {% endwith %}
-                   {% endif %}
-                  </span>
-               {% endwith %}
-              </li>
-            {% endfor %}
-            {% endlocalize %}
-          </ul>
-        </div>
-        <div class="c-player__info"></div>
-        <span>
-          <span class="jp-seek-bar">
-            <span class="jp-play-bar"></span>
-          </span>
-        </span>
-
-        <time class="c-player__length">
-          <span class="jp-current-time"></span>
-          <span class="time-left">
-          </span>
-          <span class="total-time-left">?</span>
-        </time>
-      </div>
-
-      <div class="c-player__volume">
-        <i class="icon icon-volume jp-mute"></i>
-        <span class="jp-volume-bar">
-          <span class="jp-volume-bar-value">
-          </span>
-        </span>
-      </div>
-
-
-    </div>
-    <div class="c-media__caption">
-      <div class="license"></div>
-      <div class="project-logo"></div>
-      <div class="content"></div>
-    </div>
-  </div>
-{% endwith %}
diff --git a/src/catalogue/templates/catalogue/snippets/2022_jplayer_link.html b/src/catalogue/templates/catalogue/snippets/2022_jplayer_link.html
deleted file mode 100644 (file)
index 7bbddcd..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-{% load i18n catalogue_tags %}
-
-<div class="c-media__player" id="jp_container_{{ book.pk }}">
-  <div class="c-player__head">
-    <span>&nbsp;</span>
-  </div>
-
-  <div class="c-player">
-    <div class="c-player__btns">
-      <button disabled class="play-prev"><i class="icon icon-prev"></i></button>
-      <button disabled class="c-player__btn--md"><i class="icon icon-play"></i></button>
-      <form action='{{ book.get_absolute_url }}'>
-        <button class="play-next"><i class="icon icon-next"></i></button>
-      </form>
-    </div>
-
-    <div class="c-player__timeline">
-      <div class="c-player__info">{{ book.pretty_title }}</div>
-    </div>
-
-  </div>
-  <div class="c-media__caption">
-  </div>
-</div>
diff --git a/src/catalogue/templates/catalogue/snippets/2022_jplayer_reader.html b/src/catalogue/templates/catalogue/snippets/2022_jplayer_reader.html
deleted file mode 100644 (file)
index 994812d..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-{% load i18n l10n catalogue_tags %}
-
-{% with audiobooks=book.get_audiobooks %}
-  <div class="c-media__player" id="jp_container_{{ book.pk }}" data-book-slug="{{ book.slug }}">
-    <div class="jp-jplayer" data-player="jp_container_{{ book.pk }}"
-         data-supplied="oga,mp3"></div>
-
-    <div class="c-player">
-      <div class="c-player__btns">
-        <button class="play-prev"><i class="icon icon-prev"></i></button>
-        <button class="c-player__btn--md jp-play"><i class="icon icon-play"></i></button>
-        <button class="play-next"><i class="icon icon-next"></i></button>
-        <div>
-          <button id="locator">
-            <i class="icon icon-eye"></i>
-          </button>
-        </div>
-        <!-- div class="c-select speed">
-          <ul>
-            <li data-speed="2">2×</li>
-            <li data-speed="1.75">1.75×</li>
-            <li data-speed="1.5">1.5×</li>
-            <li data-speed="1.25">1.25×</li>
-            <li data-speed="1" class="is-active">1×</li>
-            <li data-speed="0.75">0.75×</li>
-            <li data-speed="0.5">0.5×</li>
-          </ul>
-        </div-->
-      </div>
-
-
-      <div class="c-player__info"></div>
-      <div class="c-player__chapters">
-        {% if audiobooks.0|length > 1 %}
-          <span>Rozdziały</span>
-        {% endif %}
-        <ul class="jp-playlist">
-               {% localize off %}
-          {% for i in audiobooks.0 %}
-            <li
-                data-mp3='{{ i.mp3.file.url }}'
-                data-ogg='{{ i.ogg.file.url }}'
-                data-media-id="{{ i.mp3.id }}"
-                data-duration="{{ i.mp3.duration }}"
-            >
-              {% with extra_info=i.mp3.get_extra_info_json %}
-                <span class="title">
-                  {{ i.mp3.part_name }}
-                </span>
-                <span class="attribution">
-                  {% trans "Artist:" %}&nbsp;<span class='artist'>{{ extra_info.artist_name }}</span>,
-                  {% trans "director:" %}&nbsp;<span class='director'>{{ extra_info.director_name }}</span>
-                </span>
-                <span class="license">
-                  {% if extra_info.license %}{% license_icon extra_info.license %}{% endif %}
-                </span>
-                <span class="project-icon">
-                  {% if i.mp3.project_icon %}<img class="project-icon" src="{{ i.mp3.project_icon }}">{% endif %}
-                </span>
-                <span class="project-description">
-                  {% if i.mp3.project_description %}{{ i.mp3.project_description }}{% else %}
-                    {% with fb=extra_info.funded_by %}
-                      {% if fb %}Dofinansowano ze środków: {{ fb }}.{% endif %}
-                    {% endwith %}
-                 {% endif %}
-                </span>
-             {% endwith %}
-            </li>
-          {% endfor %}
-         {% endlocalize %}
-        </ul>
-      </div>
-      <div class="c-player__timeline">
-        <span>
-          <span class="jp-seek-bar">
-            <span class="jp-play-bar"></span>
-          </span>
-        </span>
-
-        <time class="c-player__length">
-          <span class="jp-current-time"></span>
-          <span class="time-left">
-          </span>
-          <span class="total-time-left">?</span>
-        </time>
-      </div>
-
-      <div class="c-player__volume">
-        <i class="icon icon-volume jp-mute"></i>
-        <span class="jp-volume-bar">
-          <span class="jp-volume-bar-value">
-          </span>
-        </span>
-      </div>
-
-
-    </div>
-  </div>
-{% endwith %}
diff --git a/src/catalogue/templates/catalogue/snippets/jplayer.html b/src/catalogue/templates/catalogue/snippets/jplayer.html
new file mode 100644 (file)
index 0000000..6c941d7
--- /dev/null
@@ -0,0 +1,105 @@
+{% load i18n l10n catalogue_tags %}
+
+{% with audiobooks=book.get_audiobooks %}
+  <div class="c-media__player" id="jp_container_{{ book.pk }}" data-book-slug="{{ book.slug }}">
+    <div class="jp-jplayer" data-player="jp_container_{{ book.pk }}"
+         data-supplied="oga,mp3"></div>
+
+    <div class="c-player__head">
+      <span>&nbsp;</span>
+    </div>
+
+    <div class="c-player">
+      <div class="c-player__btns">
+        <button class="play-prev" data-s-ord="2"><i class="icon icon-prev"></i></button>
+        <button class="c-player__btn--md jp-play" data-s-ord="3"><i class="icon icon-play"></i></button>
+        <button class="play-next" data-s-ord="4"><i class="icon icon-next"></i></button>
+        <div class="c-select speed" data-s-ord="1">
+          <ul>
+            <li data-speed="2">2×</li>
+            <li data-speed="1.75">1.75×</li>
+            <li data-speed="1.5">1.5×</li>
+            <li data-speed="1.25">1.25×</li>
+            <li data-speed="1" class="is-active">1×</li>
+            <li data-speed="0.75">0.75×</li>
+            <li data-speed="0.5">0.5×</li>
+          </ul>
+        </div>
+      </div>
+
+      <div class="c-player__timeline">
+        <div class="c-player__chapters">
+          {% if audiobooks.0|length > 1 %}
+            <span>
+              <span class="only-l">Rozdziały</span>
+              <span class="only-s">Roz.</span>
+            </span>
+          {% endif %}
+          <ul class="jp-playlist">
+            {% localize off %}
+            {% for i in audiobooks.0 %}
+              <li
+                  data-mp3='{{ i.mp3.file.url }}'
+                  data-ogg='{{ i.ogg.file.url }}'
+                  data-media-id="{{ i.mp3.id }}"
+                  data-duration="{{ i.mp3.duration }}"
+              >
+                {% with extra_info=i.mp3.get_extra_info_json %}
+                  <span class="title">
+                    {{ i.mp3.part_name }}
+                  </span>
+                  <span class="attribution">
+                    {% trans "Artist:" %}&nbsp;<span class='artist'>{{ extra_info.artist_name }}</span>,
+                    {% trans "director:" %}&nbsp;<span class='director'>{{ extra_info.director_name }}</span>
+                  </span>
+                  <span class="license">
+                    {% if extra_info.license %}{% license_icon extra_info.license %}{% endif %}
+                  </span>
+                  <span class="project-icon">
+                    {% if i.mp3.project_icon %}<img class="project-icon" src="{{ i.mp3.project_icon }}">{% endif %}
+                  </span>
+                  <span class="project-description">
+                    {% if i.mp3.project_description %}{{ i.mp3.project_description }}{% else %}
+                      {% with fb=extra_info.funded_by %}
+                        {% if fb %}Dofinansowano ze środków: {{ fb }}.{% endif %}
+                      {% endwith %}
+                   {% endif %}
+                  </span>
+               {% endwith %}
+              </li>
+            {% endfor %}
+            {% endlocalize %}
+          </ul>
+        </div>
+        <div class="c-player__info"></div>
+        <span>
+          <span class="jp-seek-bar">
+            <span class="jp-play-bar"></span>
+          </span>
+        </span>
+
+        <time class="c-player__length">
+          <span class="jp-current-time"></span>
+          <span class="time-left">
+          </span>
+          <span class="total-time-left">?</span>
+        </time>
+      </div>
+
+      <div class="c-player__volume">
+        <i class="icon icon-volume jp-mute"></i>
+        <span class="jp-volume-bar">
+          <span class="jp-volume-bar-value">
+          </span>
+        </span>
+      </div>
+
+
+    </div>
+    <div class="c-media__caption">
+      <div class="license"></div>
+      <div class="project-logo"></div>
+      <div class="content"></div>
+    </div>
+  </div>
+{% endwith %}
diff --git a/src/catalogue/templates/catalogue/snippets/jplayer_link.html b/src/catalogue/templates/catalogue/snippets/jplayer_link.html
new file mode 100644 (file)
index 0000000..7bbddcd
--- /dev/null
@@ -0,0 +1,24 @@
+{% load i18n catalogue_tags %}
+
+<div class="c-media__player" id="jp_container_{{ book.pk }}">
+  <div class="c-player__head">
+    <span>&nbsp;</span>
+  </div>
+
+  <div class="c-player">
+    <div class="c-player__btns">
+      <button disabled class="play-prev"><i class="icon icon-prev"></i></button>
+      <button disabled class="c-player__btn--md"><i class="icon icon-play"></i></button>
+      <form action='{{ book.get_absolute_url }}'>
+        <button class="play-next"><i class="icon icon-next"></i></button>
+      </form>
+    </div>
+
+    <div class="c-player__timeline">
+      <div class="c-player__info">{{ book.pretty_title }}</div>
+    </div>
+
+  </div>
+  <div class="c-media__caption">
+  </div>
+</div>
diff --git a/src/catalogue/templates/catalogue/snippets/jplayer_reader.html b/src/catalogue/templates/catalogue/snippets/jplayer_reader.html
new file mode 100644 (file)
index 0000000..994812d
--- /dev/null
@@ -0,0 +1,99 @@
+{% load i18n l10n catalogue_tags %}
+
+{% with audiobooks=book.get_audiobooks %}
+  <div class="c-media__player" id="jp_container_{{ book.pk }}" data-book-slug="{{ book.slug }}">
+    <div class="jp-jplayer" data-player="jp_container_{{ book.pk }}"
+         data-supplied="oga,mp3"></div>
+
+    <div class="c-player">
+      <div class="c-player__btns">
+        <button class="play-prev"><i class="icon icon-prev"></i></button>
+        <button class="c-player__btn--md jp-play"><i class="icon icon-play"></i></button>
+        <button class="play-next"><i class="icon icon-next"></i></button>
+        <div>
+          <button id="locator">
+            <i class="icon icon-eye"></i>
+          </button>
+        </div>
+        <!-- div class="c-select speed">
+          <ul>
+            <li data-speed="2">2×</li>
+            <li data-speed="1.75">1.75×</li>
+            <li data-speed="1.5">1.5×</li>
+            <li data-speed="1.25">1.25×</li>
+            <li data-speed="1" class="is-active">1×</li>
+            <li data-speed="0.75">0.75×</li>
+            <li data-speed="0.5">0.5×</li>
+          </ul>
+        </div-->
+      </div>
+
+
+      <div class="c-player__info"></div>
+      <div class="c-player__chapters">
+        {% if audiobooks.0|length > 1 %}
+          <span>Rozdziały</span>
+        {% endif %}
+        <ul class="jp-playlist">
+               {% localize off %}
+          {% for i in audiobooks.0 %}
+            <li
+                data-mp3='{{ i.mp3.file.url }}'
+                data-ogg='{{ i.ogg.file.url }}'
+                data-media-id="{{ i.mp3.id }}"
+                data-duration="{{ i.mp3.duration }}"
+            >
+              {% with extra_info=i.mp3.get_extra_info_json %}
+                <span class="title">
+                  {{ i.mp3.part_name }}
+                </span>
+                <span class="attribution">
+                  {% trans "Artist:" %}&nbsp;<span class='artist'>{{ extra_info.artist_name }}</span>,
+                  {% trans "director:" %}&nbsp;<span class='director'>{{ extra_info.director_name }}</span>
+                </span>
+                <span class="license">
+                  {% if extra_info.license %}{% license_icon extra_info.license %}{% endif %}
+                </span>
+                <span class="project-icon">
+                  {% if i.mp3.project_icon %}<img class="project-icon" src="{{ i.mp3.project_icon }}">{% endif %}
+                </span>
+                <span class="project-description">
+                  {% if i.mp3.project_description %}{{ i.mp3.project_description }}{% else %}
+                    {% with fb=extra_info.funded_by %}
+                      {% if fb %}Dofinansowano ze środków: {{ fb }}.{% endif %}
+                    {% endwith %}
+                 {% endif %}
+                </span>
+             {% endwith %}
+            </li>
+          {% endfor %}
+         {% endlocalize %}
+        </ul>
+      </div>
+      <div class="c-player__timeline">
+        <span>
+          <span class="jp-seek-bar">
+            <span class="jp-play-bar"></span>
+          </span>
+        </span>
+
+        <time class="c-player__length">
+          <span class="jp-current-time"></span>
+          <span class="time-left">
+          </span>
+          <span class="total-time-left">?</span>
+        </time>
+      </div>
+
+      <div class="c-player__volume">
+        <i class="icon icon-volume jp-mute"></i>
+        <span class="jp-volume-bar">
+          <span class="jp-volume-bar-value">
+          </span>
+        </span>
+      </div>
+
+
+    </div>
+  </div>
+{% endwith %}
diff --git a/src/catalogue/templates/catalogue/tag_catalogue.html b/src/catalogue/templates/catalogue/tag_catalogue.html
new file mode 100644 (file)
index 0000000..280a3d6
--- /dev/null
@@ -0,0 +1,44 @@
+{% extends 'base.html' %}
+{% load thumbnail %}
+
+
+{% block settings %}
+{% endblock %}
+
+{% block breadcrumbs %}
+  <span>{{ whole_category }}</span>
+{% endblock %}
+
+
+{% block main %}
+  <div class="l-section">
+    <div class="l-author__header">
+      <h1>{{ whole_category }}</h1>
+    </div>
+  </div>
+
+  <div class="l-search-bar">
+    <div class="l-search-bar__input">
+      <i class="icon icon-filter"></i>
+      <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="tag-list">
+    </div>
+  </div>
+
+
+  <div class="l-section l-taglist">
+    <ul id="tag-list">
+      {% for tag in tags %}
+        <li>
+          {% if tag.photo %}
+            {% thumbnail tag.photo '40x40' crop='top' as thumb %}
+            <img src="{{ thumb.url }}" class="c-avatar">
+            {% endthumbnail %}
+          {% endif %}
+          <a class="s" href="{{ tag.get_absolute_url }}">{{ tag }} ({{ tag.count }})</a>
+        </li>
+      {% endfor %}
+    </ul>
+ </div>
+
+
+{% endblock %}
diff --git a/src/catalogue/templates/catalogue/theme_detail.html b/src/catalogue/templates/catalogue/theme_detail.html
new file mode 100644 (file)
index 0000000..8f1ab8b
--- /dev/null
@@ -0,0 +1,89 @@
+{% extends 'base.html' %}
+{% load catalogue_tags %}
+{% load pagination_tags %}
+
+{% block global-content %}
+  <div class="l-container">
+    <div class="l-breadcrumb">
+      <a href="/"><span>Strona główna</span></a>
+      <a href="/katalog/"><span>Katalog</span></a>
+      <a href="/katalog/motyw/"><span>Motyw</span></a>
+      <span>{{ main_tag.name }}</span>
+    </div>
+  </div>
+
+  <main class="l-main">
+
+    <div class="l-section">
+      <div class="l-author__header">
+        <h1><span>Motyw:</span> {{ main_tag.name }}</h1>
+      </div>
+    </div>
+
+
+    <div class="l-section">
+      <div class="l-books__header">
+        <div class="l-books__input">
+          <i class="icon icon-filter"></i>
+          <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter">
+          <div class="filter-container">
+            {% for tag in tags %}
+              {% if tag is not main_tag %}
+                <span class="filter filter-category-{{ tag.category }}">
+                  <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
+                  <a href="{% catalogue_url list_type tags -tag %}">✖</a>
+                </span>
+              {% endif %}
+            {% endfor %}
+          </div>
+
+        </div>
+      </div>
+    </div>
+    <div class="with-filter">
+      <div class="row">
+        <h2>{% nice_title_from_tags tags categories %}</h2>
+        {% if suggest %}
+          <div class="filter-container">
+            {% for tag in suggest %}
+              <span class="filter filter-category-{{ tag.category }}">
+                <a href="{% catalogue_url list_type tags tag %}">{{ tag }}</a>
+              </span>
+            {% endfor %}
+          </div>
+        {% endif %}
+      </div>
+    </div>
+
+    {% autopaginate object_list 10 %}
+
+    <div class="l-section l-section--col">
+      <div class="l-theme">
+        <div class="l-theme__col">
+          <div class="l-books__col">
+
+            {% for fragment in object_list %}
+              {% include 'catalogue/fragment_box.html' %}
+            {% endfor %}
+            {% paginate %}
+          </div>
+        </div>
+        <div class="l-theme__col">
+          <div class="l-theme__info">
+            <h3>Motyw: {{ main_tag.name }}</h3>
+            {{ main_tag.description|safe }}
+            <!--
+                 <h3>Motyw w sztuce <i class="icon icon-arrow-left"></i> <i class="icon icon-arrow-right"></i></h3>
+                 <div class="l-theme__info__slider">
+                 <img src="images/motyw.jpg" alt="">
+                 <img src="images/motyw.jpg" alt="">
+                 <img src="images/motyw.jpg" alt="">
+                 </div>
+            -->
+          </div>
+        </div>
+      </div>
+    </div>
+  </main>
+
+{% endblock %}
diff --git a/src/catalogue/templates/catalogue/themed_book_list.html b/src/catalogue/templates/catalogue/themed_book_list.html
new file mode 100644 (file)
index 0000000..70426c0
--- /dev/null
@@ -0,0 +1,90 @@
+{% extends 'base.html' %}
+{% load catalogue_tags %}
+{% load pagination_tags %}
+
+{% block global-content %}
+  <div class="l-container">
+    <div class="l-breadcrumb">
+      <a href="/"><span>Strona główna</span></a>
+      <a href="/katalog/"><span>Katalog</span></a>
+      <a href="/katalog/motyw/"><span>Motyw</span></a>
+      <span>{{ main_tag.name }}</span>
+    </div>
+  </div>
+
+  <main class="l-main">
+
+    <div class="l-section">
+      <div class="l-author__header">
+        <h1><span>Motyw:</span> {{ main_tag.name }}</h1>
+      </div>
+    </div>
+
+
+    <div class="l-section">
+      <div class="l-books__header">
+        <div class="l-books__input">
+          <i class="icon icon-filter"></i>
+          <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter" value="{{ request.GET.search }}">
+          <div class="filter-container">
+            {% for tag in tags %}
+              {% if tag is not main_tag %}
+                <span class="filter filter-category-{{ tag.category }}">
+                  <a href="{% catalogue_url view.list_type tag %}">{{ tag }}</a>
+                  <a href="{% catalogue_url view.list_type tags -tag %}">✖</a>
+                </span>
+              {% endif %}
+            {% endfor %}
+          </div>
+
+        </div>
+      </div>
+    </div>
+    <div class="with-filter">
+      <div class="row">
+        <h2 class="header">{% nice_title_from_tags tags categories %}</h2>
+        {% if suggested_tags %}
+          <div class="filter-container">
+            {% for tag in suggested_tags %}
+              <span class="filter filter-category-{{ tag.category }}">
+                <a href="{% catalogue_url view.list_type tags tag %}">{{ tag }}</a>
+              </span>
+            {% endfor %}
+          </div>
+        {% endif %}
+      </div>
+    </div>
+
+    {% autopaginate object_list view.themed_page_size %}
+
+    <div class="l-section l-section--col">
+      <div class="l-theme">
+        <div class="l-theme__col">
+          <div class="l-books__col" id="book-list">
+            {% for fragment in object_list %}
+              {% include 'catalogue/fragment_box.html' %}
+            {% endfor %}
+          </div>
+        </div>
+        <div class="l-theme__col">
+          <div class="l-theme__info">
+            <h3>Motyw: {{ main_tag.name }}</h3>
+            {{ main_tag.description|safe }}
+            <!--
+                 <h3>Motyw w sztuce <i class="icon icon-arrow-left"></i> <i class="icon icon-arrow-right"></i></h3>
+                 <div class="l-theme__info__slider">
+                 <img src="images/motyw.jpg" alt="">
+                 <img src="images/motyw.jpg" alt="">
+                 <img src="images/motyw.jpg" alt="">
+                 </div>
+            -->
+          </div>
+        </div>
+      </div>
+      <div id="paginator">
+        {% paginate %}
+      </div>
+    </div>
+  </main>
+
+{% endblock %}
index 69babf4..9ccf6ba 100644 (file)
@@ -66,7 +66,7 @@
       var STATIC_URL = "{{ STATIC_URL }}";
     </script>
     {% javascript "book_text" %}
-      {% javascript "2022_player" %}
+      {% javascript "player" %}
 
     {% block extrabody %}{% endblock %}
     <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
index 817b3ad..a9cc7e0 100644 (file)
@@ -51,7 +51,7 @@ def daisy_list(request):
 
 def collection(request, slug):
     coll = get_object_or_404(Collection, slug=slug)
-    template_name = 'catalogue/2022/collection.html'
+    template_name = 'catalogue/collection.html'
     return render(request, template_name, {
         'collection': coll,
         'active_menu_item': 'collections',
@@ -161,10 +161,10 @@ class ObjectListView(TemplateView):
 class BookList(ObjectListView):
     title = gettext_lazy('Literature')
     list_type = 'books'
-    template_name = 'catalogue/2022/book_list.html'
-    dynamic_template_name = 'catalogue/2022/dynamic_book_list.html'
-    themed_template_name = 'catalogue/2022/themed_book_list.html'
-    dynamic_themed_template_name = 'catalogue/2022/dynamic_themed_book_list.html'
+    template_name = 'catalogue/book_list.html'
+    dynamic_template_name = 'catalogue/dynamic_book_list.html'
+    themed_template_name = 'catalogue/themed_book_list.html'
+    dynamic_themed_template_name = 'catalogue/dynamic_themed_book_list.html'
 
     orderings = {
         'pop': ('-popularity__count', 'najpopularniejsze'),
@@ -196,8 +196,8 @@ class BookList(ObjectListView):
 
 
 class ArtList(ObjectListView):
-    template_name = 'catalogue/2022/book_list.html'
-    dynamic_template_name = 'catalogue/2022/dynamic_book_list.html'
+    template_name = 'catalogue/book_list.html'
+    dynamic_template_name = 'catalogue/dynamic_book_list.html'
     title = gettext_lazy('Art')
     list_type = 'gallery'
 
@@ -382,9 +382,9 @@ def object_list(request, objects, fragments=None, related_tags=None, tags=None,
     has_theme = any(((theme := x).category == 'theme' for x in tags))
     if has_theme:
         result['main_tag'] = theme
-        template = 'catalogue/2022/theme_detail.html'
+        template = 'catalogue/theme_detail.html'
     else:
-        template = 'catalogue/2022/author_detail.html'
+        template = 'catalogue/author_detail.html'
         
     return render(
         request, template, result,
@@ -501,7 +501,7 @@ def book_fragments(request, slug, theme_slug):
     fragments = Fragment.tagged.with_all([theme]).filter(
         Q(book=book) | Q(book__ancestor=book))
 
-    template_name = 'catalogue/2022/book_fragments.html'
+    template_name = 'catalogue/book_fragments.html'
     return render(
         request,
         template_name,
@@ -522,7 +522,7 @@ def book_detail(request, slug):
 
     return render(
         request,
-        'catalogue/2022/book_detail.html',
+        'catalogue/book_detail.html',
         {
             'book': book,
             'accessible': book.is_accessible_to(request.user),
@@ -661,7 +661,7 @@ def tag_catalogue(request, category):
     else:
         best = described_tags
 
-    template_name = 'catalogue/2022/tag_catalogue.html'
+    template_name = 'catalogue/tag_catalogue.html'
     return render(request, template_name, {
         'tags': tags,
         'best': best,
@@ -679,7 +679,7 @@ def collections(request):
     else:
         best = objects
 
-    template_name = 'catalogue/2022/collections.html'
+    template_name = 'catalogue/collections.html'
     return render(request, template_name, {
         'objects': objects,
         'best': best,
diff --git a/src/club/templates/club/2022/donation_step1.html b/src/club/templates/club/2022/donation_step1.html
deleted file mode 100644 (file)
index a59abd6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{% extends 'club/2022/donation_step_base.html' %}
-{% load club %}
-{% load static %}
-
-
-{% block donation-step-content %}
-  {% include "club/2022/donation_step1_form.html" %}
-{% endblock %}
diff --git a/src/club/templates/club/2022/donation_step1_form.html b/src/club/templates/club/2022/donation_step1_form.html
deleted file mode 100644 (file)
index 6a45f2c..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-{% load static %}
-
-<form method="post" action="{% url 'club_join' %}">
-  {% csrf_token %}
-  {{ form.errors }}
-  <input type="radio" name="switch" id="switch-once" value="single" class="toggle-input" {% if schedule and not schedule.monthly %}checked{% endif %}>
-  <input type="radio" name="switch" id="switch-monthly" value="monthly" class="toggle-input" {% if not schedule or schedule.monthly %}checked{% endif %}>
-  <div class="l-switch__wrapper">
-    {% if user.is_staff %}
-      <span data-edit="club/club/{{ club.pk }}"></span>
-    {% endif %}
-
-    <div class="l-switch white">
-      <label class='toggle-for' for="switch-once">Jednorazowo</label>
-      <label class='toggle-for' for="switch-monthly">Miesięcznie</label>
-      <span class="toggle"></span>
-    </div>
-  </div>
-
-  {% with amounts=club.get_amounts %}
-    <div class="l-checkout__payments payments-once wide-spot-{{ amounts.single_wide_spot }}">
-      {% for amount in amounts.single %}
-        <div class="l-checkout__payments__box once{% if not schedule.monthly and schedule.amount == amount.amount or not schedule and club.default_single_amount == amount.amount %} is-active{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% endif %} l-checkout__payments__box--{{ amount.box_variant }}">
-
-          <h3>{{ amount.amount }} zł</h3>
-          <div class="l-checkout__payments__box__btn-wrp">
-            {% if amount.description %}
-              <p>{{ amount.description|safe }}</p>
-            {% endif %}
-            <button name="single_amount" value="{{ amount.amount }}">Wybierz</button>
-          </div>
-        </div>
-      {% endfor %}
-      <input type="hidden"
-             name="single_amount_selected"
-             value="{% if schedule and not schedule.monthly %}{{ schedule.amount|floatformat }}{% else %}{{ club.default_single_amount }}{% endif %}">
-
-    </div>
-
-
-    <div class="l-checkout__payments payments-recurring wide-spot-{{ amounts.monthly_wide_spot }}">
-    {% for amount in amounts.monthly %}
-      <div class="l-checkout__payments__box{% if schedule.monthly and schedule.amount == amount.amount or not schedule and amount.amount == club.default_monthly_amount %} is-active{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% endif %} l-checkout__payments__box--{{ amount.box_variant }}">
-        <h3>{{ amount.amount }} zł <span>/mies.</span></h3>
-        <div class="l-checkout__payments__box__btn-wrp">
-          {% if amount.description %}
-            <p>{{ amount.description|safe }}</p>
-          {% endif %}
-          <button name="monthly_amount" value="{{ amount.amount }}">Wybierz</button>
-        </div>
-      </div>
-    {% endfor %}
-    <input type="hidden"
-           name="monthly_amount_selected"
-           value="{% if schedule and schedule.monthly %}{{ schedule.amount|floatformat }}{% else %}{{ club.default_monthly_amount }}{% endif %}">
-  </div>
-
-  <div class="l-checkout__amount">
-    <div class="l-checkout__input">
-      <label for="kwota">Inna kwota</label>
-      <!-- input type="text" id="kwota" name="custom_amount" value="" -->
-      {{ form.custom_amount }}
-    </div>
-    <button>Dalej</button>
-  </div>
-  {% endwith %}
-</form>
-
-<div class="l-checkout__secure">
-  <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
-  Bezpieczne płatności zapewniają:
-  <img src="{% static '2022/images/payments-payu.png' %}" class="l-checkout__secure__img" alt="PayU Visa MasterCard">
-  {% if club.paypal_enabled %}
-    <img src="{% static '2022/images/payments-paypal.png' %}" class="l-checkout__secure__img" alt="PayPal">
-  {% endif %}
-</div>
-
-<div class="l-checkout__cols bt-w">
-  <div class="l-checkout__col full">
-    <div class="l-checkout__form">
-      <div class="l-checkout__form__row full">
-        <h3>Dane do przelewu tradycyjnego:</h3>
-        <div class="l-checkout__info">
-          <div class="l-checkout__info__item">
-            <div>nazwa odbiorcy</div>
-            <h3>Fundacja Wolne Lektury</h3>
-            <button title="Kopiuj tekst" class="js-copy">
-              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-            </button>
-            <input type="text" value="Fundacja Wolne Lektury">
-          </div>
-          <div class="l-checkout__info__item">
-            <div>adres odbiorcy</div>
-            <h3>ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa</h3>
-            <button title="Kopiuj tekst" class="js-copy">
-              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-            </button>
-            <input type="text" value="ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa">
-          </div>
-          <div class="l-checkout__info__item">
-            <div>numer konta</div>
-            <h3>75 1090 2851 0000 0001 4324 3317</h3>
-            <button title="Kopiuj tekst" class="js-copy">
-              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-            </button>
-            <input type="text" value="75 1090 2851 0000 0001 4324 3317">
-          </div>
-          <div class="l-checkout__info__item">
-            <div>tytuł przelewu</div>
-            <h3>Darowizna na Wolne Lektury + twoja nazwa użytkownika lub e-mail</h3>
-            <button title="Kopiuj tekst" class="js-copy">
-              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-            </button>
-            <input type="text" value="Darowizna na Wolne Lektury + twoja nazwa użytkownika lub e-mail">
-          </div>
-          <div class="l-checkout__info__item">
-            <div>wpłaty w EUR</div>
-            <h3>PL88 1090 2851 0000 0001 4324 3374</h3>
-            <button title="Kopiuj tekst" class="js-copy">
-              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-            </button>
-            <input type="text" value="PL88 1090 2851 0000 0001 4324 3374">
-          </div>
-          <div class="l-checkout__info__item">
-            <div>Wpłaty w USD</div>
-            <h3>PL82 1090 2851 0000 0001 4324 3385</h3>
-            <button title="Kopiuj tekst" class="js-copy">
-              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-            </button>
-            <input type="text" value="PL88 1090 2851 0000 0001 4324 3374">
-          </div>
-          <div class="l-checkout__info__item">
-            <div>SWIFT</div>
-            <h3>WBKPPLPP</h3>
-            <button title="Kopiuj tekst" class="js-copy">
-              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-            </button>
-            <input type="text" value="WBKPPLPP">
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</div>
diff --git a/src/club/templates/club/2022/donation_step2.html b/src/club/templates/club/2022/donation_step2.html
deleted file mode 100644 (file)
index 4f43b84..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-{% extends 'club/2022/donation_step_base.html' %}
-
-{% load static %}
-
-
-{% block donation-jumbo-image %}{% static '2022/images/checkout-img-2.jpg' %}{% endblock %}
-
-
-{% block donation-step-content %}
-
-  <div class="l-checkout__cols">
-    <div class="l-checkout__col">
-      <div class="l-checkout__payments__box is-active">
-        <h3>
-          {{ schedule.amount|floatformat }} zł
-          {% if schedule.monthly %}
-            <span>/mies.</span>
-          {% endif %}
-        </h3>
-        <img src="{% static '2022/images/checkout-img-3.jpg' %}" alt="">
-        <p>{{ schedule.get_description }}</p>
-      </div>
-    </div>
-    <div class="l-checkout__col">
-
-      <form method='post'>
-        {% csrf_token %}
-        {{ form.errors }}
-        {{ form.amount }}
-        {{ form.monthly }}
-        <div class="l-checkout__form">
-          <div class="l-checkout__form__row">
-            <div class="l-checkout__input">
-              <label for="imie"><span>*</span> Imię</label>
-              {{ form.first_name }}
-              {{ form.first_name.errors }}
-            </div>
-            <div class="l-checkout__input">
-              <label for="nazwisko"><span>*</span> Nazwisko</label>
-              {{ form.last_name }}
-              {{ form.last_name.errors }}
-            </div>
-          </div>
-          <div class="l-checkout__form__row">
-            <div class="l-checkout__input">
-              <label for="email"><span>*</span> E-mail</label>
-              {{ form.email }}
-              {{ form.email.errors }}
-            </div>
-            <div class="l-checkout__input">
-              <label for="telefon"><span>*</span> Telefon</label>
-              {{ form.phone }}
-              {{ form.phone.errors }}
-            </div>
-          </div>
-          <div class="l-checkout__form__row full">
-            <div class="l-checkout__input">
-              <label for="adres-pocztowy">Adres pocztowy</label>
-              {{ form.postal }}
-              {{ form.postal.errors }}
-            </div>
-          </div>
-          <div class="l-checkout__form__row">
-            <div class="l-checkout__input">
-              <label for="kod-pocztowy">Kod pocztowy</label>
-              {{ form.postal_code }}
-              {{ form.postal_code.errors }}
-            </div>
-            <div class="l-checkout__input">
-              <label for="miejscowosc">Miejscowość</label>
-              {{ form.postal_town }}
-              {{ form.postal_town.errors }}
-            </div>
-          </div>
-          <div class="l-checkout__form__row full">
-            <div class="l-checkout__input">
-              <label for="kod-pocztowy">Kraj</label>
-              {{ form.postal_country }}
-              {{ form.postal_country.errors }}
-            </div>
-          </div>
-          <div class="l-checkout__form__row full">
-            {% for consent, key, field in form.consent %}
-              {{ field.errors }}
-              <div class="c-checkbox">
-                {{ field }}
-                <label for="id_{{ key }}">
-                  <p>{% if field.field.required %}<span>*</span> {% endif %}{{ field.label }}</p>
-                </label>
-              </div>
-            {% endfor %}
-            <div class="c-checkbox">
-              {{ form.agree_newsletter }}
-              <label for="id_agree_newsletter">
-                <p>Zapisuję się na newsletter.</p>
-              </label>
-            </div>
-          </div>
-          <div class="l-checkout__form__row confirm">
-            <a href="{% url 'donation_step1' schedule.key %}">Powrót</a>
-            <div class="l-checkout__input">
-              <button>Dalej</button>
-            </div>
-          </div>
-        </div>
-      </form>
-    </div>
-  </div>
-  <div class="l-checkout__secure">
-    <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
-    Bezpieczne płatności zapewniają:
-    <img src="{% static '2022/images/payments-payu.png' %}" class="l-checkout__secure__img" alt="PayU Visa MasterCard">
-    {% if club.paypal_enabled %}
-      <img src="{% static '2022/images/payments-paypal.png' %}" class="l-checkout__secure__img" alt="PayPal">
-    {% endif %}
-  </div>
-{% endblock %}
diff --git a/src/club/templates/club/2022/donation_step3.html b/src/club/templates/club/2022/donation_step3.html
deleted file mode 100644 (file)
index 7acb617..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-{% extends 'club/2022/donation_step_base.html' %}
-
-{% load static %}
-{% load club %}
-
-
-{% block donation-jumbo-image %}{% static '2022/images/checkout-img-4.jpg' %}{% endblock %}
-
-
-{% block donation-step-content %}
-  <div class="l-checkout__cols">
-    <div class="l-checkout__col">
-      <div class="l-checkout__payments__box is-active">
-        <h3>
-          {{ schedule.amount|floatformat }} zł
-          {% if schedule.monthly %}
-            <span>/mies.</span>
-          {% endif %}</h3>
-          <img src="{% static '2022/images/checkout-img-3.jpg' %}" alt="">
-      </div>
-    </div>
-    <div class="l-checkout__col">
-      <div class="l-checkout__form">
-        <div class="l-checkout__form__row full">
-          <!-- h3>Wybierz bezpieczną płatność:</h3-->
-          <div class="iframe">
-            {% for method in schedule.get_payment_methods %}
-              {% invite_payment method schedule %}
-            {% endfor %}
-          </div>
-        </div>
-        <div class="l-checkout__form__row full">
-          <h3>Możesz też ustawić stały przelew na konto:</h3>
-          <div class="l-checkout__info">
-            <div class="l-checkout__info__item">
-              <div>nazwa odbiorcy</div>
-              <h3>Fundacja Wolne Lektury</h3>
-              <button title="Kopiuj tekst" class="js-copy">
-                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-              </button>
-              <input type="text" value="Fundacja Wolne Lektury">
-            </div>
-            <div class="l-checkout__info__item">
-              <div>adres odbiorcy</div>
-              <h3>ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa</h3>
-              <button title="Kopiuj tekst" class="js-copy">
-                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-              </button>
-              <input type="text" value="ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa">
-            </div>
-            <div class="l-checkout__info__item">
-              <div>numer konta</div>
-              <h3>75 1090 2851 0000 0001 4324 3317</h3>
-              <button title="Kopiuj tekst" class="js-copy">
-                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-              </button>
-              <input type="text" value="75 1090 2851 0000 0001 4324 3317">
-            </div>
-            <div class="l-checkout__info__item">
-              <div>tytuł przelewu</div>
-              <h3>Darowizna na Wolne Lektury + twoja nazwa użytkownika lub e-mail</h3>
-              <button title="Kopiuj tekst" class="js-copy">
-                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-              </button>
-              <input type="text" value="Darowizna na Wolne Lektury + twoja nazwa użytkownika lub e-mail">
-            </div>
-            <div class="l-checkout__info__item">
-              <div>wpłaty w EUR</div>
-              <h3>PL88 1090 2851 0000 0001 4324 3374</h3>
-              <button title="Kopiuj tekst" class="js-copy">
-                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-              </button>
-              <input type="text" value="PL88 1090 2851 0000 0001 4324 3374">
-            </div>
-            <div class="l-checkout__info__item">
-              <div>Wpłaty w USD</div>
-              <h3>PL82 1090 2851 0000 0001 4324 3385</h3>
-              <button title="Kopiuj tekst" class="js-copy">
-                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-              </button>
-              <input type="text" value="PL88 1090 2851 0000 0001 4324 3374">
-            </div>
-            <div class="l-checkout__info__item">
-              <div>SWIFT</div>
-              <h3>WBKPPLPP</h3>
-              <button title="Kopiuj tekst" class="js-copy">
-                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
-              </button>
-              <input type="text" value="WBKPPLPP">
-            </div>
-          </div>
-        </div>
-        <div class="l-checkout__form__row confirm">
-          <a href="{% url 'donation_step2' schedule.key %}">Powrót</a>
-        </div>
-      </div>
-    </div>
-  </div>
-  <div class="l-checkout__secure">
-    <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
-    Bezpieczne płatności zapewniają:
-    <img src="{% static '2022/images/payments-payu.png' %}" class="l-checkout__secure__img" alt="PayU Visa MasterCard">
-    {% if club.paypal_enabled %}
-      <img src="{% static '2022/images/payments-paypal.png' %}" class="l-checkout__secure__img" alt="PayPal">
-    {% endif %}
-  </div>
-{% endblock %}
diff --git a/src/club/templates/club/2022/donation_step4.html b/src/club/templates/club/2022/donation_step4.html
deleted file mode 100644 (file)
index fd14ca7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends 'club/2022/donation_step_base.html' %}
-
-
-{% block donation-step-content %}
-  <div class="l-checkout__completed">
-    <div class="l-checkout__completed__wrapper">
-      <h1>Dziękujemy za wpłatę!</h1>
-      <p>
-        Zajrzyj teraz do e-maila. Tam znajdziesz link,
-        który powiąże płatność z Twoim kontem użytkownika Wolnych Lektur.
-      </p>
-      <a href="/">Wracam do lektur</a>
-    </div>
-  </div>
-{% endblock %}
diff --git a/src/club/templates/club/2022/donation_step_base.html b/src/club/templates/club/2022/donation_step_base.html
deleted file mode 100644 (file)
index fa41f5f..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-{% extends '2022/base.html' %}
-{% load chunks %}
-{% load club %}
-{% load static %}
-
-
-{% block global-content %}
-  <div class="l-container">
-    <div class="l-breadcrumb">
-      <a href="/"><span>Strona główna</span></a>
-      <span>Wesprzyj nas</span>
-    </div>
-  </div>
-
-
-  <main class="l-main">
-    <div class="l-checkout__support">
-      <div class="l-checkout__support__bar">
-        <span data-label="Jest nas {% club_count_recurring %}" style="width: calc({% club_count_recurring %}% / 5);"></span>
-      </div>
-      <div class="l-checkout__support__footer">
-        <p>Dołącz do naszych stałych <strong>darczyńców</strong>!</p>
-        <p>Potrzebujemy <strong>500</strong> regularnych darczyńców, by Wolne Lektury mogły działać!</p>
-      </div>
-    </div>
-
-    <div class="l-checkout__box">
-      <div class="l-checkout__box__header">
-        <img src="{% block donation-jumbo-image %}{% static '2022/images/checkout-img-1.jpg' %}{% endblock %}" alt="Wspieraj Wolne Lektury">
-        <div class="l-checkout__box__header__content">
-          <h1>Wspieraj Wolne Lektury</h1>
-          <p>Dziękujemy, że chcesz razem z nami uwalniać książki!</p>
-          <p>Wspieraj Wolne Lektury stałą wpłatą – nawet niewielka ma wielką moc! Możesz też wesprzeć Wolne Lektury jednorazowo.</p>
-        </div>
-      </div>
-      <div class="l-checkout__steps">
-
-        {% if view.step > 1 and view.step != 4 %}
-          <a href="{% url 'donation_step1' schedule.key %}">
-        {% endif %}
-        <div class="{% if view.step == 1 %}is-current{% else %}is-completed{% endif %}">
-          <span>1</span>
-          <p>Rodzaj wsparcia</p>
-        </div>
-        {% if view.step > 1 and view.step != 4 %}
-          </a>
-        {% endif %}
-
-        {% if view.step != 2 and schedule and view.step != 4 %}
-          <a href="{% url 'donation_step2' schedule.key %}">
-        {% endif %}
-        <div class="{% if view.step == 2 %}is-current{% elif not schedule %}is-inactive{% else %}is-completed{% endif %}">
-          <span>2</span>
-          <p>Dane</p>
-        </div>
-        {% if view.step != 2 and schedule and view.step != 4 %}
-          </a>
-        {% endif %}
-
-        {% if view.step != 3 and schedule.email and view.step != 4 %}
-          <a href="{{ schedule.get_absolute_url }}">
-        {% endif %}
-        <div class="{% if view.step == 3 %}is-current{% elif not schedule or not schedule.method %}is-inactive{% else %}is-completed{% endif %}">
-          <span>3</span>
-          <p>Forma płatności</p>
-        </div>
-        {% if view.step != 3 and schedule.email and view.step != 4 %}
-          </a>
-        {% endif %}
-
-        <div class="{% if view.step == 4 %}is-completed{% else %}is-inactive{% endif %}">
-          <span>4</span>
-          <p>Gotowe</p>
-        </div>
-      </div>
-
-
-      {% block donation-step-content %}{% endblock %}
-
-    </div>
-
-    <div class="l-checkout__footer">
-      <div class="l-checkout__footer__content">
-        <div class="l-checkout__footer__content__item">
-          <h3>Transparentność jest dla nas bardzo ważna.</h3>
-          <div>
-            <div class="l-article__overlay" data-max-height="91">
-              {% chunk 'donation-transparency' %}
-            </div>
-            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
-          </div>
-        </div>
-        <div class="l-checkout__footer__content__item">
-          <h3>Informacja o przetwarzaniu danych osobowych</h3>
-          <div>
-            <div class="l-article__overlay" data-max-height="91">
-              {% chunk 'donation-data-processing' %}
-            </div>
-            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
-          </div>
-        </div>
-        <div class="l-checkout__footer__content__item">
-          <h3>FAQ</h3>
-          <div>
-            <div class="l-article__overlay" data-max-height="91">
-              {% chunk 'donation-faq' %}
-            </div>
-            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
-          </div>
-        </div>
-        <div class="l-checkout__footer__content__item">
-          <h3>Regulamin darowizn</h3>
-          <div>
-            <div class="l-article__overlay" data-max-height="91">
-              {% chunk 'donation-regulamin' %}
-            </div>
-            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
-          </div>
-        </div>
-      </div>
-    </div>
-  </main>
-
-
-
-{% endblock %}
diff --git a/src/club/templates/club/donation_step1.html b/src/club/templates/club/donation_step1.html
new file mode 100644 (file)
index 0000000..1a5b65d
--- /dev/null
@@ -0,0 +1,8 @@
+{% extends 'club/donation_step_base.html' %}
+{% load club %}
+{% load static %}
+
+
+{% block donation-step-content %}
+  {% include "club/donation_step1_form.html" %}
+{% endblock %}
diff --git a/src/club/templates/club/donation_step1_form.html b/src/club/templates/club/donation_step1_form.html
new file mode 100644 (file)
index 0000000..6a45f2c
--- /dev/null
@@ -0,0 +1,144 @@
+{% load static %}
+
+<form method="post" action="{% url 'club_join' %}">
+  {% csrf_token %}
+  {{ form.errors }}
+  <input type="radio" name="switch" id="switch-once" value="single" class="toggle-input" {% if schedule and not schedule.monthly %}checked{% endif %}>
+  <input type="radio" name="switch" id="switch-monthly" value="monthly" class="toggle-input" {% if not schedule or schedule.monthly %}checked{% endif %}>
+  <div class="l-switch__wrapper">
+    {% if user.is_staff %}
+      <span data-edit="club/club/{{ club.pk }}"></span>
+    {% endif %}
+
+    <div class="l-switch white">
+      <label class='toggle-for' for="switch-once">Jednorazowo</label>
+      <label class='toggle-for' for="switch-monthly">Miesięcznie</label>
+      <span class="toggle"></span>
+    </div>
+  </div>
+
+  {% with amounts=club.get_amounts %}
+    <div class="l-checkout__payments payments-once wide-spot-{{ amounts.single_wide_spot }}">
+      {% for amount in amounts.single %}
+        <div class="l-checkout__payments__box once{% if not schedule.monthly and schedule.amount == amount.amount or not schedule and club.default_single_amount == amount.amount %} is-active{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% endif %} l-checkout__payments__box--{{ amount.box_variant }}">
+
+          <h3>{{ amount.amount }} zł</h3>
+          <div class="l-checkout__payments__box__btn-wrp">
+            {% if amount.description %}
+              <p>{{ amount.description|safe }}</p>
+            {% endif %}
+            <button name="single_amount" value="{{ amount.amount }}">Wybierz</button>
+          </div>
+        </div>
+      {% endfor %}
+      <input type="hidden"
+             name="single_amount_selected"
+             value="{% if schedule and not schedule.monthly %}{{ schedule.amount|floatformat }}{% else %}{{ club.default_single_amount }}{% endif %}">
+
+    </div>
+
+
+    <div class="l-checkout__payments payments-recurring wide-spot-{{ amounts.monthly_wide_spot }}">
+    {% for amount in amounts.monthly %}
+      <div class="l-checkout__payments__box{% if schedule.monthly and schedule.amount == amount.amount or not schedule and amount.amount == club.default_monthly_amount %} is-active{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% endif %} l-checkout__payments__box--{{ amount.box_variant }}">
+        <h3>{{ amount.amount }} zł <span>/mies.</span></h3>
+        <div class="l-checkout__payments__box__btn-wrp">
+          {% if amount.description %}
+            <p>{{ amount.description|safe }}</p>
+          {% endif %}
+          <button name="monthly_amount" value="{{ amount.amount }}">Wybierz</button>
+        </div>
+      </div>
+    {% endfor %}
+    <input type="hidden"
+           name="monthly_amount_selected"
+           value="{% if schedule and schedule.monthly %}{{ schedule.amount|floatformat }}{% else %}{{ club.default_monthly_amount }}{% endif %}">
+  </div>
+
+  <div class="l-checkout__amount">
+    <div class="l-checkout__input">
+      <label for="kwota">Inna kwota</label>
+      <!-- input type="text" id="kwota" name="custom_amount" value="" -->
+      {{ form.custom_amount }}
+    </div>
+    <button>Dalej</button>
+  </div>
+  {% endwith %}
+</form>
+
+<div class="l-checkout__secure">
+  <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
+  Bezpieczne płatności zapewniają:
+  <img src="{% static '2022/images/payments-payu.png' %}" class="l-checkout__secure__img" alt="PayU Visa MasterCard">
+  {% if club.paypal_enabled %}
+    <img src="{% static '2022/images/payments-paypal.png' %}" class="l-checkout__secure__img" alt="PayPal">
+  {% endif %}
+</div>
+
+<div class="l-checkout__cols bt-w">
+  <div class="l-checkout__col full">
+    <div class="l-checkout__form">
+      <div class="l-checkout__form__row full">
+        <h3>Dane do przelewu tradycyjnego:</h3>
+        <div class="l-checkout__info">
+          <div class="l-checkout__info__item">
+            <div>nazwa odbiorcy</div>
+            <h3>Fundacja Wolne Lektury</h3>
+            <button title="Kopiuj tekst" class="js-copy">
+              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+            </button>
+            <input type="text" value="Fundacja Wolne Lektury">
+          </div>
+          <div class="l-checkout__info__item">
+            <div>adres odbiorcy</div>
+            <h3>ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa</h3>
+            <button title="Kopiuj tekst" class="js-copy">
+              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+            </button>
+            <input type="text" value="ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa">
+          </div>
+          <div class="l-checkout__info__item">
+            <div>numer konta</div>
+            <h3>75 1090 2851 0000 0001 4324 3317</h3>
+            <button title="Kopiuj tekst" class="js-copy">
+              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+            </button>
+            <input type="text" value="75 1090 2851 0000 0001 4324 3317">
+          </div>
+          <div class="l-checkout__info__item">
+            <div>tytuł przelewu</div>
+            <h3>Darowizna na Wolne Lektury + twoja nazwa użytkownika lub e-mail</h3>
+            <button title="Kopiuj tekst" class="js-copy">
+              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+            </button>
+            <input type="text" value="Darowizna na Wolne Lektury + twoja nazwa użytkownika lub e-mail">
+          </div>
+          <div class="l-checkout__info__item">
+            <div>wpłaty w EUR</div>
+            <h3>PL88 1090 2851 0000 0001 4324 3374</h3>
+            <button title="Kopiuj tekst" class="js-copy">
+              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+            </button>
+            <input type="text" value="PL88 1090 2851 0000 0001 4324 3374">
+          </div>
+          <div class="l-checkout__info__item">
+            <div>Wpłaty w USD</div>
+            <h3>PL82 1090 2851 0000 0001 4324 3385</h3>
+            <button title="Kopiuj tekst" class="js-copy">
+              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+            </button>
+            <input type="text" value="PL88 1090 2851 0000 0001 4324 3374">
+          </div>
+          <div class="l-checkout__info__item">
+            <div>SWIFT</div>
+            <h3>WBKPPLPP</h3>
+            <button title="Kopiuj tekst" class="js-copy">
+              <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+            </button>
+            <input type="text" value="WBKPPLPP">
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
diff --git a/src/club/templates/club/donation_step2.html b/src/club/templates/club/donation_step2.html
new file mode 100644 (file)
index 0000000..8f3ce67
--- /dev/null
@@ -0,0 +1,117 @@
+{% extends 'club/donation_step_base.html' %}
+
+{% load static %}
+
+
+{% block donation-jumbo-image %}{% static '2022/images/checkout-img-2.jpg' %}{% endblock %}
+
+
+{% block donation-step-content %}
+
+  <div class="l-checkout__cols">
+    <div class="l-checkout__col">
+      <div class="l-checkout__payments__box is-active">
+        <h3>
+          {{ schedule.amount|floatformat }} zł
+          {% if schedule.monthly %}
+            <span>/mies.</span>
+          {% endif %}
+        </h3>
+        <img src="{% static '2022/images/checkout-img-3.jpg' %}" alt="">
+        <p>{{ schedule.get_description }}</p>
+      </div>
+    </div>
+    <div class="l-checkout__col">
+
+      <form method='post'>
+        {% csrf_token %}
+        {{ form.errors }}
+        {{ form.amount }}
+        {{ form.monthly }}
+        <div class="l-checkout__form">
+          <div class="l-checkout__form__row">
+            <div class="l-checkout__input">
+              <label for="imie"><span>*</span> Imię</label>
+              {{ form.first_name }}
+              {{ form.first_name.errors }}
+            </div>
+            <div class="l-checkout__input">
+              <label for="nazwisko"><span>*</span> Nazwisko</label>
+              {{ form.last_name }}
+              {{ form.last_name.errors }}
+            </div>
+          </div>
+          <div class="l-checkout__form__row">
+            <div class="l-checkout__input">
+              <label for="email"><span>*</span> E-mail</label>
+              {{ form.email }}
+              {{ form.email.errors }}
+            </div>
+            <div class="l-checkout__input">
+              <label for="telefon"><span>*</span> Telefon</label>
+              {{ form.phone }}
+              {{ form.phone.errors }}
+            </div>
+          </div>
+          <div class="l-checkout__form__row full">
+            <div class="l-checkout__input">
+              <label for="adres-pocztowy">Adres pocztowy</label>
+              {{ form.postal }}
+              {{ form.postal.errors }}
+            </div>
+          </div>
+          <div class="l-checkout__form__row">
+            <div class="l-checkout__input">
+              <label for="kod-pocztowy">Kod pocztowy</label>
+              {{ form.postal_code }}
+              {{ form.postal_code.errors }}
+            </div>
+            <div class="l-checkout__input">
+              <label for="miejscowosc">Miejscowość</label>
+              {{ form.postal_town }}
+              {{ form.postal_town.errors }}
+            </div>
+          </div>
+          <div class="l-checkout__form__row full">
+            <div class="l-checkout__input">
+              <label for="kod-pocztowy">Kraj</label>
+              {{ form.postal_country }}
+              {{ form.postal_country.errors }}
+            </div>
+          </div>
+          <div class="l-checkout__form__row full">
+            {% for consent, key, field in form.consent %}
+              {{ field.errors }}
+              <div class="c-checkbox">
+                {{ field }}
+                <label for="id_{{ key }}">
+                  <p>{% if field.field.required %}<span>*</span> {% endif %}{{ field.label }}</p>
+                </label>
+              </div>
+            {% endfor %}
+            <div class="c-checkbox">
+              {{ form.agree_newsletter }}
+              <label for="id_agree_newsletter">
+                <p>Zapisuję się na newsletter.</p>
+              </label>
+            </div>
+          </div>
+          <div class="l-checkout__form__row confirm">
+            <a href="{% url 'donation_step1' schedule.key %}">Powrót</a>
+            <div class="l-checkout__input">
+              <button>Dalej</button>
+            </div>
+          </div>
+        </div>
+      </form>
+    </div>
+  </div>
+  <div class="l-checkout__secure">
+    <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
+    Bezpieczne płatności zapewniają:
+    <img src="{% static '2022/images/payments-payu.png' %}" class="l-checkout__secure__img" alt="PayU Visa MasterCard">
+    {% if club.paypal_enabled %}
+      <img src="{% static '2022/images/payments-paypal.png' %}" class="l-checkout__secure__img" alt="PayPal">
+    {% endif %}
+  </div>
+{% endblock %}
diff --git a/src/club/templates/club/donation_step3.html b/src/club/templates/club/donation_step3.html
new file mode 100644 (file)
index 0000000..dd64ce7
--- /dev/null
@@ -0,0 +1,107 @@
+{% extends 'club/donation_step_base.html' %}
+
+{% load static %}
+{% load club %}
+
+
+{% block donation-jumbo-image %}{% static '2022/images/checkout-img-4.jpg' %}{% endblock %}
+
+
+{% block donation-step-content %}
+  <div class="l-checkout__cols">
+    <div class="l-checkout__col">
+      <div class="l-checkout__payments__box is-active">
+        <h3>
+          {{ schedule.amount|floatformat }} zł
+          {% if schedule.monthly %}
+            <span>/mies.</span>
+          {% endif %}</h3>
+          <img src="{% static '2022/images/checkout-img-3.jpg' %}" alt="">
+      </div>
+    </div>
+    <div class="l-checkout__col">
+      <div class="l-checkout__form">
+        <div class="l-checkout__form__row full">
+          <!-- h3>Wybierz bezpieczną płatność:</h3-->
+          <div class="iframe">
+            {% for method in schedule.get_payment_methods %}
+              {% invite_payment method schedule %}
+            {% endfor %}
+          </div>
+        </div>
+        <div class="l-checkout__form__row full">
+          <h3>Możesz też ustawić stały przelew na konto:</h3>
+          <div class="l-checkout__info">
+            <div class="l-checkout__info__item">
+              <div>nazwa odbiorcy</div>
+              <h3>Fundacja Wolne Lektury</h3>
+              <button title="Kopiuj tekst" class="js-copy">
+                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+              </button>
+              <input type="text" value="Fundacja Wolne Lektury">
+            </div>
+            <div class="l-checkout__info__item">
+              <div>adres odbiorcy</div>
+              <h3>ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa</h3>
+              <button title="Kopiuj tekst" class="js-copy">
+                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+              </button>
+              <input type="text" value="ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa">
+            </div>
+            <div class="l-checkout__info__item">
+              <div>numer konta</div>
+              <h3>75 1090 2851 0000 0001 4324 3317</h3>
+              <button title="Kopiuj tekst" class="js-copy">
+                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+              </button>
+              <input type="text" value="75 1090 2851 0000 0001 4324 3317">
+            </div>
+            <div class="l-checkout__info__item">
+              <div>tytuł przelewu</div>
+              <h3>Darowizna na Wolne Lektury + twoja nazwa użytkownika lub e-mail</h3>
+              <button title="Kopiuj tekst" class="js-copy">
+                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+              </button>
+              <input type="text" value="Darowizna na Wolne Lektury + twoja nazwa użytkownika lub e-mail">
+            </div>
+            <div class="l-checkout__info__item">
+              <div>wpłaty w EUR</div>
+              <h3>PL88 1090 2851 0000 0001 4324 3374</h3>
+              <button title="Kopiuj tekst" class="js-copy">
+                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+              </button>
+              <input type="text" value="PL88 1090 2851 0000 0001 4324 3374">
+            </div>
+            <div class="l-checkout__info__item">
+              <div>Wpłaty w USD</div>
+              <h3>PL82 1090 2851 0000 0001 4324 3385</h3>
+              <button title="Kopiuj tekst" class="js-copy">
+                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+              </button>
+              <input type="text" value="PL88 1090 2851 0000 0001 4324 3374">
+            </div>
+            <div class="l-checkout__info__item">
+              <div>SWIFT</div>
+              <h3>WBKPPLPP</h3>
+              <button title="Kopiuj tekst" class="js-copy">
+                <img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
+              </button>
+              <input type="text" value="WBKPPLPP">
+            </div>
+          </div>
+        </div>
+        <div class="l-checkout__form__row confirm">
+          <a href="{% url 'donation_step2' schedule.key %}">Powrót</a>
+        </div>
+      </div>
+    </div>
+  </div>
+  <div class="l-checkout__secure">
+    <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
+    Bezpieczne płatności zapewniają:
+    <img src="{% static '2022/images/payments-payu.png' %}" class="l-checkout__secure__img" alt="PayU Visa MasterCard">
+    {% if club.paypal_enabled %}
+      <img src="{% static '2022/images/payments-paypal.png' %}" class="l-checkout__secure__img" alt="PayPal">
+    {% endif %}
+  </div>
+{% endblock %}
diff --git a/src/club/templates/club/donation_step4.html b/src/club/templates/club/donation_step4.html
new file mode 100644 (file)
index 0000000..28e11cb
--- /dev/null
@@ -0,0 +1,15 @@
+{% extends 'club/donation_step_base.html' %}
+
+
+{% block donation-step-content %}
+  <div class="l-checkout__completed">
+    <div class="l-checkout__completed__wrapper">
+      <h1>Dziękujemy za wpłatę!</h1>
+      <p>
+        Zajrzyj teraz do e-maila. Tam znajdziesz link,
+        który powiąże płatność z Twoim kontem użytkownika Wolnych Lektur.
+      </p>
+      <a href="/">Wracam do lektur</a>
+    </div>
+  </div>
+{% endblock %}
diff --git a/src/club/templates/club/donation_step_base.html b/src/club/templates/club/donation_step_base.html
new file mode 100644 (file)
index 0000000..62666b1
--- /dev/null
@@ -0,0 +1,126 @@
+{% extends 'base.html' %}
+{% load chunks %}
+{% load club %}
+{% load static %}
+
+
+{% block global-content %}
+  <div class="l-container">
+    <div class="l-breadcrumb">
+      <a href="/"><span>Strona główna</span></a>
+      <span>Wesprzyj nas</span>
+    </div>
+  </div>
+
+
+  <main class="l-main">
+    <div class="l-checkout__support">
+      <div class="l-checkout__support__bar">
+        <span data-label="Jest nas {% club_count_recurring %}" style="width: calc({% club_count_recurring %}% / 5);"></span>
+      </div>
+      <div class="l-checkout__support__footer">
+        <p>Dołącz do naszych stałych <strong>darczyńców</strong>!</p>
+        <p>Potrzebujemy <strong>500</strong> regularnych darczyńców, by Wolne Lektury mogły działać!</p>
+      </div>
+    </div>
+
+    <div class="l-checkout__box">
+      <div class="l-checkout__box__header">
+        <img src="{% block donation-jumbo-image %}{% static '2022/images/checkout-img-1.jpg' %}{% endblock %}" alt="Wspieraj Wolne Lektury">
+        <div class="l-checkout__box__header__content">
+          <h1>Wspieraj Wolne Lektury</h1>
+          <p>Dziękujemy, że chcesz razem z nami uwalniać książki!</p>
+          <p>Wspieraj Wolne Lektury stałą wpłatą – nawet niewielka ma wielką moc! Możesz też wesprzeć Wolne Lektury jednorazowo.</p>
+        </div>
+      </div>
+      <div class="l-checkout__steps">
+
+        {% if view.step > 1 and view.step != 4 %}
+          <a href="{% url 'donation_step1' schedule.key %}">
+        {% endif %}
+        <div class="{% if view.step == 1 %}is-current{% else %}is-completed{% endif %}">
+          <span>1</span>
+          <p>Rodzaj wsparcia</p>
+        </div>
+        {% if view.step > 1 and view.step != 4 %}
+          </a>
+        {% endif %}
+
+        {% if view.step != 2 and schedule and view.step != 4 %}
+          <a href="{% url 'donation_step2' schedule.key %}">
+        {% endif %}
+        <div class="{% if view.step == 2 %}is-current{% elif not schedule %}is-inactive{% else %}is-completed{% endif %}">
+          <span>2</span>
+          <p>Dane</p>
+        </div>
+        {% if view.step != 2 and schedule and view.step != 4 %}
+          </a>
+        {% endif %}
+
+        {% if view.step != 3 and schedule.email and view.step != 4 %}
+          <a href="{{ schedule.get_absolute_url }}">
+        {% endif %}
+        <div class="{% if view.step == 3 %}is-current{% elif not schedule or not schedule.method %}is-inactive{% else %}is-completed{% endif %}">
+          <span>3</span>
+          <p>Forma płatności</p>
+        </div>
+        {% if view.step != 3 and schedule.email and view.step != 4 %}
+          </a>
+        {% endif %}
+
+        <div class="{% if view.step == 4 %}is-completed{% else %}is-inactive{% endif %}">
+          <span>4</span>
+          <p>Gotowe</p>
+        </div>
+      </div>
+
+
+      {% block donation-step-content %}{% endblock %}
+
+    </div>
+
+    <div class="l-checkout__footer">
+      <div class="l-checkout__footer__content">
+        <div class="l-checkout__footer__content__item">
+          <h3>Transparentność jest dla nas bardzo ważna.</h3>
+          <div>
+            <div class="l-article__overlay" data-max-height="91">
+              {% chunk 'donation-transparency' %}
+            </div>
+            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
+          </div>
+        </div>
+        <div class="l-checkout__footer__content__item">
+          <h3>Informacja o przetwarzaniu danych osobowych</h3>
+          <div>
+            <div class="l-article__overlay" data-max-height="91">
+              {% chunk 'donation-data-processing' %}
+            </div>
+            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
+          </div>
+        </div>
+        <div class="l-checkout__footer__content__item">
+          <h3>FAQ</h3>
+          <div>
+            <div class="l-article__overlay" data-max-height="91">
+              {% chunk 'donation-faq' %}
+            </div>
+            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
+          </div>
+        </div>
+        <div class="l-checkout__footer__content__item">
+          <h3>Regulamin darowizn</h3>
+          <div>
+            <div class="l-article__overlay" data-max-height="91">
+              {% chunk 'donation-regulamin' %}
+            </div>
+            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
+          </div>
+        </div>
+      </div>
+    </div>
+  </main>
+
+
+
+{% endblock %}
index 7c6a207..e07cdb4 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 {% load active_schedule from club %}
 {% load chunks %}
index c86f111..7547598 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 
index 4345321..3fbda03 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load chunks i18n %}
 
 
index 3b7b184..e5d391f 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 
index 85faa85..068c5c6 100644 (file)
@@ -34,7 +34,7 @@ class DonationStep1(UpdateView):
     queryset = models.Schedule.objects.filter(payed_at=None)
     form_class = forms.DonationStep1Form
     slug_field = slug_url_kwarg = 'key'
-    template_name = 'club/2022/donation_step1.html'
+    template_name = 'club/donation_step1.html'
     step = 1
 
     def get_context_data(self, **kwargs):
@@ -50,7 +50,7 @@ class DonationStep2(UpdateView):
     queryset = models.Schedule.objects.filter(payed_at=None)
     form_class = forms.DonationStep2Form
     slug_field = slug_url_kwarg = 'key'
-    template_name = 'club/2022/donation_step2.html'
+    template_name = 'club/donation_step2.html'
     step = 2
 
     def get_context_data(self, **kwargs):
@@ -61,7 +61,7 @@ class DonationStep2(UpdateView):
 
 class JoinView(CreateView):
     form_class = forms.DonationStep1Form
-    template_name = 'club/2022/donation_step1.html'
+    template_name = 'club/donation_step1.html'
 
     @property
     def club(self):
@@ -122,7 +122,7 @@ class ScheduleView(DetailView):
     
     def get_template_names(self):
         if not self.object.payed_at:
-            return 'club/2022/donation_step3.html'
+            return 'club/donation_step3.html'
         return 'club/schedule.html'
         
     def get_context_data(self, *args, **kwargs):
@@ -185,7 +185,7 @@ class PayUNotifyView(payu_views.NotifyView):
 
 class ScheduleThanksView(DetailView):
     model = models.Schedule
-    template_name = 'club/2022/donation_step4.html'
+    template_name = 'club/donation_step4.html'
     slug_field = slug_url_kwarg = 'key'
     step = 4
 
index 84c111e..54758b0 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n pagination_tags %}
 {% load set_get from set_get %}
 
index 762d13b..cb47690 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
 {% load static i18n %}
 
 {% block breadcrumbs %}
index 6f29fbc..f87a321 100644 (file)
@@ -62,7 +62,6 @@ class FundingAdmin(admin.ModelAdmin):
     list_display = ['created_at', 'completed_at', 'offer', 'amount', 'name', 'email', 'perk_names']
     search_fields = ['name', 'email', 'offer__title', 'offer__author']
     list_filter = [PayedFilter, 'offer', PerksFilter]
-    search_fields = ['user']
     actions = [export_as_csv_action(
         fields=[
             'id', 'offer', 'name', 'email', 'amount', 'completed_at',
index 089b875..3280d64 100644 (file)
@@ -70,10 +70,7 @@ class Offer(models.Model):
 
     def clear_cache(self):
         clear_cached_renders(self.top_bar)
-        clear_cached_renders(self.top_bar_2022)
-        clear_cached_renders(self.list_bar)
         clear_cached_renders(self.detail_bar)
-        clear_cached_renders(self.detail_bar_2022)
         clear_cached_renders(self.status)
         clear_cached_renders(self.status_more)
 
@@ -211,33 +208,6 @@ class Offer(models.Model):
             'show_title_calling': True,
         }
 
-    @cached_render('funding/includes/funding.html')
-    def top_bar(self):
-        ctx = self.basic_info()
-        ctx.update({
-            'link': True,
-            'closeable': True,
-            'add_class': 'funding-top-header',
-        })
-        return ctx
-
-    @cached_render('funding/includes/funding.html')
-    def list_bar(self):
-        ctx = self.basic_info()
-        ctx.update({
-            'link': True,
-            'show_title_calling': False,
-        })
-        return ctx
-
-    @cached_render('funding/includes/funding.html')
-    def detail_bar(self):
-        ctx = self.basic_info()
-        ctx.update({
-            'show_title': False,
-        })
-        return ctx
-
     @cached_render('funding/includes/offer_status.html')
     def status(self):
         return {'offer': self}
@@ -246,8 +216,8 @@ class Offer(models.Model):
     def status_more(self):
         return {'offer': self}
 
-    @cached_render('funding/2022/includes/funding.html')
-    def top_bar_2022(self):
+    @cached_render('funding/includes/funding.html')
+    def top_bar(self):
         ctx = self.basic_info()
         ctx.update({
             'link': True,
@@ -256,8 +226,8 @@ class Offer(models.Model):
         })
         return ctx
 
-    @cached_render('funding/2022/includes/funding.html')
-    def detail_bar_2022(self):
+    @cached_render('funding/includes/funding.html')
+    def detail_bar(self):
         ctx = self.basic_info()
         ctx.update({
             'show_title': False,
diff --git a/src/funding/templates/funding/2022/includes/funding.html b/src/funding/templates/funding/2022/includes/funding.html
deleted file mode 100644 (file)
index b2dc558..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-{% load i18n %}
-{% load time_tags %}
-
-{% if offer %}
-
-
-  <div class="l-checkout__support">
-    {% if link %}
-      <a href="{% url 'funding_current' offer.slug %}">
-        <span class="buttonlike">Wesprzyj!</span>
-        <div class="funding-bar-container">
-    {% endif %}
-    <div class="l-checkout__support__bar">
-      <span class="{% if percentage < 15 %}little-progress{% endif %}" data-label="{% if sum %}{% trans "collected" %}: {{ sum }} zł{% endif %}" style="width: {{ percentage|stringformat:'.2f' }}%;"></span>
-    </div>
-    <div class="l-checkout__support__footer">
-      {% if show_title %}
-        <p>
-          {% if show_title_calling %}
-            <strong style="margin-right: .6em;">{% trans "Help free the book!" %}</strong>
-          {% endif %}
-          {{ offer }}
-      {% endif %}
-      {% if is_current %}
-        <p>
-          {% trans "until fundraiser end" %}:
-          <strong class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></strong>
-        </p>
-      {% endif %}
-      {% if not is_win %}
-        <p>
-          {% trans "needed" %}: <strong>{{ offer.target }} zł</strong>
-        </p>
-      {% endif %}
-    </div>
-    {% if link %}
-        </div>
-      </a>
-    {% endif %}
-  </div>
-
-{% endif %}
diff --git a/src/funding/templates/funding/2022/includes/funding_box.html b/src/funding/templates/funding/2022/includes/funding_box.html
deleted file mode 100644 (file)
index c04234d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% load i18n %}
-{% load sorl_thumbnail %}
-
-<article class="l-books__item" data-pop="-{{ book.popularity.count }}">
-  <figure class="l-books__item__img" style="height:240px">
-    <a href="{{ funding.get_absolute_url }}">
-      {% if funding.cover %}
-        <img src="{{ funding.cover.url }}" alt="{{ funding.title }}">
-      {% endif %}
-    </a>
-  </figure>
-  <div class="l-books__item__actions">
-    <div class="l-checkout__support__bar">
-      {% with funding.basic_info as info %}
-        <span class="{% if info.percentage < 15 %}little-progress{% endif %}" style="width: {{ info.percentage|stringformat:'.2f' }}%;"></span>
-      {% endwith %}
-    </div>
-  </div>
-  <h3>
-      {{ funding.author }}
-  </h3>
-  <h2><a href="{{ funding.get_absolute_url }}">{{ funding.title }}</a></h2>
-</article>
diff --git a/src/funding/templates/funding/2022/offer_detail.html b/src/funding/templates/funding/2022/offer_detail.html
deleted file mode 100644 (file)
index 920f844..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-{% extends '2022/base.html' %}
-{% load i18n %}
-{% load chunks %}
-{% load thumbnail %}
-{% load fundings from funding_tags %}
-
-
-{% block settings %}
-  {% load title %}
-  {% title object %}
-{% endblock %}
-
-
-{% block breadcrumbs %}
-  <a href="{% url 'funding' %}"><span>Zbiórki</span></a>
-  <span>{{ object }}</span>
-{% endblock %}
-
-
-{% block main %}
-  {{ object.detail_bar_2022 }}
-
-  <div class="page-simple">
-    <h1>{{ object }}</h1>
-
-    <div class="l-checkout__cols" style="margin-top: 0">
-      <div class="l-checkout__col" >
-        <div class="l-checkout__payments__box is-active">
-          {% if object.cover %}
-            {% thumbnail object.cover '320x1000' as th %}
-            <img src="{{ th.url }}">
-            {% endthumbnail %}
-          {% endif %}
-        </div>
-      </div>
-      <div class="l-checkout__col funding-details">
-        <h2>{% trans "Help free the book!" %}</h2>
-        <div class="funding-description">
-          {{ object.description|safe }}
-        </div>
-        {% if object.is_current %}
-          <form method="post" style="margin: auto;">
-            {{ form.as_p }}
-            <span class="helptext">
-              {{ form.data_processing }}
-            </span>
-            <button type="submit" class="button-orange">Wesprzyj!</button>
-          </form>
-        {% else %}
-          {{ object.status }}
-          {{ object.status_more }}
-        {% endif %}
-      </div>
-    </div>
-
-  </div>
-
-
-  <div class="l-checkout__footer">
-    <div class="l-checkout__footer__content">
-
-      {% if object.is_current %}
-        <div class="l-checkout__footer__content__item">
-          <h3>Zasady</h3>
-          <div>
-            <div class="l-article__overlay" data-max-height="91">
-              {{ object.status }}
-              {{ object.status_more }}
-              {% chunk 'funding_rules'  %}
-            </div>
-            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
-          </div>
-        </div>
-
-        <div class="l-checkout__footer__content__item">
-          <h3>Wpłaty bezpośrednie</h3>
-          <div>
-            <div class="l-article__overlay" data-max-height="91">
-              <p>
-                {% chunk 'funding_form_bottom' %}
-              </p>
-            </div>
-            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
-          </div>
-        </div>
-
-        <div class="l-checkout__footer__content__item">
-          <h3>Informacja o przetwarzaniu danych osobowych</h3>
-          <div>
-            <div class="l-article__overlay" data-max-height="91">
-              {% chunk 'donation-data-processing' %}
-            </div>
-            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
-          </div>
-        </div>
-      {% endif %}
-    </div>
-  </div>
-
-  <article class="page-simple">
-    <h1>{% trans "Supporters" %}</h1>
-    {% fundings object %}
-  </article>
-
-  {# 1% #}
-  {# share? #}
-
-{% endblock %}
diff --git a/src/funding/templates/funding/2022/offer_list.html b/src/funding/templates/funding/2022/offer_list.html
deleted file mode 100644 (file)
index 449cfea..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{% extends '2022/base.html' %}
-
-
-{% block settings %}
-  {% load title %}
-  {% title 'Zbiórki' %}
-{% endblock %}
-
-
-{% block main %}
-  <div class="l-section">
-    <div class="l-books__header">
-      <div class="l-books__input">
-        <i class="icon icon-filter"></i>
-        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list">
-      </div>
-    </div>
-  </div>
-
-
-  <div class="l-section l-section--col">
-    <div class="l-books__grid" id="book-list">
-      {% for funding in object_list %}
-        {% include "funding/2022/includes/funding_box.html" %}
-      {% endfor %}
-    </div>
-  </div>
-
-{% endblock %}
index ce2b330..1ed6a9b 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 {% load fnp_share %}
 
index 3d24b7d..b2dc558 100644 (file)
@@ -1,69 +1,42 @@
-{% spaceless %}
-  {% load i18n %}
-  {% load time_tags %}
+{% load i18n %}
+{% load time_tags %}
 
-  {% if offer %}
-    <div {% if closeable %}id="funding-closeable" {% endif %}class="funding {{ add_class }}"
-         data-offer-id="{{offer.id}}" style="">
-      {% if closeable %}<a href="#" class="close">X</a>{% endif %}
-      {% if link and is_current %}
-        <div class="call-area">
-          <a class="call honking" href="{% url 'funding_current' offer.slug %}">
-            {% trans "Support!" %}
-          </a>
-          <div class="learn-more">
-            <a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>
-          </div>
-        </div>
+{% if offer %}
+
+
+  <div class="l-checkout__support">
+    {% if link %}
+      <a href="{% url 'funding_current' offer.slug %}">
+        <span class="buttonlike">Wesprzyj!</span>
+        <div class="funding-bar-container">
+    {% endif %}
+    <div class="l-checkout__support__bar">
+      <span class="{% if percentage < 15 %}little-progress{% endif %}" data-label="{% if sum %}{% trans "collected" %}: {{ sum }} zł{% endif %}" style="width: {{ percentage|stringformat:'.2f' }}%;"></span>
+    </div>
+    <div class="l-checkout__support__footer">
+      {% if show_title %}
+        <p>
+          {% if show_title_calling %}
+            <strong style="margin-right: .6em;">{% trans "Help free the book!" %}</strong>
+          {% endif %}
+          {{ offer }}
       {% endif %}
-      <div class="description {% if link and is_current %}with-button{% endif %}">
-      {% if link %}
-        <a href="{% if is_current %}{% url 'funding_current' offer.slug %}{% else %}{{ offer.get_absolute_url }}{% endif %}">
+      {% if is_current %}
+        <p>
+          {% trans "until fundraiser end" %}:
+          <strong class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></strong>
+        </p>
       {% endif %}
-      {% if show_title %}
-        {% if is_current and show_title_calling %}<strong style="margin-right: .6em;">{% trans "Help free the book!" %}</strong>{% endif %}
-        <span class="funding-title{% if not is_current %}-strong{% endif %}">{{ offer }}</span>
+      {% if not is_win %}
+        <p>
+          {% trans "needed" %}: <strong>{{ offer.target }} zł</strong>
+        </p>
       {% endif %}
-
-      <div class="progress" style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;">
-        {% if sum %}
-          <span class="piece progress-collected">{% trans "collected" %}: {{ sum }} zł</span>
-        {% endif %}
-        {% if not is_win %}
-          <span class="piece progress-target"><span class="{% if sum %}progress-extralabel{% endif %}">{% trans "needed" %}: </span>{{ offer.target }} zł</span>
-        {% endif %}
-        {% if is_current %}
-          <span class="piece progress-until"><span class="progress-extralabel">{% trans "until fundraiser end" %}:</span>
-          <span class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></span>
-          </span>
-        {% else %}
-            <div style="clear: both"></div>
-        {% endif %}
-      </div>
-      {% if link %}</a>{% endif %}
-      </div>
-      <div style="clear: both"></div>
     </div>
-    {% if closeable %}
-      <div id="funding-handle">{% trans "Help free the book!" %}</div>
-      <script type="text/javascript">
-        (function() {
-            var storage = true;
-            try {
-                localStorage.setItem('test', 'test');
-                localStorage.removeItem('test');
-            } catch (exception) {
-                storage = false;
-            }
-            if (storage) {
-                var closeable = document.getElementById('funding-closeable');
-                if (localStorage['hide-offer-id'] !== closeable.getAttribute('data-offer-id')) {
-                    closeable.style.display = 'block';
-                    document.getElementById('funding-handle').style.display = 'none';
-                }
-            }
-        })();
-      </script>
+    {% if link %}
+        </div>
+      </a>
     {% endif %}
-  {% endif %}
-{% endspaceless %}
+  </div>
+
+{% endif %}
diff --git a/src/funding/templates/funding/includes/funding_box.html b/src/funding/templates/funding/includes/funding_box.html
new file mode 100644 (file)
index 0000000..c04234d
--- /dev/null
@@ -0,0 +1,23 @@
+{% load i18n %}
+{% load sorl_thumbnail %}
+
+<article class="l-books__item" data-pop="-{{ book.popularity.count }}">
+  <figure class="l-books__item__img" style="height:240px">
+    <a href="{{ funding.get_absolute_url }}">
+      {% if funding.cover %}
+        <img src="{{ funding.cover.url }}" alt="{{ funding.title }}">
+      {% endif %}
+    </a>
+  </figure>
+  <div class="l-books__item__actions">
+    <div class="l-checkout__support__bar">
+      {% with funding.basic_info as info %}
+        <span class="{% if info.percentage < 15 %}little-progress{% endif %}" style="width: {{ info.percentage|stringformat:'.2f' }}%;"></span>
+      {% endwith %}
+    </div>
+  </div>
+  <h3>
+      {{ funding.author }}
+  </h3>
+  <h2><a href="{{ funding.get_absolute_url }}">{{ funding.title }}</a></h2>
+</article>
index a8f2af1..c09be85 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 {% load fnp_share %}
 
diff --git a/src/funding/templates/funding/offer_detail.html b/src/funding/templates/funding/offer_detail.html
new file mode 100644 (file)
index 0000000..268817f
--- /dev/null
@@ -0,0 +1,108 @@
+{% extends 'base.html' %}
+{% load i18n %}
+{% load chunks %}
+{% load thumbnail %}
+{% load fundings from funding_tags %}
+
+
+{% block settings %}
+  {% load title %}
+  {% title object %}
+{% endblock %}
+
+
+{% block breadcrumbs %}
+  <a href="{% url 'funding' %}"><span>Zbiórki</span></a>
+  <span>{{ object }}</span>
+{% endblock %}
+
+
+{% block main %}
+  {{ object.detail_bar }}
+
+  <div class="page-simple">
+    <h1>{{ object }}</h1>
+
+    <div class="l-checkout__cols" style="margin-top: 0">
+      <div class="l-checkout__col" >
+        <div class="l-checkout__payments__box is-active">
+          {% if object.cover %}
+            {% thumbnail object.cover '320x1000' as th %}
+            <img src="{{ th.url }}">
+            {% endthumbnail %}
+          {% endif %}
+        </div>
+      </div>
+      <div class="l-checkout__col funding-details">
+        <h2>{% trans "Help free the book!" %}</h2>
+        <div class="funding-description">
+          {{ object.description|safe }}
+        </div>
+        {% if object.is_current %}
+          <form method="post" style="margin: auto;">
+            {{ form.as_p }}
+            <span class="helptext">
+              {{ form.data_processing }}
+            </span>
+            <button type="submit" class="button-orange">Wesprzyj!</button>
+          </form>
+        {% else %}
+          {{ object.status }}
+          {{ object.status_more }}
+        {% endif %}
+      </div>
+    </div>
+
+  </div>
+
+
+  <div class="l-checkout__footer">
+    <div class="l-checkout__footer__content">
+
+      {% if object.is_current %}
+        <div class="l-checkout__footer__content__item">
+          <h3>Zasady</h3>
+          <div>
+            <div class="l-article__overlay" data-max-height="91">
+              {{ object.status }}
+              {{ object.status_more }}
+              {% chunk 'funding_rules'  %}
+            </div>
+            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
+          </div>
+        </div>
+
+        <div class="l-checkout__footer__content__item">
+          <h3>Wpłaty bezpośrednie</h3>
+          <div>
+            <div class="l-article__overlay" data-max-height="91">
+              <p>
+                {% chunk 'funding_form_bottom' %}
+              </p>
+            </div>
+            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
+          </div>
+        </div>
+
+        <div class="l-checkout__footer__content__item">
+          <h3>Informacja o przetwarzaniu danych osobowych</h3>
+          <div>
+            <div class="l-article__overlay" data-max-height="91">
+              {% chunk 'donation-data-processing' %}
+            </div>
+            <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Więcej" data-action="Mniej">Więcej</button>
+          </div>
+        </div>
+      {% endif %}
+    </div>
+  </div>
+
+  <article class="page-simple">
+    <h1>{% trans "Supporters" %}</h1>
+    {% fundings object %}
+  </article>
+
+  {# 1% #}
+  {# share? #}
+
+{% endblock %}
diff --git a/src/funding/templates/funding/offer_list.html b/src/funding/templates/funding/offer_list.html
new file mode 100644 (file)
index 0000000..3076b68
--- /dev/null
@@ -0,0 +1,29 @@
+{% extends 'base.html' %}
+
+
+{% block settings %}
+  {% load title %}
+  {% title 'Zbiórki' %}
+{% endblock %}
+
+
+{% block main %}
+  <div class="l-section">
+    <div class="l-books__header">
+      <div class="l-books__input">
+        <i class="icon icon-filter"></i>
+        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list">
+      </div>
+    </div>
+  </div>
+
+
+  <div class="l-section l-section--col">
+    <div class="l-books__grid" id="book-list">
+      {% for funding in object_list %}
+        {% include "funding/includes/funding_box.html" %}
+      {% endfor %}
+    </div>
+  </div>
+
+{% endblock %}
index 3d018b2..24333fb 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 {% load fnp_share %}
 {% load polls_tags %}
index 9b4e82e..0054956 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Remaining funds" %}{% endblock %}
index 3e48892..bfd0e54 100644 (file)
@@ -16,11 +16,6 @@ def funding_top_bar():
     offer = Offer.current()
     return offer.top_bar() if offer is not None else ''
 
-@register.simple_tag
-def funding_top_bar_2022():
-    offer = Offer.current()
-    return offer.top_bar_2022() if offer is not None else ''
-
 
 @register.simple_tag(takes_context=True)
 def fundings(context, offer):
index 35770ae..315c3da 100644 (file)
@@ -71,7 +71,7 @@ class WLFundView(TemplateView):
 
 class OfferDetailView(FormView):
     form_class = FundingForm
-    template_name = 'funding/2022/offer_detail.html'
+    template_name = 'funding/offer_detail.html'
 
     @csrf_exempt
     def dispatch(self, request, slug=None):
@@ -121,7 +121,7 @@ class CurrentView(OfferDetailView):
 
 class OfferListView(ListView):
     queryset = Offer.public()
-    template_name = 'funding/2022/offer_list.html'
+    template_name = 'funding/offer_list.html'
     
     def get_context_data(self, **kwargs):
         ctx = super(OfferListView, self).get_context_data(**kwargs)
index d2f5fb0..d9f0748 100644 (file)
@@ -8,6 +8,6 @@ from infopages.models import InfoPage
 
 
 class InfoPageAdmin(TranslationAdmin):
-    list_display = ('title', 'slug', 'main_page')
+    list_display = ('title', 'slug')
 
 admin.site.register(InfoPage, InfoPageAdmin)
diff --git a/src/infopages/migrations/0003_alter_infopage_options_remove_infopage_main_page.py b/src/infopages/migrations/0003_alter_infopage_options_remove_infopage_main_page.py
new file mode 100644 (file)
index 0000000..3f0aac1
--- /dev/null
@@ -0,0 +1,21 @@
+# Generated by Django 4.0.8 on 2023-08-25 08:51
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('infopages', '0002_auto_20151221_1225'),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name='infopage',
+            options={'verbose_name': 'info page', 'verbose_name_plural': 'info pages'},
+        ),
+        migrations.RemoveField(
+            model_name='infopage',
+            name='main_page',
+        ),
+    ]
index e6e4eb7..c8720ae 100644 (file)
@@ -9,14 +9,12 @@ from django.utils.translation import gettext_lazy as _
 class InfoPage(models.Model):
     """An InfoPage is used to display a two-column flatpage."""
 
-    main_page = models.IntegerField(_('main page priority'), null=True, blank=True)
     slug = models.SlugField(_('slug'), max_length=120, unique=True, db_index=True)
     title = models.CharField(_('title'), max_length=120, blank=True)
     left_column = models.TextField(_('left column'), blank=True)
     right_column = models.TextField(_('right column'), blank=True)
 
     class Meta:
-        ordering = ('main_page', 'slug',)
         verbose_name = _('info page')
         verbose_name_plural = _('info pages')
 
diff --git a/src/infopages/templates/infopages/2022/infopage.html b/src/infopages/templates/infopages/2022/infopage.html
deleted file mode 100644 (file)
index 465ad88..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{% extends '2022/base.html' %}
-
-{% block settings %}
-  {% load title %}
-  {% title page.title %}
-{% endblock %}
-
-
-{% block main %}
-    <div class="l-article__title">
-      <h1>{{ page.title }}</h1>
-    </div>
-    <article class="l-article">
-      <div class="l-article__cols">
-        <div class="left-column">
-          {{ left_column }}
-        </div>
-        <div class="right-column">
-          {{ right_column }}
-        </div>
-      </div>
-    </article>
-{% endblock %}
diff --git a/src/infopages/templates/infopages/infopage.html b/src/infopages/templates/infopages/infopage.html
new file mode 100644 (file)
index 0000000..5c6da35
--- /dev/null
@@ -0,0 +1,23 @@
+{% extends 'base.html' %}
+
+{% block settings %}
+  {% load title %}
+  {% title page.title %}
+{% endblock %}
+
+
+{% block main %}
+    <div class="l-article__title">
+      <h1>{{ page.title }}</h1>
+    </div>
+    <article class="l-article">
+      <div class="l-article__cols">
+        <div class="left-column">
+          {{ left_column }}
+        </div>
+        <div class="right-column">
+          {{ right_column }}
+        </div>
+      </div>
+    </article>
+{% endblock %}
diff --git a/src/infopages/templates/infopages/on_main.html b/src/infopages/templates/infopages/on_main.html
deleted file mode 100644 (file)
index 8ebbea0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{% for page in objects %}
-  <li><a href="{{ page.get_absolute_url }}">{{ page.title }}</a></li>
-{% endfor %}
diff --git a/src/infopages/templatetags/__init__.py b/src/infopages/templatetags/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/infopages/templatetags/infopages_tags.py b/src/infopages/templatetags/infopages_tags.py
deleted file mode 100644 (file)
index 3c3cfdf..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
-#
-from django import template
-from infopages.models import InfoPage
-
-register = template.Library()
-
-
-@register.inclusion_tag('infopages/on_main.html')
-def infopages_on_main():
-    objects = InfoPage.objects.exclude(main_page=None)
-    return {"objects": objects}
index 986d6a5..5bc7b4b 100644 (file)
@@ -23,7 +23,7 @@ def infopage(request, slug):
 
     return render(
         request,
-        'infopages/2022/infopage.html',
+        'infopages/infopage.html',
         {
             'page': page,
             'left_column': left_column,
index 242badb..fc4f2a0 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block settings %}
   {% load title %}
index 768b88c..dce5664 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block settings %}
   {% load title %}
index cd27b54..5ce3a46 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block settings %}
   {% load title %}
index b4c935d..43afd48 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block settings %}
   {% load title %}
diff --git a/src/lesmianator/templates/lesmianator/2022/lesmianator.html b/src/lesmianator/templates/lesmianator/2022/lesmianator.html
deleted file mode 100644 (file)
index c334792..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-{% extends "2022/base.html" %}
-{% load i18n %}
-{% load catalogue_tags %}
-
-
-{% block settings %}
-  {% load title %}
-  {% title "Leśmianator" %}
-{% endblock %}
-
-
-
-{% block main %}
-  <div class="l-article__title">
-    <h1>Leśmianator</h1>
-  </div>
-
-  <article class="l-article">
-    <div class="l-article__cols">
-      <div class="left-column">
-
-        <p>
-          Leśmianator tworzy wierszmiksy – dzięki niemu
-          <a href="{% url 'new_poem' %}">napiszesz wiersz jednym kliknięciem</a>.
-          W nowej odsłonie nowe możliwości zabawy – teraz możesz zdecydować, co wrzucasz do miksera,
-          a swoimi dziełami podzielić się z&nbsp;przyjaciółmi!
-        </p>
-        <p>
-          Przygotowaliśmy kilka propozycji na start – możesz wybrać jedną z nich,
-          albo ułożyć sobie własną, niepowtarzalną mieszankę.
-        </p>
-        <ul>
-          <li><a href="{% url 'poem_from_book' 'liryki-lozanskie' %}">Adam Mickiewicz, Liryki lozańskie</a></li>
-          <li><a href="{% url 'poem_from_book' 'sonety-krymskie' %}">Adam Mickiewicz, Sonety krymskie</a></li>
-          <li><a href="{% url 'poem_from_book' 'hymny' %}">Jan Kasprowicz, Hymny</a></li>
-          <li><a href="{% url 'poem_from_book' 'bogurodzica' %}">Bogurodzica</a></li>
-          {% for s in shelves %}
-            <li><a href="{% url 'poem_from_set' s.slug %}">{{ s.name }}</a></li>
-          {% endfor %}
-        </ul>
-
-      </div>
-      <div class="right-column">
-
-
-        <h3>Miksuj utwory</h3>
-        <p>
-          Możesz <a href="{% url 'new_poem' %}">zmiksować całą lirykę</a> w naszej bibliotece
-          albo tylko jeden konkretny utwór. Jak? Wejdź na
-          <a href="{% url 'book_detail' 'do-m' %}">stronę utworu</a>,
-          kliknij w link „miksuj ten utwór” – i gotowe!
-        </p>
-
-        <h3>Miksuj półki</h3>
-        <p>
-          Załóż konto, poukładaj swoje ulubione książki na półkach i miksuj
-          w dowolnych konfiguracjach. Nic prostszego, niż zmieszać
-          <a href="{% url 'tagged_object_list' 'autor/boleslaw-lesmian' %}">Leśmiana</a> z
-          <a href="{% url 'tagged_object_list' 'autor/kazimierz-przerwa-tetmajer' %}">Tetmajerem</a>,
-          a <a href="{% url 'tagged_object_list' 'autor/stefan-zeromski' %}">Żeromskiego</a> z
-          <a href="{% url 'tagged_object_list' 'autor/henryk-sienkiewicz' %}">Sienkiewiczem</a>
-          – wystarczy wrzucić ich utwory na półkę i klikną w link „miksuj utwory z tej półki”.
-        </p>
-
-        <h3>Dziel się z innymi</h3>
-        <p>
-          Wyszedł Ci wyjątkowo udany wierszmiks? Znajdziesz pod nim link, przy pomocy
-          którego możesz się nim podzielić z przyjaciółmi.
-        </p>
-
-        <p>Miłej zabawy!</p>
-
-      </div>
-    </div>
-  </article>
-{% endblock %}
diff --git a/src/lesmianator/templates/lesmianator/lesmianator.html b/src/lesmianator/templates/lesmianator/lesmianator.html
new file mode 100644 (file)
index 0000000..437911b
--- /dev/null
@@ -0,0 +1,76 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load catalogue_tags %}
+
+
+{% block settings %}
+  {% load title %}
+  {% title "Leśmianator" %}
+{% endblock %}
+
+
+
+{% block main %}
+  <div class="l-article__title">
+    <h1>Leśmianator</h1>
+  </div>
+
+  <article class="l-article">
+    <div class="l-article__cols">
+      <div class="left-column">
+
+        <p>
+          Leśmianator tworzy wierszmiksy – dzięki niemu
+          <a href="{% url 'new_poem' %}">napiszesz wiersz jednym kliknięciem</a>.
+          W nowej odsłonie nowe możliwości zabawy – teraz możesz zdecydować, co wrzucasz do miksera,
+          a swoimi dziełami podzielić się z&nbsp;przyjaciółmi!
+        </p>
+        <p>
+          Przygotowaliśmy kilka propozycji na start – możesz wybrać jedną z nich,
+          albo ułożyć sobie własną, niepowtarzalną mieszankę.
+        </p>
+        <ul>
+          <li><a href="{% url 'poem_from_book' 'liryki-lozanskie' %}">Adam Mickiewicz, Liryki lozańskie</a></li>
+          <li><a href="{% url 'poem_from_book' 'sonety-krymskie' %}">Adam Mickiewicz, Sonety krymskie</a></li>
+          <li><a href="{% url 'poem_from_book' 'hymny' %}">Jan Kasprowicz, Hymny</a></li>
+          <li><a href="{% url 'poem_from_book' 'bogurodzica' %}">Bogurodzica</a></li>
+          {% for s in shelves %}
+            <li><a href="{% url 'poem_from_set' s.slug %}">{{ s.name }}</a></li>
+          {% endfor %}
+        </ul>
+
+      </div>
+      <div class="right-column">
+
+
+        <h3>Miksuj utwory</h3>
+        <p>
+          Możesz <a href="{% url 'new_poem' %}">zmiksować całą lirykę</a> w naszej bibliotece
+          albo tylko jeden konkretny utwór. Jak? Wejdź na
+          <a href="{% url 'book_detail' 'do-m' %}">stronę utworu</a>,
+          kliknij w link „miksuj ten utwór” – i gotowe!
+        </p>
+
+        <h3>Miksuj półki</h3>
+        <p>
+          Załóż konto, poukładaj swoje ulubione książki na półkach i miksuj
+          w dowolnych konfiguracjach. Nic prostszego, niż zmieszać
+          <a href="{% url 'tagged_object_list' 'autor/boleslaw-lesmian' %}">Leśmiana</a> z
+          <a href="{% url 'tagged_object_list' 'autor/kazimierz-przerwa-tetmajer' %}">Tetmajerem</a>,
+          a <a href="{% url 'tagged_object_list' 'autor/stefan-zeromski' %}">Żeromskiego</a> z
+          <a href="{% url 'tagged_object_list' 'autor/henryk-sienkiewicz' %}">Sienkiewiczem</a>
+          – wystarczy wrzucić ich utwory na półkę i klikną w link „miksuj utwory z tej półki”.
+        </p>
+
+        <h3>Dziel się z innymi</h3>
+        <p>
+          Wyszedł Ci wyjątkowo udany wierszmiks? Znajdziesz pod nim link, przy pomocy
+          którego możesz się nim podzielić z przyjaciółmi.
+        </p>
+
+        <p>Miłej zabawy!</p>
+
+      </div>
+    </div>
+  </article>
+{% endblock %}
index b81f57f..e179c14 100644 (file)
@@ -16,7 +16,7 @@ def main_page(request):
 
     return render(
         request,
-        'lesmianator/2022/lesmianator.html',
+        'lesmianator/lesmianator.html',
         {"last": last, "shelves": shelves})
 
 @cache.never_cache
index 2f21031..92abeac 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
index 7b340be..2e1ca9b 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}\r
+{% extends "base_simple.html" %}\r
 {% load i18n %}\r
 \r
 {% block settings %}\r
index eb2f5d2..b887bdc 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}\r
+{% extends "base_simple.html" %}\r
 {% load i18n %}\r
 \r
 {% block settings %}\r
index ada00b3..b30ff22 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block body %}
 
index a32d25a..7ce1aad 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block body %}
 
diff --git a/src/newsletter/templates/newsletter/2022/subscribe_form.html b/src/newsletter/templates/newsletter/2022/subscribe_form.html
deleted file mode 100644 (file)
index f667c08..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "2022/base_simple.html" %}
-{% load i18n %}
-{% load honeypot %}
-
-{% block settings %}
-  {% load title %}
-  {% title form.newsletter.page_title %}
-{% endblock %}
-
-
-{% block content %}
-  <h1>{{ title }}</h1>
-
-  <form method="post">
-    {% csrf_token %}
-    {% render_honeypot_field %}
-    {{ form }}
-
-    <div class="helptext">
-      {{ form.data_processing }}
-    </div>
-
-    <button>Dalej</button>
-  </form>
-{% endblock %}
diff --git a/src/newsletter/templates/newsletter/2022/subscribed.html b/src/newsletter/templates/newsletter/2022/subscribed.html
deleted file mode 100644 (file)
index 5396885..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{% extends "2022/base_simple.html" %}
-{% load i18n %}
-
-
-{% block settings %}
-  {% load title %}
-  {% trans "Subscribed" as title %}
-  {% title title %}
-{% endblock %}
-
-
-{% block content %}
-  <h1>{{ title }}</h1>
-
-  <p>
-    {% trans "You have subscribed to Wolne Lektury newsletter." %}
-  </p>
-{% endblock %}
diff --git a/src/newsletter/templates/newsletter/subscribe_form.html b/src/newsletter/templates/newsletter/subscribe_form.html
new file mode 100644 (file)
index 0000000..e20be8a
--- /dev/null
@@ -0,0 +1,25 @@
+{% extends "base_simple.html" %}
+{% load i18n %}
+{% load honeypot %}
+
+{% block settings %}
+  {% load title %}
+  {% title form.newsletter.page_title %}
+{% endblock %}
+
+
+{% block content %}
+  <h1>{{ title }}</h1>
+
+  <form method="post">
+    {% csrf_token %}
+    {% render_honeypot_field %}
+    {{ form }}
+
+    <div class="helptext">
+      {{ form.data_processing }}
+    </div>
+
+    <button>Dalej</button>
+  </form>
+{% endblock %}
diff --git a/src/newsletter/templates/newsletter/subscribed.html b/src/newsletter/templates/newsletter/subscribed.html
new file mode 100644 (file)
index 0000000..56cf71a
--- /dev/null
@@ -0,0 +1,18 @@
+{% extends "base_simple.html" %}
+{% load i18n %}
+
+
+{% block settings %}
+  {% load title %}
+  {% trans "Subscribed" as title %}
+  {% title title %}
+{% endblock %}
+
+
+{% block content %}
+  <h1>{{ title }}</h1>
+
+  <p>
+    {% trans "You have subscribed to Wolne Lektury newsletter." %}
+  </p>
+{% endblock %}
index cfa394b..f226a6b 100644 (file)
@@ -19,7 +19,7 @@ def subscribe_form(request, slug=''):
     else:
         form = SubscribeForm(newsletter)
 
-    template_name = 'newsletter/2022/subscribe_form.html'
+    template_name = 'newsletter/subscribe_form.html'
     return render(request, template_name, {
         'page_title': newsletter.page_title,
         'form': form,
@@ -27,7 +27,7 @@ def subscribe_form(request, slug=''):
 
 
 def subscribed(request):
-    template_name = 'newsletter/2022/subscribed.html'
+    template_name = 'newsletter/subscribed.html'
     return render(request, template_name, {
         'page_title': _('Subscribed'),
     })
index eb73f33..3314700 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block body %}
diff --git a/src/pdcounter/templates/pdcounter/2022/author_detail.html b/src/pdcounter/templates/pdcounter/2022/author_detail.html
deleted file mode 100644 (file)
index c1920d1..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-{% extends "2022/base.html" %}
-{% load i18n %}
-{% load time_tags %}
-
-{% block settings %}
-  {% load title %}
-  {% title author.name %}
-{% endblock %}
-
-{% block breadcrumbs %}
-  <a href="/katalog/"><span>Katalog</span></a>
-  <a href="/katalog/autor/"><span>Autor</span></a>
-{% endblock %}
-
-{% block main %}
-  <div class="l-section">
-    <div class="l-author__header">
-      <h1>{{ author.name }}</h1>
-    </div>
-  </div>
-
-  <div class="l-section">
-
-
-    {% if author.alive %}
-      <p>
-        {% trans "This author's works are copyrighted." %}
-        {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this author's works." %}
-      </p>
-    {% else %}
-      {% if author.in_pd %}
-        <p>{% trans "This author's works are in public domain, but they were not yet published on Internet library of Wolne Lektury." %}</p>
-      {% else %}
-        <div>
-          <p>
-            {% trans "This author's works will become part of public domain and will be allowed to be published without restrictions in" %}
-          </p>
-          <div class='countdown' data-until='{{ pd_counter|date_to_utc|utc_for_js }}'></div>
-          <p>
-            {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this author's works." %}
-          </p>
-        </div>
-      {% endif %}
-    {% endif %}
-
-
-  </div>
-
-  <section class="l-section">
-    <div class="l-author">
-      {% include "catalogue/2022/author_box.html" %}
-    </div>
-  </section>
-{% endblock %}
diff --git a/src/pdcounter/templates/pdcounter/2022/book_detail.html b/src/pdcounter/templates/pdcounter/2022/book_detail.html
deleted file mode 100644 (file)
index 9f07b47..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-{% extends '2022/base.html' %}
-{% load i18n %}
-{% load time_tags %}
-
-{% block global-content %}
-  <div class="l-container">
-    <div class="l-breadcrumb">
-      <a href="/"><span>Strona główna</span></a>
-      <a href="/katalog/lektury/"><span>Literatura</span></a>
-    </div>
-  </div>
-
-
-  <main class="l-main">
-    <section class="l-section">
-      <div class="l-content">
-        <header class="l-header">
-          <div class="l-header__content">
-            <p>{{ book.author }}</p>
-            <h1>{{ book.title }}</h1>
-            {% if book.translator %}
-              <p class="l-header__translators">
-                tłum.
-                {{ book.translator }}
-              </p>
-            {% endif %}
-          </div>
-        </header>
-        <article class="l-article">
-          {% if book.in_pd %}
-            <p>{% trans "This work is in public domain and will be published on Internet library of Wolne Lektury soon." %}</p>
-          {% else %}
-            {% if book.pd %}
-              <p>
-                {% trans "This work will become part of public domain and will be allowed to be published without restrictions in" %}
-              </p>
-              <div class='countdown' data-until='{{ pd_counter|date_to_utc|utc_for_js }}'></div>
-              <p>
-                {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this work." %}
-              </p>
-            {% else %}
-              <p>
-                {% trans "This work is copyrighted." %}
-                {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this work." %}
-              </p>
-            {% endif %}
-          {% endif %}
-        </article>
-      </div>
-    </section>
-  </main>
-
-
-{% endblock %}
diff --git a/src/pdcounter/templates/pdcounter/author_detail.html b/src/pdcounter/templates/pdcounter/author_detail.html
new file mode 100644 (file)
index 0000000..85d29ad
--- /dev/null
@@ -0,0 +1,54 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load time_tags %}
+
+{% block settings %}
+  {% load title %}
+  {% title author.name %}
+{% endblock %}
+
+{% block breadcrumbs %}
+  <a href="/katalog/"><span>Katalog</span></a>
+  <a href="/katalog/autor/"><span>Autor</span></a>
+{% endblock %}
+
+{% block main %}
+  <div class="l-section">
+    <div class="l-author__header">
+      <h1>{{ author.name }}</h1>
+    </div>
+  </div>
+
+  <div class="l-section">
+
+
+    {% if author.alive %}
+      <p>
+        {% trans "This author's works are copyrighted." %}
+        {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this author's works." %}
+      </p>
+    {% else %}
+      {% if author.in_pd %}
+        <p>{% trans "This author's works are in public domain, but they were not yet published on Internet library of Wolne Lektury." %}</p>
+      {% else %}
+        <div>
+          <p>
+            {% trans "This author's works will become part of public domain and will be allowed to be published without restrictions in" %}
+          </p>
+          <div class='countdown' data-until='{{ pd_counter|date_to_utc|utc_for_js }}'></div>
+          <p>
+            {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this author's works." %}
+          </p>
+        </div>
+      {% endif %}
+    {% endif %}
+
+
+  </div>
+
+  <section class="l-section">
+    <div class="l-author">
+      {% include "catalogue/author_box.html" %}
+    </div>
+  </section>
+{% endblock %}
diff --git a/src/pdcounter/templates/pdcounter/book_detail.html b/src/pdcounter/templates/pdcounter/book_detail.html
new file mode 100644 (file)
index 0000000..36ec0e0
--- /dev/null
@@ -0,0 +1,54 @@
+{% extends 'base.html' %}
+{% load i18n %}
+{% load time_tags %}
+
+{% block global-content %}
+  <div class="l-container">
+    <div class="l-breadcrumb">
+      <a href="/"><span>Strona główna</span></a>
+      <a href="/katalog/lektury/"><span>Literatura</span></a>
+    </div>
+  </div>
+
+
+  <main class="l-main">
+    <section class="l-section">
+      <div class="l-content">
+        <header class="l-header">
+          <div class="l-header__content">
+            <p>{{ book.author }}</p>
+            <h1>{{ book.title }}</h1>
+            {% if book.translator %}
+              <p class="l-header__translators">
+                tłum.
+                {{ book.translator }}
+              </p>
+            {% endif %}
+          </div>
+        </header>
+        <article class="l-article">
+          {% if book.in_pd %}
+            <p>{% trans "This work is in public domain and will be published on Internet library of Wolne Lektury soon." %}</p>
+          {% else %}
+            {% if book.pd %}
+              <p>
+                {% trans "This work will become part of public domain and will be allowed to be published without restrictions in" %}
+              </p>
+              <div class='countdown' data-until='{{ pd_counter|date_to_utc|utc_for_js }}'></div>
+              <p>
+                {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this work." %}
+              </p>
+            {% else %}
+              <p>
+                {% trans "This work is copyrighted." %}
+                {% trans "<a href='http://domenapubliczna.org/co-to-jest-domena-publiczna/'>Find out</a> why Internet libraries can't publish this work." %}
+              </p>
+            {% endif %}
+          {% endif %}
+        </article>
+      </div>
+    </section>
+  </main>
+
+
+{% endblock %}
index e66254b..ca61f16 100644 (file)
@@ -18,7 +18,7 @@ def book_stub_detail(request, slug):
 
     form = PublishingSuggestForm(initial={"books": "%s — %s, \n" % (book.author, book.title)})
 
-    template_name = 'pdcounter/2022/book_detail.html'
+    template_name = 'pdcounter/book_detail.html'
 
     return render(request, template_name, {
         'book': book,
@@ -37,7 +37,7 @@ def author_detail(request, slug):
 
     form = PublishingSuggestForm(initial={"books": author.name + ", \n"})
 
-    template_name = 'pdcounter/2022/author_detail.html'
+    template_name = 'pdcounter/author_detail.html'
 
     return render(request, template_name, {
         'author': author,
diff --git a/src/picture/templates/picture/2022/picture_detail.html b/src/picture/templates/picture/2022/picture_detail.html
deleted file mode 100644 (file)
index d9707c7..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-{% extends '2022/base.html' %}
-{% load i18n %}
-
-{% load chunks %}
-{% load static %}
-{% load thumbnail %}
-{% load catalogue_tags %}
-
-
-{% block global-content %}
-  <div class="l-container">
-    <div class="l-breadcrumb">
-      <a href="/"><span>Strona główna</span></a>
-      <a href="/katalog/obraz/"><span>Obrazy</span></a>
-    </div>
-  </div>
-
-
-  <main class="l-main">
-    <section class="l-section lay-s-col-rev">
-      <aside class="l-aside">
-        <ul class="l-aside__info">
-          <li><span>Epoka:</span> {% for tag in picture.epochs %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
-          <li><span>Rodzaj:</span> {% for tag in picture.kinds %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
-          <li><span>Gatunek:</span> {% for tag in picture.genres %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
-          {% with extra_info=picture.get_extra_info_json %}
-            {% if extra_info.styles %}
-              <li>
-                <span>{% trans "Style" %}:</span>
-                {% for tag in extra_info.styles %}
-                  <a>{{ tag }}</a>
-                  {% if not forloop.last %}, {% endif %}
-                {% endfor %}
-              </li>
-            {% endif %}
-
-            {% if extra_info.medium %}
-              <li>
-                <span>{% trans "Medium" %}:</span>
-                <a>{{ extra_info.medium }}</a>
-              </li>
-            {% endif %}
-
-            {% if extra_info.original_dimensions %}
-              <li>
-                <span>{% trans "Dimensions" %}:</span>
-                <a>{{ extra_info.original_dimensions }}</a>
-              </li>
-            {% endif %}
-
-            <li>
-              <span>{% trans "Date" %}:</span>
-              <a>{{ extra_info.created_at }}</a>
-            </li>
-          {% endwith %}
-
-        </ul>
-      </aside>
-      <div class="l-content">
-        <header class="l-header">
-          <div class="l-header__content">
-            <p>{% for author in picture.authors %}<a href="{{ author.get_absolute_url }}">{{ author.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
-            </p>
-            <h1><a href="{{ picture.get_absolute_url }}">{{ picture.title }}</a></h1>
-          </div>
-        </header>
-        <article class="l-article">
-          <div class="c-media">
-            <div class="c-media__actions">
-              <div class="c-media__btn">
-                <a href="{{ picture.image_file.url }}" class="l-button l-button--media"><i class="icon icon-picture"></i> pobierz obraz</a>
-              </div>
-              <div class="c-media__btn" style="padding-right: 0">
-                <a href="{% url 'picture_viewer' picture.slug %}" class="l-button l-button--media l-button--media--full"><i class="icon icon-eye"></i> obejrzyj online</a>
-              </div>
-            </div>
-          </div>
-
-          <div class="l-article__overlay" data-max-height="327" style="margin-top:30px;">
-            {% thumbnail picture.image_file "850" upscale=0 as thumb %}
-            <a href="{% url 'picture_viewer' picture.slug %}">
-              <img class="l-art__preview" src="{{ thumb.url }}" />
-            </a>
-    {% endthumbnail %}
-          </div>
-          <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Pokaż więcej" data-action="Pokaż mniej">Pokaż więcej</button>
-        </article>
-      </div>
-    </section>
-
-    {% for tag in picture.authors %}
-      <section class="l-section">
-        <div class="l-author">
-          {% include 'catalogue/2022/author_box.html' %}
-        </div>
-      </section>
-    {% endfor %}
-
-    <section class="l-section">
-      <div class="l-themes__wrapper">
-        {% if themes %}
-          <h2>Motywy obecne na tym obrazie <a href="/katalog/motyw/"><span>Wszystkie motywy</span> <i class="icon icon-arrow-right"></i></a></h2>
-          <div class="l-themes l-article__overlay" data-max-height="80">
-            <ul>
-              {% for item in themes %}
-                <li><a href="{% url 'picture_viewer' picture.slug %}#theme-{{ item.slug }}">{{ item }}&nbsp;({{ item.count}})</a></li>
-              {% endfor %}
-            </ul>
-          </div>
-          <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Zobacz więcej</button>
-
-        {% endif %}
-        {% if things %}
-          <h2>Obiekty na tym obrazie <a href="/katalog/motyw/"><span>Wszystkie obiekty</span> <i class="icon icon-arrow-right"></i></a></h2>
-          <div class="l-themes l-article__overlay" data-max-height="80">
-            <ul>
-              {% for item in things %}
-                <li><a href="{% url 'picture_viewer' picture.slug %}#object-{{ item.slug }}">{{ item }}&nbsp;({{ item.count}})</a></li>
-              {% endfor %}
-            </ul>
-          </div>
-          <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Zobacz więcej</button>
-
-        {% endif %}
-        <ul class="links">
-          {% if picture.wiki_link %}
-            <li><a href="{{ picture.wiki_link }}">strona obrazu w Wikipedii</a></li>
-          {% endif %}
-          <li>
-            <a href="{{ picture.xml_url }}">źródłowy plik XML</a>
-          </li>
-          <li>
-            <a target="_blank" href="{{ picture.get_extra_info_json.about }}">obraz na Platformie Redakcyjnej</a>
-          </li>
-        </ul>
-      </div>
-    </section>
-  </main>
-
-
-
-
-
-  <section class="l-section">
-    <div class="l-books__wrapper">
-      <div class="l-container">
-        <h2>Czytaj także</h2>
-        <dive class="l-books">
-          {% related_pictures_2022 picture=picture as related_books %}
-          {% for rel in related_books %}
-            <article class="l-books__item">
-              <figure class="l-books__item__img">
-                <a href="{{ rel.get_absolute_url }}">
-                  <img src="{% if rel.cover_clean %}{{ rel.cover_clean.url }}{% endif %}" alt="{{ rel.pretty_title }}">
-                </a>
-              </figure>
-              <h3>
-                {% for author in rel.authors %}
-                  <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
-                {% endfor %}
-              </h3>
-              <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
-            </article>
-          {% endfor %}
-
-          <article class="l-books__item l-books__item--link">
-            <a href="/katalog/kolekcje/">i wiele innych książek, wierszy, obrazów, audiobooków…</a>
-            <a href="/katalog/kolekcje/" class="icon-link"><i class="icon icon-all"></i></a>
-          </article>
-
-        </div>
-      </div>
-    </div>
-  </section>
-
-
-{% endblock %}
diff --git a/src/picture/templates/picture/picture_detail.html b/src/picture/templates/picture/picture_detail.html
new file mode 100644 (file)
index 0000000..4b61779
--- /dev/null
@@ -0,0 +1,177 @@
+{% extends 'base.html' %}
+{% load i18n %}
+
+{% load chunks %}
+{% load static %}
+{% load thumbnail %}
+{% load catalogue_tags %}
+
+
+{% block global-content %}
+  <div class="l-container">
+    <div class="l-breadcrumb">
+      <a href="/"><span>Strona główna</span></a>
+      <a href="/katalog/obraz/"><span>Obrazy</span></a>
+    </div>
+  </div>
+
+
+  <main class="l-main">
+    <section class="l-section lay-s-col-rev">
+      <aside class="l-aside">
+        <ul class="l-aside__info">
+          <li><span>Epoka:</span> {% for tag in picture.epochs %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
+          <li><span>Rodzaj:</span> {% for tag in picture.kinds %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
+          <li><span>Gatunek:</span> {% for tag in picture.genres %}<a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a> {% endfor %}</li>
+          {% with extra_info=picture.get_extra_info_json %}
+            {% if extra_info.styles %}
+              <li>
+                <span>{% trans "Style" %}:</span>
+                {% for tag in extra_info.styles %}
+                  <a>{{ tag }}</a>
+                  {% if not forloop.last %}, {% endif %}
+                {% endfor %}
+              </li>
+            {% endif %}
+
+            {% if extra_info.medium %}
+              <li>
+                <span>{% trans "Medium" %}:</span>
+                <a>{{ extra_info.medium }}</a>
+              </li>
+            {% endif %}
+
+            {% if extra_info.original_dimensions %}
+              <li>
+                <span>{% trans "Dimensions" %}:</span>
+                <a>{{ extra_info.original_dimensions }}</a>
+              </li>
+            {% endif %}
+
+            <li>
+              <span>{% trans "Date" %}:</span>
+              <a>{{ extra_info.created_at }}</a>
+            </li>
+          {% endwith %}
+
+        </ul>
+      </aside>
+      <div class="l-content">
+        <header class="l-header">
+          <div class="l-header__content">
+            <p>{% for author in picture.authors %}<a href="{{ author.get_absolute_url }}">{{ author.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
+            </p>
+            <h1><a href="{{ picture.get_absolute_url }}">{{ picture.title }}</a></h1>
+          </div>
+        </header>
+        <article class="l-article">
+          <div class="c-media">
+            <div class="c-media__actions">
+              <div class="c-media__btn">
+                <a href="{{ picture.image_file.url }}" class="l-button l-button--media"><i class="icon icon-picture"></i> pobierz obraz</a>
+              </div>
+              <div class="c-media__btn" style="padding-right: 0">
+                <a href="{% url 'picture_viewer' picture.slug %}" class="l-button l-button--media l-button--media--full"><i class="icon icon-eye"></i> obejrzyj online</a>
+              </div>
+            </div>
+          </div>
+
+          <div class="l-article__overlay" data-max-height="327" style="margin-top:30px;">
+            {% thumbnail picture.image_file "850" upscale=0 as thumb %}
+            <a href="{% url 'picture_viewer' picture.slug %}">
+              <img class="l-art__preview" src="{{ thumb.url }}" />
+            </a>
+    {% endthumbnail %}
+          </div>
+          <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Pokaż więcej" data-action="Pokaż mniej">Pokaż więcej</button>
+        </article>
+      </div>
+    </section>
+
+    {% for tag in picture.authors %}
+      <section class="l-section">
+        <div class="l-author">
+          {% include 'catalogue/author_box.html' %}
+        </div>
+      </section>
+    {% endfor %}
+
+    <section class="l-section">
+      <div class="l-themes__wrapper">
+        {% if themes %}
+          <h2>Motywy obecne na tym obrazie <a href="/katalog/motyw/"><span>Wszystkie motywy</span> <i class="icon icon-arrow-right"></i></a></h2>
+          <div class="l-themes l-article__overlay" data-max-height="80">
+            <ul>
+              {% for item in themes %}
+                <li><a href="{% url 'picture_viewer' picture.slug %}#theme-{{ item.slug }}">{{ item }}&nbsp;({{ item.count}})</a></li>
+              {% endfor %}
+            </ul>
+          </div>
+          <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Zobacz więcej</button>
+
+        {% endif %}
+        {% if things %}
+          <h2>Obiekty na tym obrazie <a href="/katalog/motyw/"><span>Wszystkie obiekty</span> <i class="icon icon-arrow-right"></i></a></h2>
+          <div class="l-themes l-article__overlay" data-max-height="80">
+            <ul>
+              {% for item in things %}
+                <li><a href="{% url 'picture_viewer' picture.slug %}#object-{{ item.slug }}">{{ item }}&nbsp;({{ item.count}})</a></li>
+              {% endfor %}
+            </ul>
+          </div>
+          <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Zobacz więcej</button>
+
+        {% endif %}
+        <ul class="links">
+          {% if picture.wiki_link %}
+            <li><a href="{{ picture.wiki_link }}">strona obrazu w Wikipedii</a></li>
+          {% endif %}
+          <li>
+            <a href="{{ picture.xml_url }}">źródłowy plik XML</a>
+          </li>
+          <li>
+            <a target="_blank" href="{{ picture.get_extra_info_json.about }}">obraz na Platformie Redakcyjnej</a>
+          </li>
+        </ul>
+      </div>
+    </section>
+  </main>
+
+
+
+
+
+  <section class="l-section">
+    <div class="l-books__wrapper">
+      <div class="l-container">
+        <h2>Czytaj także</h2>
+        <dive class="l-books">
+          {% related_pictures_2022 picture=picture as related_books %}
+          {% for rel in related_books %}
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="{{ rel.get_absolute_url }}">
+                  <img src="{% if rel.cover_clean %}{{ rel.cover_clean.url }}{% endif %}" alt="{{ rel.pretty_title }}">
+                </a>
+              </figure>
+              <h3>
+                {% for author in rel.authors %}
+                  <a href="{{ author.get_absolute_url }}">{{ author|upper }}</a>
+                {% endfor %}
+              </h3>
+              <h2><a href="{{ rel.get_absolute_url }}">{{ rel.title }}</a></h2>
+            </article>
+          {% endfor %}
+
+          <article class="l-books__item l-books__item--link">
+            <a href="/katalog/kolekcje/">i wiele innych książek, wierszy, obrazów, audiobooków…</a>
+            <a href="/katalog/kolekcje/" class="icon-link"><i class="icon icon-all"></i></a>
+          </article>
+
+        </div>
+      </div>
+    </div>
+  </section>
+
+
+{% endblock %}
index 35f0f3d..44d516c 100644 (file)
@@ -26,7 +26,7 @@ def picture_list_thumb(request):
             suggestions.append(t)
             if sum(suggestion_categories.values()) == 10:
                 break
-    template_name = 'catalogue/2022/author_detail.html'
+    template_name = 'catalogue/author_detail.html'
     return render(request, template_name, {
         'object_list': pictures,
         'title': 'Galeria',
@@ -41,7 +41,7 @@ def picture_detail(request, slug):
 
     theme_things = split_tags(picture.related_themes())
 
-    template_name = 'picture/2022/picture_detail.html'
+    template_name = 'picture/picture_detail.html'
     
     return render(request, template_name, {
         'picture': picture,
index 61d651e..aabadec 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 {% load polls_tags %}
 
index 680a776..6767c15 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Notifications" %}{% endblock %}
index 53eb29b..8688c2d 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block titleextra %}{% trans "Notifications" %}{% endblock %}
index f21b70b..3b266a1 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
 {% load cache %}
 {% load static %}
 {% load l10n %}
index ece5d02..5d121ce 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n l10n %}
 {% load reporting_stats catalogue_tags %}
 
index 625bb65..dbcf1c0 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base.html" %}
+{% extends "base.html" %}
 
 
 {% block main %}
       <div class="l-section l-section--col">
         <div class="l-books__grid">
           {% for book in results.book %}
-            {% include 'catalogue/2022/book_box.html' %}
+            {% include 'catalogue/book_box.html' %}
           {% endfor %}
         </div>
       </div>
       <div class="l-section l-section--col">
         <div class="l-books__grid">
           {% for book in results.art %}
-            {% include 'catalogue/2022/book_box.html' %}
+            {% include 'catalogue/book_box.html' %}
           {% endfor %}
         </div>
       </div>
         <h2 class="header">Kolekcje</h2>
         <div class="c-search-result-collection">
           {% for collection in results.collection %}
-            {% include 'catalogue/2022/collection_box.html' %}
+            {% include 'catalogue/collection_box.html' %}
           {% endfor %}
         </div>
       </div>
diff --git a/src/social/templates/social/2022/my_shelf.html b/src/social/templates/social/2022/my_shelf.html
deleted file mode 100644 (file)
index a955b31..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-{% extends '2022/base.html' %}
-{% load catalogue_tags %}
-
-
-{% block settings %}
-  {% load title %}
-  {% title 'Półka' %}
-{% endblock %}
-
-{% block main %}
-  <div class="l-section">
-    <div class="l-author__header">
-      <h1>Półka</h1>
-    </div>
-  </div>
-
-  <div class="l-section">
-    <div class="l-books__header">
-      <div class="l-books__input">
-        <i class="icon icon-filter"></i>
-        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter">
-      </div>
-      <div class="l-books__sorting">
-        <span>Sortuj:</span>
-        <div>
-          <button data-order="data-pop">najpopularniejsze</button>
-          <button class="is-active">alfabetycznie</button>
-          <!--button>chronologicznie</button-->
-        </div>
-      </div>
-    </div>
-  </div>
-
-  <div class="with-filter">
-
-    <div class="row">
-      <h2 class="header">&nbsp;</h2>
-      {% if suggest %}
-        <div class="filter-container">
-          {% with list_type='book' %}
-            {% for tag in suggest %}
-              <span class="filter filter-category-{{ tag.category }}">
-                <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
-              </span>
-            {% endfor %}
-          {% endwith %}
-        </div>
-      {% endif %}
-    </div>
-  </div>
-
-
-
-  <div class="l-section l-section--col">
-    <div class="l-books__grid" id="book-list">
-      {% for book in books %}
-        {% include "catalogue/2022/book_box.html" %}
-      {% endfor %}
-    </div>
-  </div>
-
-{% endblock %}
diff --git a/src/social/templates/social/carousel.html b/src/social/templates/social/carousel.html
new file mode 100644 (file)
index 0000000..2d91721
--- /dev/null
@@ -0,0 +1,7 @@
+{% for banner in banners %}
+  {% if banner.picture %}
+    <div style="background-image: url('{{ banner.picture.url }}');">
+      <a href="{{ banner.link }}"></a>
+    </div>
+  {% endif %}
+{% endfor %}
diff --git a/src/social/templates/social/carousel_2022.html b/src/social/templates/social/carousel_2022.html
deleted file mode 100644 (file)
index 2d91721..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{% for banner in banners %}
-  {% if banner.picture %}
-    <div style="background-image: url('{{ banner.picture.url }}');">
-      <a href="{{ banner.link }}"></a>
-    </div>
-  {% endif %}
-{% endfor %}
diff --git a/src/social/templates/social/my_shelf.html b/src/social/templates/social/my_shelf.html
new file mode 100644 (file)
index 0000000..f42a76b
--- /dev/null
@@ -0,0 +1,62 @@
+{% extends 'base.html' %}
+{% load catalogue_tags %}
+
+
+{% block settings %}
+  {% load title %}
+  {% title 'Półka' %}
+{% endblock %}
+
+{% block main %}
+  <div class="l-section">
+    <div class="l-author__header">
+      <h1>Półka</h1>
+    </div>
+  </div>
+
+  <div class="l-section">
+    <div class="l-books__header">
+      <div class="l-books__input">
+        <i class="icon icon-filter"></i>
+        <input type="text" placeholder="filtry, tytuł" class="quick-filter" data-for="book-list" data-filters="with-filter">
+      </div>
+      <div class="l-books__sorting">
+        <span>Sortuj:</span>
+        <div>
+          <button data-order="data-pop">najpopularniejsze</button>
+          <button class="is-active">alfabetycznie</button>
+          <!--button>chronologicznie</button-->
+        </div>
+      </div>
+    </div>
+  </div>
+
+  <div class="with-filter">
+
+    <div class="row">
+      <h2 class="header">&nbsp;</h2>
+      {% if suggest %}
+        <div class="filter-container">
+          {% with list_type='book' %}
+            {% for tag in suggest %}
+              <span class="filter filter-category-{{ tag.category }}">
+                <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
+              </span>
+            {% endfor %}
+          {% endwith %}
+        </div>
+      {% endif %}
+    </div>
+  </div>
+
+
+
+  <div class="l-section l-section--col">
+    <div class="l-books__grid" id="book-list">
+      {% for book in books %}
+        {% include "catalogue/book_box.html" %}
+      {% endfor %}
+    </div>
+  </div>
+
+{% endblock %}
index 81a69e0..7e61b90 100644 (file)
@@ -51,8 +51,8 @@ def book_shelf_tags(context, book_id):
     return lazy(get_value, str)()
 
 
-@register.inclusion_tag('social/carousel_2022.html', takes_context=True)
-def carousel_2022(context, placement):
+@register.inclusion_tag('social/carousel.html', takes_context=True)
+def carousel(context, placement):
     banners = Carousel.get(placement).carouselitem_set.all()#first().get_banner()
     return {
         'banners': [b.get_banner() for b in banners],
index 9087d7b..d3f9381 100644 (file)
@@ -66,7 +66,7 @@ def unlike_book(request, slug):
 
 @login_required
 def my_shelf(request):
-    template_name = 'social/2022/my_shelf.html'
+    template_name = 'social/my_shelf.html'
     tags = list(request.user.tag_set.all())
     suggest = [t for t in tags if t.name]
     print(suggest)
index 1b365b1..422624c 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block settings %}
   {% load title %}
index b67d957..0cee1df 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 {% load static from static %}
 
index e91c742..09e6111 100644 (file)
@@ -21,7 +21,7 @@ IMAGE_DIR = 'book/pictures/'
 
 PIPELINE = {
     'STYLESHEETS': {
-        '2022': {
+        'main': {
             'source_filenames': [
                 'contrib/jquery-ui-1.13.1.custom/jquery-ui.css',
                 'css/jquery.countdown.css',
@@ -30,7 +30,7 @@ PIPELINE = {
                 '2022/more.scss',
                 'chunks/edit.scss',
             ],
-            'output_filename': 'css/compressed/2022.css',
+            'output_filename': 'css/compressed/main.css',
         },
         'book_text': {
             'source_filenames': [
@@ -51,17 +51,17 @@ PIPELINE = {
         },
     },
     'JAVASCRIPT': {
-        '2022': {
+        'main': {
             'source_filenames': [
                 '2022/scripts/vendor.js',
                 'contrib/jquery-ui-1.13.1.custom/jquery-ui.js',
 
                 'js/search.js',
-                'js/2022.js',
-                '2022/book/filter.js',
+                'js/header.js',
+                'book/filter.js',
                 'chunks/edit.js',
                 '2022/scripts/modernizr.js',
-                '2021/scripts/main.js',
+                'js/main.js',
 
                 'js/contrib/jquery.cycle2.min.js',
                 'sponsors/js/sponsors.js',
@@ -73,15 +73,15 @@ PIPELINE = {
                 'pdcounter/pdcounter.js',
 
             ],
-            'output_filename': 'js/2022.min.js'
+            'output_filename': 'js/compressed/main.min.js'
         },
-        '2022_player': {
+        'player': {
             'source_filenames': [
                 'js/contrib/jplayer/jquery.jplayer.min.js',
                 'js/contrib/jplayer/jplayer.playlist.min.js',
-                'player/2022_player.js',
+                'player/player.js',
             ],
-            'output_filename': 'js/2022_player.min.js',
+            'output_filename': 'js/compressed/player.min.js',
         },
         'book_text': {
             'source_filenames': [
diff --git a/src/wolnelektury/static/2021/scripts/main.js b/src/wolnelektury/static/2021/scripts/main.js
deleted file mode 100644 (file)
index d231b40..0000000
+++ /dev/null
@@ -1,546 +0,0 @@
-// JS Menu
-(function () {
-  let button = $('.js-menu');
-  let menu = $('.l-navigation');
-  let menuLinks = menu.find('a');
-
-  button.on('click', function() {
-    if(!$(this).hasClass('is-active')) {
-      $(this).addClass('is-active');
-      menu.addClass('is-open');
-      $('body').addClass('is-open');
-      button.find('.bar').addClass('animate');
-      menuLinks.attr('tabindex', 0);
-    } else {
-      $(this).removeClass('is-active');
-      menu.removeClass('is-open');
-      $('body').removeClass('is-open');
-      button.find('.bar').removeClass('animate');
-      menuLinks.attr('tabindex', -1);
-    }
-  });
-
-  $(document).keyup(function(e) {
-    if (e.keyCode === 27) {
-      button.removeClass('is-active');
-      menu.removeClass('is-open');
-      $('body').removeClass('is-open');
-      button.find('.bar').removeClass('animate');
-      menuLinks.attr('tabindex', -1);
-    }
-  });
-})();
-
-// User menu.
-(function() {
-    let button = $('.l-navigation__actions .user');
-    let menu = $('#user-menu');
-    let menuLinks = menu.find('a');
-
-    button.on('click', function() {
-        if (!menu.hasClass('is-open')) {
-            menu.addClass('is-open');
-            menuLinks.attr('tabindex', 0);
-        } else {
-            menu.removeClass('is-open');
-            menuLinks.attr('tabindex', -1)
-        }
-        return false;
-    });
-
-    $(document).keyup(function(e) {
-        if (e.keyCode === 27) {
-            menu.removeClass('is-open');
-            menuLinks.attr('tabindex', -1);
-        }
-    });
-
-    $(document).click(function() {
-      menu.removeClass('is-open');
-      menuLinks.attr('tabindex', -1);
-    });
-
-})();
-
-// Ebook/Audiobook Btns
-(function() {
-  let button = $('.c-media__btn button:not(.l-button--media--full)');
-  let popupLayer = $('.c-media__popup');
-  let closeButton = $('.c-media__popup__close');
-  let playButton = $('.c-player__btn--md');
-  let chaptersButton = $('.c-player__chapters span');
-  let select = $('.c-select');
-  let selectItem = $('.c-select li');
-  let volumeButton = $('.icon-volume');
-
-  button.on('click', function () {
-    let target = $(this).attr('id');
-    $('[data-popup=' + target).addClass('is-open');
-    $('body').addClass('popup-open');
-  });
-
-  closeButton.on('click', function() {
-    $(this).closest('.c-media__popup').removeClass('is-open');
-    $('body').removeClass('popup-open');
-  });
-
-  popupLayer.on('click', function(e) {
-    let _this = $(this);
-    if($(e.target).is(popupLayer)) {
-      _this.removeClass('is-open');
-      $('body').removeClass('popup-open');
-    }
-  });
-
-  chaptersButton.on('click', function() {
-    $(this).parent().toggleClass('is-active');
-  });
-
-  select.on('click', function() {
-    $(this).toggleClass('is-active');
-  });
-
-  selectItem.on('click', function() {
-    selectItem.removeClass('is-active');
-    $(this).addClass('is-active');
-  });
-
-  $(document).keyup(function(e) {
-    if (e.keyCode === 27) {
-      $('.c-media__popup').removeClass('is-open');
-    }
-  });
-})();
-
-// Homepage books sliders
-(function () {
-  let shelfSlider = $('.l-your-books__shelf .l-books');
-  let shelfNextSlide = $('.l-your-books__shelf .js-next-slide');
-  let shelfPrevSlide = $('.l-your-books__shelf .js-prev-slide');
-  let shelfCollapse = $('.l-your-books__shelf .js-collapse');
-
-  shelfSlider.slick({
-    slidesToScroll: 1,
-    slidesToShow: 4,
-    infinite: false,
-    dots: false,
-    arrows: false,
-    autoplay: false,
-    responsive: [
-      {
-        breakpoint: 768,
-        settings: {
-          centerMode: false,
-          slidesToShow: 1
-        }
-      }
-    ]
-  });
-
-  shelfNextSlide.on('click', function (event) {
-    event.preventDefault();
-    shelfSlider.slick('slickNext');
-  });
-
-  shelfPrevSlide.on('click', function (event) {
-    event.preventDefault();
-    shelfSlider.slick('slickPrev');
-  });
-
-  shelfCollapse.on('click', function (event) {
-    event.preventDefault();
-    shelfSlider.slick('slickPrev');
-  });
-
-
-    $('.js-collections').each(function() {
-        //return;
-        let collectionsSlider = $('.l-books', this);
-        if (collectionsSlider.children().length < 2) return;
-
-        // remove flexbox
-        collectionsSlider.css('display', 'block');
-        
-        let collectionsNextSlide = $('.js-next-slide', this);
-        let collectionsPrevSlide = $('.js-prev-slide', this);
-
-  collectionsSlider.slick({
-      //prevArrow, nextArrow,
-
-      slidesToScroll: 1,
-      slidesToShow: 1,
-      infinite: false,
-      dots: false,
-      arrows: false,
-      autoplay: false,
-
-      swipeToSlide: true,
-      centerMode: false,
-      mobileFirst: true,
-      responsive: [
-          {
-              breakpoint: 360 - .01,
-              settings: {
-                  slidesToShow: 2,
-              }
-          },
-          {
-              breakpoint: 520 - .01,
-              settings: {
-                  slidesToShow: 3
-              }
-          },
-          {
-              breakpoint: 680 - .01,
-              settings: {
-                  slidesToShow: 4
-              }
-          },
-          {
-              breakpoint: 840 - .01,
-              settings: {
-                  slidesToShow: 5
-              }
-          },
-          {
-              breakpoint: 1172 - .01,
-              settings: {
-                  slidesToShow: 5,
-                  variableWidth: true,
-              }
-          },
-      ]
-  });
-
-  collectionsNextSlide.on('click', function (event) {
-    event.preventDefault();
-    collectionsSlider.slick('slickNext');
-  });
-
-  collectionsPrevSlide.on('click', function (event) {
-    event.preventDefault();
-    collectionsSlider.slick('slickPrev');
-  });
-    });
-  let newBooksSlider = $('.js-new-books-slider .l-books');
-  let newBooksNextSlide = $('.js-new-books-slider .js-next-slide');
-  let newBooksPrevSlide = $('.js-new-books-slider .js-prev-slide');
-
-  newBooksSlider.slick({
-    slidesToScroll: 1,
-    slidesToShow: 5,
-    infinite: false,
-    dots: false,
-    arrows: false,
-    autoplay: false,
-    responsive: [
-      {
-        breakpoint: 768,
-        settings: {
-          centerMode: false,
-          slidesToShow: 2
-        }
-      }
-    ]
-  });
-
-  newBooksNextSlide.on('click', function (event) {
-    event.preventDefault();
-    newBooksSlider.slick('slickNext');
-  });
-
-  newBooksPrevSlide.on('click', function (event) {
-    event.preventDefault();
-    newBooksSlider.slick('slickPrev');
-  });
-})();
-
-// Quotes slider
-(function () {
-  let slider = $('.l-author__quotes__slider');
-
-  slider.slick({
-    slidesToScroll: 1,
-    slidesToShow: 1,
-    infinite: true,
-    dots: true,
-    arrows: false,
-    autoplay: true,
-    autoplaySpeed: 3000
-  });
-
-
-  let sliderHomepage = $('.l-quotes');
-  sliderHomepage.slick({
-    slidesToShow: 1,
-    centerMode: false,
-    infinite: true,
-    dots: true,
-    arrows: false,
-    autoplay: true,
-    autoplaySpeed: 4000,
-  });
-
-})();
-
-
-
-
-// Carousel
-(function () {
-  let slider = $('.p-homepage__info__box--carousel');
-
-  slider.slick({
-    slidesToScroll: 1,
-    slidesToShow: 1,
-    infinite: true,
-    dots: true,
-    arrows: false,
-    autoplay: true,
-    autoplaySpeed: 5000
-  });
-
-
-
-})();
-
-
-
-// Text overlay toggler
-(function () {
-  let overlays = $('.l-article__overlay');
-  let button = $('.l-article__read-more');
-
-  overlays.each(function () {
-    let maxHeight = $(this).attr('data-max-height');
-    if($(this).outerHeight() > maxHeight) {
-      $(this).css({'maxHeight': maxHeight+'px'}).addClass('is-active');
-    } else {
-      $(this).next('.l-article__read-more').hide();
-    }
-  });
-
-  button.on('click', function() {
-    let dataLabel = $(this).attr('data-label');
-    let dataAction = $(this).attr('data-action');
-    $(this).parent().find('.l-article__overlay').toggleClass('is-clicked');
-    if($(this).text() === dataLabel) {
-      $(this).text(dataAction);
-    } else {
-      $(this).text(dataLabel);
-    }
-  });
-})();
-
-(function() {
-    $('.l-checkout__payments__box button').on('click', function() {
-        let container = $(this).closest('.l-checkout__payments');
-        $('input', container).val($(this).val());
-        $('.is-active', container).removeClass('is-active');
-        $(this).closest('.l-checkout__payments__box').addClass('is-active');
-        $('#kwota').val('');
-        return false;
-    });
-    
-})();
-
-
-//Copy function
-(function() {
-  let $copy = $('.js-copy');
-
-  $copy.on('click', function() {
-    let $copyText = $(this).closest('.l-checkout__info__item').find('input');
-    $copyText.select();
-    document.execCommand('copy');
-  });
-})();
-
-
-
-// Likes
-(function() {
-
-    ids = new Set(); 
-    $(".icon-like").each(
-        (i, e)=>{
-            ids.add($(e).attr('data-book'));
-        }
-    );
-    ids = [...ids].join(',');
-
-    state = {
-        liked: [],
-    };
-    
-    $(document).on('click', '.icon-like', function(e) {
-        e.preventDefault();
-        let liked = $(this).hasClass('icon-liked');
-        $btn = $(this);
-        if (liked) {
-            $.post({
-                url: '/ludzie/lektura/' + $(this).attr('data-book-slug') + '/nie_lubie/',
-                data: {'csrfmiddlewaretoken': $('[name=csrfmiddlewaretoken]').val()},
-                success: function() {
-                    delete state.liked[$btn.attr('data-book')];
-                    updateLiked($btn);
-                }
-            })
-        } else {
-            $.post({
-                url: '/ludzie/lektura/' + $(this).attr('data-book-slug') + '/lubie/',
-                data: {'csrfmiddlewaretoken': $('[name=csrfmiddlewaretoken]').val()},
-                success: function() {
-                    state.liked[$btn.attr('data-book')] = [];
-                    updateLiked($btn);
-                },
-                error: function(e) {
-                    if (e.status == 403) {
-                        $('#login-link').click();
-                    }
-                },
-            });
-        }
-    })
-
-    // TODO: DYNAMICALLY ADD
-   $(".add-set-tag input[name=name]").autocomplete({
-       source: '/ludzie/moje-tagi/',
-   }).on('autocompleteopen', function() {
-       $(this).closest('article').addClass('ac-hover');
-   }).on('autocompleteclose', function() {
-       $(this).closest('article').removeClass('ac-hover');
-   });
-    $(".add-set-tag").on("submit", function(e) {
-        e.preventDefault();
-        let $form = $(this);
-        $.post({
-            url: $form.attr("action"),
-            data: $form.serialize(),
-            success: (data) => {
-                updateFromData(data);
-                updateLikedAll();
-                $('input[name=name]', $form).val('');
-            }
-        });
-    })
-
-    $(document).on("click", ".sets .close", function() {
-        let bookId = $(this).closest("[data-book]").attr('data-book');
-        $.post({
-            url: '/ludzie/usun-tag/',
-            data: {
-                csrfmiddlewaretoken: $("[name=csrfmiddlewaretoken]").val(),
-                book: bookId,
-                slug: $(this).parent().attr('data-set'),
-            },
-            success: (data) => {
-                updateFromData(data);
-                updateLikedAll();
-            }
-        });
-    })
-
-    
-    function refreshAll(ids) {
-        $.ajax('/ludzie/ulubione/?ids=' + ids, {
-            success: function(result) {
-                updateFromData(result);
-                updateLikedAll();
-            },
-        });
-    }
-    refreshAll(ids);
-    $.refreshLikes = refreshAll;
-
-    function updateFromData(data) {
-        for (pk in data) {
-            if (data[pk] === null) {
-                delete state.liked[pk];
-            } else {
-                state.liked[pk] = data[pk];
-            }
-        }
-    }
-    
-    function updateLikedAll() {
-        $(".icon-like").each(
-            (i, e) => {
-                updateLiked(e);
-            }
-        )
-    }
-
-    function updateLiked(e) {
-        let bookId = $(e).attr('data-book');
-        let liked = bookId in state.liked;
-        $(e).toggleClass('icon-liked', liked);
-        let $bookContainer = $('.book-container-' + bookId);
-        $bookContainer.toggleClass('book-liked', liked);
-        let $sets = $(".sets", $bookContainer);
-        $sets.empty();
-        $.each(state.liked[bookId], (i,e) => {
-            let $set = $("<span>");
-            $set.attr("data-set", e.slug);
-            let $setA = $("<a>").appendTo($set);
-            $setA.attr("href", e.url);
-            $setA.text(e.name);
-            let $setX = $("<a class='close'></a>").appendTo($set);
-            $sets.append($set);
-        });
-    }
-    
-})();
-
-
-
-// Toggle a class on long press.
-(function() {
-    const TIME = 250;
-    let timer;
-
-    $("[data-longpress]").on("touchstart", (e) => {
-        $e = $(e.currentTarget);
-        timer = setTimeout(() => {
-            $e.toggleClass($e.attr('data-longpress'));
-        }, TIME);
-    });
-
-    $("[data-longpress]").on("touchend", () => {
-        clearTimeout(timer);
-    });
-})();
-
-
-
-// Update search form filters.
-(function() {
-    $('.j-form-auto').each(function() {
-        let $form = $(this);
-        $('input', $form).change(function() {$form.submit()});
-        $('select', $form).change(function() {$form.submit()});
-        $('textarea', $form).change(function() {$form.submit()});
-    });
-
-    
-    // experiments
-    $(".experiment input").on('change', function() {
-        let name = $(this).attr('name');
-        let val = $(this).val();
-        document.cookie = 'EXPERIMENT_' + name + '=' + val + '; path=/; max-age=31536000';
-        window.location.reload(true);
-    });
-
-    $('.c-lang').on('click', function() {
-        !$(this).toggleClass('is-open');
-    });
-
-
-
-
-
-    $(".c-media__settings > i").on('click', function() {
-        $(".c-media__settings").toggleClass('active');
-    });
-
-})();
diff --git a/src/wolnelektury/static/js/2022.js b/src/wolnelektury/static/js/2022.js
deleted file mode 100644 (file)
index cbf1430..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-(function($) {
-    $(function() {
-
-        $("#search").search();
-        $("#search").on('focus', function() {
-            $(".l-navigation__logo").addClass('search-active');
-        });
-        $("#search").on('blur', function() {
-            $(".l-navigation__logo").removeClass('search-active');
-        });
-
-    });
-})(jQuery);
diff --git a/src/wolnelektury/static/js/header.js b/src/wolnelektury/static/js/header.js
new file mode 100644 (file)
index 0000000..cbf1430
--- /dev/null
@@ -0,0 +1,13 @@
+(function($) {
+    $(function() {
+
+        $("#search").search();
+        $("#search").on('focus', function() {
+            $(".l-navigation__logo").addClass('search-active');
+        });
+        $("#search").on('blur', function() {
+            $(".l-navigation__logo").removeClass('search-active');
+        });
+
+    });
+})(jQuery);
diff --git a/src/wolnelektury/static/js/main.js b/src/wolnelektury/static/js/main.js
new file mode 100644 (file)
index 0000000..d231b40
--- /dev/null
@@ -0,0 +1,546 @@
+// JS Menu
+(function () {
+  let button = $('.js-menu');
+  let menu = $('.l-navigation');
+  let menuLinks = menu.find('a');
+
+  button.on('click', function() {
+    if(!$(this).hasClass('is-active')) {
+      $(this).addClass('is-active');
+      menu.addClass('is-open');
+      $('body').addClass('is-open');
+      button.find('.bar').addClass('animate');
+      menuLinks.attr('tabindex', 0);
+    } else {
+      $(this).removeClass('is-active');
+      menu.removeClass('is-open');
+      $('body').removeClass('is-open');
+      button.find('.bar').removeClass('animate');
+      menuLinks.attr('tabindex', -1);
+    }
+  });
+
+  $(document).keyup(function(e) {
+    if (e.keyCode === 27) {
+      button.removeClass('is-active');
+      menu.removeClass('is-open');
+      $('body').removeClass('is-open');
+      button.find('.bar').removeClass('animate');
+      menuLinks.attr('tabindex', -1);
+    }
+  });
+})();
+
+// User menu.
+(function() {
+    let button = $('.l-navigation__actions .user');
+    let menu = $('#user-menu');
+    let menuLinks = menu.find('a');
+
+    button.on('click', function() {
+        if (!menu.hasClass('is-open')) {
+            menu.addClass('is-open');
+            menuLinks.attr('tabindex', 0);
+        } else {
+            menu.removeClass('is-open');
+            menuLinks.attr('tabindex', -1)
+        }
+        return false;
+    });
+
+    $(document).keyup(function(e) {
+        if (e.keyCode === 27) {
+            menu.removeClass('is-open');
+            menuLinks.attr('tabindex', -1);
+        }
+    });
+
+    $(document).click(function() {
+      menu.removeClass('is-open');
+      menuLinks.attr('tabindex', -1);
+    });
+
+})();
+
+// Ebook/Audiobook Btns
+(function() {
+  let button = $('.c-media__btn button:not(.l-button--media--full)');
+  let popupLayer = $('.c-media__popup');
+  let closeButton = $('.c-media__popup__close');
+  let playButton = $('.c-player__btn--md');
+  let chaptersButton = $('.c-player__chapters span');
+  let select = $('.c-select');
+  let selectItem = $('.c-select li');
+  let volumeButton = $('.icon-volume');
+
+  button.on('click', function () {
+    let target = $(this).attr('id');
+    $('[data-popup=' + target).addClass('is-open');
+    $('body').addClass('popup-open');
+  });
+
+  closeButton.on('click', function() {
+    $(this).closest('.c-media__popup').removeClass('is-open');
+    $('body').removeClass('popup-open');
+  });
+
+  popupLayer.on('click', function(e) {
+    let _this = $(this);
+    if($(e.target).is(popupLayer)) {
+      _this.removeClass('is-open');
+      $('body').removeClass('popup-open');
+    }
+  });
+
+  chaptersButton.on('click', function() {
+    $(this).parent().toggleClass('is-active');
+  });
+
+  select.on('click', function() {
+    $(this).toggleClass('is-active');
+  });
+
+  selectItem.on('click', function() {
+    selectItem.removeClass('is-active');
+    $(this).addClass('is-active');
+  });
+
+  $(document).keyup(function(e) {
+    if (e.keyCode === 27) {
+      $('.c-media__popup').removeClass('is-open');
+    }
+  });
+})();
+
+// Homepage books sliders
+(function () {
+  let shelfSlider = $('.l-your-books__shelf .l-books');
+  let shelfNextSlide = $('.l-your-books__shelf .js-next-slide');
+  let shelfPrevSlide = $('.l-your-books__shelf .js-prev-slide');
+  let shelfCollapse = $('.l-your-books__shelf .js-collapse');
+
+  shelfSlider.slick({
+    slidesToScroll: 1,
+    slidesToShow: 4,
+    infinite: false,
+    dots: false,
+    arrows: false,
+    autoplay: false,
+    responsive: [
+      {
+        breakpoint: 768,
+        settings: {
+          centerMode: false,
+          slidesToShow: 1
+        }
+      }
+    ]
+  });
+
+  shelfNextSlide.on('click', function (event) {
+    event.preventDefault();
+    shelfSlider.slick('slickNext');
+  });
+
+  shelfPrevSlide.on('click', function (event) {
+    event.preventDefault();
+    shelfSlider.slick('slickPrev');
+  });
+
+  shelfCollapse.on('click', function (event) {
+    event.preventDefault();
+    shelfSlider.slick('slickPrev');
+  });
+
+
+    $('.js-collections').each(function() {
+        //return;
+        let collectionsSlider = $('.l-books', this);
+        if (collectionsSlider.children().length < 2) return;
+
+        // remove flexbox
+        collectionsSlider.css('display', 'block');
+        
+        let collectionsNextSlide = $('.js-next-slide', this);
+        let collectionsPrevSlide = $('.js-prev-slide', this);
+
+  collectionsSlider.slick({
+      //prevArrow, nextArrow,
+
+      slidesToScroll: 1,
+      slidesToShow: 1,
+      infinite: false,
+      dots: false,
+      arrows: false,
+      autoplay: false,
+
+      swipeToSlide: true,
+      centerMode: false,
+      mobileFirst: true,
+      responsive: [
+          {
+              breakpoint: 360 - .01,
+              settings: {
+                  slidesToShow: 2,
+              }
+          },
+          {
+              breakpoint: 520 - .01,
+              settings: {
+                  slidesToShow: 3
+              }
+          },
+          {
+              breakpoint: 680 - .01,
+              settings: {
+                  slidesToShow: 4
+              }
+          },
+          {
+              breakpoint: 840 - .01,
+              settings: {
+                  slidesToShow: 5
+              }
+          },
+          {
+              breakpoint: 1172 - .01,
+              settings: {
+                  slidesToShow: 5,
+                  variableWidth: true,
+              }
+          },
+      ]
+  });
+
+  collectionsNextSlide.on('click', function (event) {
+    event.preventDefault();
+    collectionsSlider.slick('slickNext');
+  });
+
+  collectionsPrevSlide.on('click', function (event) {
+    event.preventDefault();
+    collectionsSlider.slick('slickPrev');
+  });
+    });
+  let newBooksSlider = $('.js-new-books-slider .l-books');
+  let newBooksNextSlide = $('.js-new-books-slider .js-next-slide');
+  let newBooksPrevSlide = $('.js-new-books-slider .js-prev-slide');
+
+  newBooksSlider.slick({
+    slidesToScroll: 1,
+    slidesToShow: 5,
+    infinite: false,
+    dots: false,
+    arrows: false,
+    autoplay: false,
+    responsive: [
+      {
+        breakpoint: 768,
+        settings: {
+          centerMode: false,
+          slidesToShow: 2
+        }
+      }
+    ]
+  });
+
+  newBooksNextSlide.on('click', function (event) {
+    event.preventDefault();
+    newBooksSlider.slick('slickNext');
+  });
+
+  newBooksPrevSlide.on('click', function (event) {
+    event.preventDefault();
+    newBooksSlider.slick('slickPrev');
+  });
+})();
+
+// Quotes slider
+(function () {
+  let slider = $('.l-author__quotes__slider');
+
+  slider.slick({
+    slidesToScroll: 1,
+    slidesToShow: 1,
+    infinite: true,
+    dots: true,
+    arrows: false,
+    autoplay: true,
+    autoplaySpeed: 3000
+  });
+
+
+  let sliderHomepage = $('.l-quotes');
+  sliderHomepage.slick({
+    slidesToShow: 1,
+    centerMode: false,
+    infinite: true,
+    dots: true,
+    arrows: false,
+    autoplay: true,
+    autoplaySpeed: 4000,
+  });
+
+})();
+
+
+
+
+// Carousel
+(function () {
+  let slider = $('.p-homepage__info__box--carousel');
+
+  slider.slick({
+    slidesToScroll: 1,
+    slidesToShow: 1,
+    infinite: true,
+    dots: true,
+    arrows: false,
+    autoplay: true,
+    autoplaySpeed: 5000
+  });
+
+
+
+})();
+
+
+
+// Text overlay toggler
+(function () {
+  let overlays = $('.l-article__overlay');
+  let button = $('.l-article__read-more');
+
+  overlays.each(function () {
+    let maxHeight = $(this).attr('data-max-height');
+    if($(this).outerHeight() > maxHeight) {
+      $(this).css({'maxHeight': maxHeight+'px'}).addClass('is-active');
+    } else {
+      $(this).next('.l-article__read-more').hide();
+    }
+  });
+
+  button.on('click', function() {
+    let dataLabel = $(this).attr('data-label');
+    let dataAction = $(this).attr('data-action');
+    $(this).parent().find('.l-article__overlay').toggleClass('is-clicked');
+    if($(this).text() === dataLabel) {
+      $(this).text(dataAction);
+    } else {
+      $(this).text(dataLabel);
+    }
+  });
+})();
+
+(function() {
+    $('.l-checkout__payments__box button').on('click', function() {
+        let container = $(this).closest('.l-checkout__payments');
+        $('input', container).val($(this).val());
+        $('.is-active', container).removeClass('is-active');
+        $(this).closest('.l-checkout__payments__box').addClass('is-active');
+        $('#kwota').val('');
+        return false;
+    });
+    
+})();
+
+
+//Copy function
+(function() {
+  let $copy = $('.js-copy');
+
+  $copy.on('click', function() {
+    let $copyText = $(this).closest('.l-checkout__info__item').find('input');
+    $copyText.select();
+    document.execCommand('copy');
+  });
+})();
+
+
+
+// Likes
+(function() {
+
+    ids = new Set(); 
+    $(".icon-like").each(
+        (i, e)=>{
+            ids.add($(e).attr('data-book'));
+        }
+    );
+    ids = [...ids].join(',');
+
+    state = {
+        liked: [],
+    };
+    
+    $(document).on('click', '.icon-like', function(e) {
+        e.preventDefault();
+        let liked = $(this).hasClass('icon-liked');
+        $btn = $(this);
+        if (liked) {
+            $.post({
+                url: '/ludzie/lektura/' + $(this).attr('data-book-slug') + '/nie_lubie/',
+                data: {'csrfmiddlewaretoken': $('[name=csrfmiddlewaretoken]').val()},
+                success: function() {
+                    delete state.liked[$btn.attr('data-book')];
+                    updateLiked($btn);
+                }
+            })
+        } else {
+            $.post({
+                url: '/ludzie/lektura/' + $(this).attr('data-book-slug') + '/lubie/',
+                data: {'csrfmiddlewaretoken': $('[name=csrfmiddlewaretoken]').val()},
+                success: function() {
+                    state.liked[$btn.attr('data-book')] = [];
+                    updateLiked($btn);
+                },
+                error: function(e) {
+                    if (e.status == 403) {
+                        $('#login-link').click();
+                    }
+                },
+            });
+        }
+    })
+
+    // TODO: DYNAMICALLY ADD
+   $(".add-set-tag input[name=name]").autocomplete({
+       source: '/ludzie/moje-tagi/',
+   }).on('autocompleteopen', function() {
+       $(this).closest('article').addClass('ac-hover');
+   }).on('autocompleteclose', function() {
+       $(this).closest('article').removeClass('ac-hover');
+   });
+    $(".add-set-tag").on("submit", function(e) {
+        e.preventDefault();
+        let $form = $(this);
+        $.post({
+            url: $form.attr("action"),
+            data: $form.serialize(),
+            success: (data) => {
+                updateFromData(data);
+                updateLikedAll();
+                $('input[name=name]', $form).val('');
+            }
+        });
+    })
+
+    $(document).on("click", ".sets .close", function() {
+        let bookId = $(this).closest("[data-book]").attr('data-book');
+        $.post({
+            url: '/ludzie/usun-tag/',
+            data: {
+                csrfmiddlewaretoken: $("[name=csrfmiddlewaretoken]").val(),
+                book: bookId,
+                slug: $(this).parent().attr('data-set'),
+            },
+            success: (data) => {
+                updateFromData(data);
+                updateLikedAll();
+            }
+        });
+    })
+
+    
+    function refreshAll(ids) {
+        $.ajax('/ludzie/ulubione/?ids=' + ids, {
+            success: function(result) {
+                updateFromData(result);
+                updateLikedAll();
+            },
+        });
+    }
+    refreshAll(ids);
+    $.refreshLikes = refreshAll;
+
+    function updateFromData(data) {
+        for (pk in data) {
+            if (data[pk] === null) {
+                delete state.liked[pk];
+            } else {
+                state.liked[pk] = data[pk];
+            }
+        }
+    }
+    
+    function updateLikedAll() {
+        $(".icon-like").each(
+            (i, e) => {
+                updateLiked(e);
+            }
+        )
+    }
+
+    function updateLiked(e) {
+        let bookId = $(e).attr('data-book');
+        let liked = bookId in state.liked;
+        $(e).toggleClass('icon-liked', liked);
+        let $bookContainer = $('.book-container-' + bookId);
+        $bookContainer.toggleClass('book-liked', liked);
+        let $sets = $(".sets", $bookContainer);
+        $sets.empty();
+        $.each(state.liked[bookId], (i,e) => {
+            let $set = $("<span>");
+            $set.attr("data-set", e.slug);
+            let $setA = $("<a>").appendTo($set);
+            $setA.attr("href", e.url);
+            $setA.text(e.name);
+            let $setX = $("<a class='close'></a>").appendTo($set);
+            $sets.append($set);
+        });
+    }
+    
+})();
+
+
+
+// Toggle a class on long press.
+(function() {
+    const TIME = 250;
+    let timer;
+
+    $("[data-longpress]").on("touchstart", (e) => {
+        $e = $(e.currentTarget);
+        timer = setTimeout(() => {
+            $e.toggleClass($e.attr('data-longpress'));
+        }, TIME);
+    });
+
+    $("[data-longpress]").on("touchend", () => {
+        clearTimeout(timer);
+    });
+})();
+
+
+
+// Update search form filters.
+(function() {
+    $('.j-form-auto').each(function() {
+        let $form = $(this);
+        $('input', $form).change(function() {$form.submit()});
+        $('select', $form).change(function() {$form.submit()});
+        $('textarea', $form).change(function() {$form.submit()});
+    });
+
+    
+    // experiments
+    $(".experiment input").on('change', function() {
+        let name = $(this).attr('name');
+        let val = $(this).val();
+        document.cookie = 'EXPERIMENT_' + name + '=' + val + '; path=/; max-age=31536000';
+        window.location.reload(true);
+    });
+
+    $('.c-lang').on('click', function() {
+        !$(this).toggleClass('is-open');
+    });
+
+
+
+
+
+    $(".c-media__settings > i").on('click', function() {
+        $(".c-media__settings").toggleClass('active');
+    });
+
+})();
diff --git a/src/wolnelektury/templates/2022/base.html b/src/wolnelektury/templates/2022/base.html
deleted file mode 100644 (file)
index c31eb78..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<!doctype html>
-{% load cache %}
-{% load pipeline %}
-{% load static %}
-{% load funding_tags %}
-{% load piwik_tags %}
-{% load title %}
-
-{% block settings %}
-{% endblock %}
-
-<html class="no-js">
-  <head>
-    <meta charset="utf-8">
-    <meta name="description" content="">
-    <meta name="viewport" content="width=device-width,minimum-scale=1">
-    <title>{% if title %}{{ title }} | {% endif %}WolneLektury.pl</title>
-    <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png"/>
-    <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury"
-          href="{% static 'opensearch.xml' %}"/>
-    <link rel="manifest" href="/manifest.json">
-    <link rel="apple-touch-icon" href="apple-touch-icon.png">
-    {% stylesheet '2022' %}
-      {% tracking_code %}
-      {% block extrahead %}{% endblock %}
-  </head>
-  <body>
-    {% include '2022/header.html' %}
-
-    {% block under-menu %}{% endblock %}
-
-    {% if not funding_no_show_current %}
-      <div class="l-container funding-promo-bar">
-        {% cache 120 funding_top_bar LANGUAGE_CODE %}
-          {% funding_top_bar_2022 %}
-        {% endcache %}
-      </div>
-    {% endif %}
-
-    {% block global-content %}
-      <div class="l-container">
-        <div class="l-breadcrumb">
-          <a href="/"><span>Strona główna</span></a>
-          {% block breadcrumbs %}<span>{{ title }}</span>{% endblock %}
-        </div>
-      </div>
-
-      <main class="l-main">
-        {% block main %}{% endblock %}
-      </main>
-    {% endblock %}
-
-    {% block footer %}
-      {% include '2022/footer.html' %}
-    {% endblock %}
-
-    <script type="text/javascript">
-      var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
-    </script>
-    {% javascript '2022' %}
-    {% javascript '2022_player' %}
-    {% block extrabody %}{% endblock %}
-    {% include '2022/hotjar.html' %}
-    {% csrf_token %}
-  </body>
-</html>
diff --git a/src/wolnelektury/templates/2022/base_simple.html b/src/wolnelektury/templates/2022/base_simple.html
deleted file mode 100644 (file)
index 481d814..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{% extends "2022/base.html" %}
-
-
-{% block main %}
-  <div class="page-simple">
-    {% block body %}
-      {% block content %}
-        <h1>{{ title }}</h1>
-        {% block simple-content %}{% endblock %}
-      {% endblock %}
-    {% endblock %}
-  </div>
-{% endblock main %}
diff --git a/src/wolnelektury/templates/2022/footer.html b/src/wolnelektury/templates/2022/footer.html
deleted file mode 100644 (file)
index 777b55e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-{% load static %}
-
-<div class="l-footer">
-  <div class="l-container">
-    <div class="l-footer__row">
-      <ul>
-        <li><a href="https://fundacja.wolnelektury.pl">Fundacja Wolne Lektury</a></li>
-        <li>ul. Marszałkowska 84/92 lok. 125</li>
-        <li>00-514 Warszawa</li>
-        <li>tel. <a href="tel:+48-22-621-30-17">+48 22 621 30 17</a></li>
-        <li>email <a href="mailto:fundacja@wolnelektury.pl">fundacja@wolnelektury.pl</a></li>
-      </ul>
-      <ul>
-        <li>NIP: 952-187-70-87</li>
-        <li>KRS: 0000070056</li>
-        <li>REGON: 017423865</li>
-        <li>Numer konta: 75 1090 2851 0000 0001 4324 3317</li>
-      </ul>
-    </div>
-    <div class="l-footer__row">
-      <div>
-        Wolne Lektury to projekt prowadzony przez fundację <a href="https://fundacja.wolnelektury.pl">Wolne Lektury</a>. <br>
-      </div>
-      <div>
-        <a href="https://www.gov.pl/web/kultura"><img src="{% static '2022/images/MKiDN.png' %}" alt="MKiDN"></a>
-      </div>
-      <div>
-        Strona biblioteki Wolne Lektury powstała dzięki dofinansowaniu ze środków Ministra <a href="https://www.gov.pl/web/kultura">Kultury i Dziedzictwa Narodowego</a>
-        pochodzących z Funduszu Promocji Kultury – państwowego funduszu celowego.
-      </div>
-    </div>
-  </div>
-</div>
diff --git a/src/wolnelektury/templates/2022/header.html b/src/wolnelektury/templates/2022/header.html
deleted file mode 100644 (file)
index 4fa616d..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-{% load cache %}
-{% load static %}
-{% load menu %}
-{% load latest_blog_posts from blog %}
-{% load preview_ad from catalogue_tags %}
-
-<nav class="l-navigation">
-  <div class="l-container">
-    <a href="/" class="l-navigation__logo">
-      <img src="{% static "2022/images/logo.svg" %}" alt="WolneLektury.pl">
-    </a>
-    <div class="l-naviagion__search">
-      <form action="/szukaj/">
-        <input id="search" name="q" type="text" placeholder="szukaj tytułu, autora, motywów…" autocomplete="off" data-source="/szukaj/hint/?max=10">
-      </form>
-    </div>
-    <div class="l-navigation__actions">
-      <div class="l-navigation__user-actions">
-        {% include '2022/user_actions.html' %}
-      </div>
-      <button class="l-navigation__button js-menu" aria-label="Menu">
-        <span class="c-hamburger">
-          <span class="bar"></span>
-        </span>
-      </button>
-    </div>
-    <div class="l-navigation__menu">
-      <div class="scrollable">
-        <div class="l-container">
-
-          <div class="l-navigation__user-bar">
-            <div class="l-navigation__user-actions">
-              {% include '2022/user_actions.html' %}
-            </div>
-          </div>
-
-          <div class="l-navigation__menu__blocks">
-          <div class="l-navigation__menu__links">
-            {% cache 30 menu LANGUAGE_CODE %}
-              <ul>
-                <li><strong>Katalog</strong></li>
-                {% menu 'Katalog' %}
-              </ul>
-              <ul>
-                <li><strong>Włącz się</strong></li>
-                {% menu 'Włącz się' %}
-              </ul>
-              <ul>
-                <li><strong>Aktualności</strong></li>
-                {% latest_blog_posts %}
-                {% menu 'Aktualności' %}
-              </ul>
-              <ul>
-                <li><strong>Narzędzia</strong></li>
-                {% menu 'Narzędzia' %}
-              </ul>
-              <ul>
-                <li><strong>O nas</strong></li>
-                {% menu 'O nas' %}
-              </ul>
-            {% endcache %}
-          </div>
-
-          <div class="l-navigation__menu__info">
-
-            <div class="l-navigation__menu__book">
-              {% preview_ad %}
-            </div>
-
-            <div class="l-navigation__menu__social">
-              <ul>
-                <li>
-                  <a href="https://www.facebook.com/wolnelektury/"
-                     title="Facebook" tabindex="-1" target="_blank">
-                    <i class="icon icon-fb" aria-hidden="true"></i>
-                  </a>
-                </li>
-                <li>
-                  <a href="https://www.youtube.com/c/WolneLekturyYT/"
-                     title="YouTube" tabindex="-1" target="_blank">
-                    <i class="icon icon-yt" aria-hidden="true"></i>
-                  </a>
-                </li>
-                <li>
-                  <a href="https://www.instagram.com/wolnelektury/"
-                     title="Instagram" tabindex="-1" target="_blank">
-                    <i class="icon icon-ig" aria-hidden="true"></i>
-                  </a>
-                </li>
-                <li>
-                  <a href="https://twitter.com/wolnelektury"
-                     title="Twitter" tabindex="-1" target="_blank">
-                    <i class="icon icon-tt" aria-hidden="true"></i>
-                  </a>
-              </li>
-            </ul>
-            </div>
-          </div>
-        </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</nav>
-
-{% block under-menu %}{% endblock %}
diff --git a/src/wolnelektury/templates/2022/hotjar.html b/src/wolnelektury/templates/2022/hotjar.html
deleted file mode 100644 (file)
index a4cbd22..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Hotjar Tracking Code for https://wolnelektury.pl/ -->
-<script>
- (function(h,o,t,j,a,r){
-     h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
-     h._hjSettings={hjid:2661024,hjsv:6};
-     a=o.getElementsByTagName('head')[0];
-     r=o.createElement('script');r.async=1;
-     r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
-     a.appendChild(r);
- })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
-</script>
-
-
-<script>
-  window.markerConfig = {
-    destination: '6177df91cd90df729b89c94d', 
-    source: 'snippet'
-  };
-</script>
-
-<script>
-!function(e,r,a){if(!e.__Marker){e.__Marker={};var t=[],n={__cs:t};["show","hide","isVisible","capture","cancelCapture","unload","reload","isExtensionInstalled","setReporter","setCustomData","on","off"].forEach(function(e){n[e]=function(){var r=Array.prototype.slice.call(arguments);r.unshift(e),t.push(r)}}),e.Marker=n;var s=r.createElement("script");s.async=1,s.src="https://edge.marker.io/latest/shim.js";var i=r.getElementsByTagName("script")[0];i.parentNode.insertBefore(s,i)}}(window,document);
-</script>
-
diff --git a/src/wolnelektury/templates/2022/main_page.html b/src/wolnelektury/templates/2022/main_page.html
deleted file mode 100644 (file)
index 8a826e6..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-{% extends "2022/base.html" %}
-{% load static %}
-{% load thumbnail %}
-{% load catalogue_tags %}
-{% load social_tags %}
-{% load sponsors %}
-
-{% block under-menu %}
-  {% comment %}
-    <div class="l-your-books">
-      <div class="l-container">
-        <div class="l-your-books__continue">
-          <div class="l-your-books__header">
-            <h3>Czytaj dalej</h3>
-          </div>
-          <div class="l-books">
-            <article class="l-books__item">
-              <figure class="l-books__item__img">
-                <a href="#">
-                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
-                </a>
-              </figure>
-              <div class="l-books__item__actions">
-                <a href="#"><i class="icon icon-book"></i></a>
-                <a href="#"><i class="icon icon-audio"></i></a>
-                <a href="#"><i class="icon icon-picture"></i></a>
-                <a href="#"><i class="icon icon-like"></i></a>
-              </div>
-              <h3><a href="#">Stanisław Brzozowski</a></h3>
-              <h2><a href="#">Wstęp do filozofii</a></h2>
-            </article>
-          </div>
-        </div>
-        <div class="l-your-books__shelf">
-          <div class="l-your-books__header">
-            <h3>Moja półka</h3>
-            <div class="l-your-books__header__actions">
-              <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
-              <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
-            </div>
-          </div>
-          <div class="l-books">
-            <article class="l-books__item">
-              <figure class="l-books__item__img">
-                <a href="#">
-                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
-                </a>
-              </figure>
-              <div class="l-books__item__actions">
-                <a href="#"><i class="icon icon-book"></i></a>
-                <a href="#"><i class="icon icon-audio"></i></a>
-                <a href="#"><i class="icon icon-picture"></i></a>
-                <a href="#"><i class="icon icon-like"></i></a>
-              </div>
-              <h3><a href="#">Stanisław Brzozowski</a></h3>
-              <h2><a href="#">Wstęp do filozofii</a></h2>
-            </article>
-            <article class="l-books__item">
-              <figure class="l-books__item__img">
-                <a href="#">
-                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
-                </a>
-              </figure>
-              <div class="l-books__item__actions">
-                <a href="#"><i class="icon icon-book"></i></a>
-                <a href="#"><i class="icon icon-audio"></i></a>
-                <a href="#"><i class="icon icon-picture"></i></a>
-                <a href="#"><i class="icon icon-like"></i></a>
-              </div>
-              <h3><a href="#">Stanisław Brzozowski</a></h3>
-              <h2><a href="#">Wstęp do filozofii</a></h2>
-            </article>
-            <article class="l-books__item">
-              <figure class="l-books__item__img">
-                <a href="#">
-                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
-                </a>
-              </figure>
-              <div class="l-books__item__actions">
-                <a href="#"><i class="icon icon-book"></i></a>
-                <a href="#"><i class="icon icon-audio"></i></a>
-                <a href="#"><i class="icon icon-picture"></i></a>
-                <a href="#"><i class="icon icon-like"></i></a>
-              </div>
-              <h3><a href="#">Stanisław Brzozowski</a></h3>
-              <h2><a href="#">Wstęp do filozofii</a></h2>
-            </article>
-            <article class="l-books__item">
-              <figure class="l-books__item__img">
-                <a href="#">
-                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
-                </a>
-              </figure>
-              <div class="l-books__item__actions">
-                <a href="#"><i class="icon icon-book"></i></a>
-                <a href="#"><i class="icon icon-audio"></i></a>
-                <a href="#"><i class="icon icon-picture"></i></a>
-                <a href="#"><i class="icon icon-like"></i></a>
-              </div>
-              <h3><a href="#">Stanisław Brzozowski</a></h3>
-              <h2><a href="#">Wstęp do filozofii</a></h2>
-            </article>
-            <article class="l-books__item">
-              <figure class="l-books__item__img">
-                <a href="#">
-                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
-                </a>
-              </figure>
-              <div class="l-books__item__actions">
-                <a href="#"><i class="icon icon-book"></i></a>
-                <a href="#"><i class="icon icon-audio"></i></a>
-                <a href="#"><i class="icon icon-picture"></i></a>
-                <a href="#"><i class="icon icon-like"></i></a>
-              </div>
-              <h3><a href="#">Stanisław Brzozowski</a></h3>
-              <h2><a href="#">Wstęp do filozofii</a></h2>
-            </article>
-            <article class="l-books__item l-books__item--placeholder">
-              <figure class="l-books__item__img">
-                <a href="#">
-                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
-                </a>
-              </figure>
-              <div class="l-books__item__actions">
-                <a href="#"><i class="icon icon-book"></i></a>
-                <a href="#"><i class="icon icon-audio"></i></a>
-                <a href="#"><i class="icon icon-picture"></i></a>
-                <a href="#"><i class="icon icon-like"></i></a>
-              </div>
-              <h3><a href="#">Stanisław Brzozowski</a></h3>
-              <h2><a href="#">Wstęp do filozofii</a></h2>
-            </article>
-          </div>
-        </div>
-      </div>
-    </div>
-  {% endcomment %}
-{% endblock %}
-
-{% block global-content %}
-  <main class="l-main">
-
-    {% if widget %}
-      <div class="l-change-pop show"><p>{{ widget.description }}</p></div>
-      <section class="l-section">
-        <iframe src="{{ widget.url }}" style="width: 100%; height: 600px; border: none;"></iframe>
-      </section>
-    {% endif %}
-
-    {% if recommended_collection %}
-      <section class="l-section">
-        <div class="l-collections js-collections">
-          <div class="l-collections__header">
-            <h3><a href="{{ recommended_collection.get_absolute_url }}">{{ recommended_collection.title }}</a></h3>
-            <div class="l-your-books__header__actions">
-              <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
-              <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
-            </div>
-          </div>
-          <div class="l-books">
-            {% for book in recommended_collection.get_books %}
-              {% include 'catalogue/2022/book_box.html' %}
-            {% endfor %}
-          </div>
-          <div class="c-read_more">
-            <a href="/katalog/kolekcje/">zobacz wszystkie kolekcje</a>
-          </div>
-        </div>
-
-      </section>
-    {% endif %}
-
-    <section class="l-section">
-      <div class="p-homepage__info">
-        <div class="p-homepage__info__box p-homepage__info__box--carousel">
-          {% carousel_2022 'main_2022' %}
-        </div>
-        <div class="p-homepage__info__box p-homepage__info__box--donate">
-          <figure>
-            <img src="{% static '2022/images/book-donate.svg' %}" alt="Dorzuć się!">
-          </figure>
-          <div class="p-homepage__info__box__content">
-            <p>
-              Nasze książki są dostępne dla tysięcy
-              dzieciaków dzięki <strong>darowiznom</strong> od
-              osób takich jak <strong>Ty</strong>!
-            </p>
-            <a href="{% url 'club_join' %}?pk_campaign=home" class="l-button l-button--default l-button--default--dark">Dorzuć się!</a>
-          </div>
-        </div>
-        <div class="p-homepage__info__box p-homepage__info__box--newsletter">
-          <figure>
-            <img src="{% static '2022/images/book-newsletter.svg' %}" alt="Zapisz się na nasz Newsletter!">
-          </figure>
-          <div class="p-homepage__info__box__content">
-            <h3>
-              Informacja o&nbsp;nowościach <strong>Newsletter!</strong>
-            </h3>
-            <a href="{% url 'subscribe' %}?pk_campaign=home" class="l-button l-button--default">Zapisz się</a>
-          </div>
-        </div>
-      </div>
-    </section>
-
-    <section class="l-section l-section--row">
-      <div class="l-quotes" style="">
-        {% for ambassador in ambassadors %}
-          <div class="l-quotes__item">
-            {% thumbnail ambassador.photo '100x100' crop="center" as ambphoto %}
-            <img src="{{ ambphoto.url  }}" alt="{{ ambassador.name }}">
-              {% endthumbnail %}
-              <h4>{{ ambassador.name }}</h4>
-              <p>
-                {{ ambassador.text }}
-              </p>
-          </div>
-        {% endfor %}
-      </div>
-
-      <div class="l-quotes-ad" style="">
-        {% preview_ad_homepage %}
-      </div>
-
-    </section>
-
-    <section class="l-section">
-      <div class="p-homepage__info p-homepage__info--second">
-        <div class="p-homepage__info__box p-homepage__info__box--full">
-          <figure>
-            <img src="{% static '2022/images/kid.png' %}" alt="Dorzuć się!">
-          </figure>
-          <div class="p-homepage__info__box__content">
-            <p>
-              <strong>Wolne Lektury</strong> to lektury szkolne
-              i tysiące innych książek – za <strong>darmo</strong>
-              i <strong>bez rejestracji</strong>.
-            </p>
-            <p>Czytaj i słuchaj online, ściągaj na swój telefon lub komputer, dziel się z innymi.</p>
-            <p>Dla uczennic i uczniów dodajemy przypisy, motywy literackie, biogramy i geotagowanie.</p>
-            <a href="{% url 'infopage' 'o-projekcie' %}?pk_campaign=wl-infobox" class="l-button l-button--default l-button--default--dark">Dowiedz się więcej</a>
-          </div>
-        </div>
-        <div class="p-homepage__info__box__rows">
-          <div class="p-homepage__info__box p-homepage__info__box--full--sm">
-            <figure>
-              <img src="{% static '2022/images/kid-2.png' %}" alt="Dorzuć się!">
-            </figure>
-            <div class="p-homepage__info__box__content">
-              <p>
-                Jesteśmy częścią ruchu <strong>wolnej kultury</strong>!
-              </p>
-              <a href="https://fundacja.wolnelektury.pl/o-fundacji/?pk_campaign=wl-infobox" class="l-button l-button--default">Dowiedz się więcej</a>
-            </div>
-          </div>
-          <div class="p-homepage__info__box p-homepage__info__box--full--sm">
-            <figure>
-              <img src="{% static '2022/images/kid-3.png' %}" alt="Dorzuć się!">
-            </figure>
-            <div class="p-homepage__info__box__content">
-              <p>
-                Jak budujemy najpopularniejszą <strong>bibliotekę online</strong> w Polsce
-              </p>
-              <a href="/info/jak-powstaja-wolne-lektury/" class="l-button l-button--default">Dowiedz się więcej</a>
-            </div>
-          </div>
-        </div>
-      </div>
-    </section>
-  </main>
-
-
-  <section class="l-section">
-    <div class="l-collections js-collections">
-      <div class="l-collections__header">
-        <h3><a href="/katalog/nowe/">Nowości</a></h3>
-        <div class="l-your-books__header__actions">
-          <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
-          <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
-        </div>
-      </div>
-      <div class="l-books" style="display:block;">
-        {% for book in last_published %}
-          {% include 'catalogue/2022/book_box.html' %}
-        {% endfor %}
-      </div>
-    </div>
-  </section>
-
-  <div class="l-container">
-    <section class="l-section">
-      <div class="p-homepage__uptodate">
-        <div class="p-homepage__uptodate__header">
-          <h3>Bądź na bieżąco</h3>
-          <ul>
-            <li>
-              <a href="https://www.facebook.com/wolnelektury/"
-                 title="Facebook" tabindex="-1" target="_blank">
-                <i class="icon icon-fb" aria-hidden="true"></i>
-              </a>
-            </li>
-            <li>
-              <a href="https://www.youtube.com/c/WolneLekturyYT/"
-                 title="YouTube" tabindex="-1" target="_blank">
-                <i class="icon icon-yt" aria-hidden="true"></i>
-              </a>
-            </li>
-            <li>
-              <a href="https://www.instagram.com/wolnelektury/"
-                 title="Instagram" tabindex="-1" target="_blank">
-                <i class="icon icon-ig" aria-hidden="true"></i>
-              </a>
-            </li>
-            <li>
-              <a href="https://twitter.com/wolnelektury"
-                 title="Twitter" tabindex="-1" target="_blank">
-                <i class="icon icon-tt" aria-hidden="true"></i>
-              </a>
-            </li>
-          </ul>
-        </div>
-
-        {% sponsor_page 'footer' %}
-
-      </div>
-    </section>
-  </div>
-
-{% endblock %}
diff --git a/src/wolnelektury/templates/2022/paginate.html b/src/wolnelektury/templates/2022/paginate.html
deleted file mode 100644 (file)
index 79ac191..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{% if is_paginated %}
-  <div class="l-pagination">
-    {% if page_obj.has_previous %}
-      <a href="?page={{ page_obj.previous_page_number }}{{ getvars }}" class="l-pagination__arrow">
-        <i class="icon icon-arrow-left"></i>
-      </a>
-    {% endif %}
-    <ul>
-      {% for page in pages %}
-        {% if page %}
-          {% if page == page_obj.number %}
-            <li class="is-active"><a>{{ page }}</a></li>
-          {% else %}
-            <li><a href="?page={{ page }}{{ getvars }}">{{ page }}</a></li>
-          {% endif %}
-        {% else %}
-          <li><a>…</a></li>
-        {% endif %}
-      {% endfor %}
-    </ul>
-    {% if page_obj.has_next %}
-      <a href="?page={{ page_obj.next_page_number }}{{ getvars }}" class="l-pagination__arrow">
-        <i class="icon icon-arrow-right"></i>
-      </a>
-    {% endif %}
-  </div>
-{% endif %}
diff --git a/src/wolnelektury/templates/2022/user_actions.html b/src/wolnelektury/templates/2022/user_actions.html
deleted file mode 100644 (file)
index 28ea5e7..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-{% load static %}
-
-{% if request.user.is_authenticated %}
-  <a href="/ludzie/polka/"><i class="icon icon-liked"></i></a>
-  <div id="user-menu">
-    <ul>
-      <li>
-        <a href="{% url 'user_settings' %}" tabindex="-1">
-          <strong>
-            {{ request.user.username }}
-          </strong>
-        </a>
-      </li>
-      {% if request.user.is_staff %}
-        <li><a href="{% url 'admin:index' %}" tabindex="-1">Administracja</a></li>
-        <li><a class='edit-links-toggle' href="#" tabindex="-1">Edycja</a></li>
-      {% endif %}
-      {% if request.user.membership %}
-        <li><a href="{% url 'club_join' %}">Wspierasz Wolne Lektury, dziękujemy!</a></li>
-      {% endif %}
-
-      <li><a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}" tabindex="-1">Wyloguj się</a></li>
-    </ul>
-  </div>
-  <a href="{% url 'user_settings' %}" class="user">
-    {% if request.user.is_staffs %}
-      <img src="{% static '2022/images/icons/user-staff.svg' %}">
-    {% elif request.user.membership %}
-      <img src="{% static '2022/images/icons/user-vip.svg' %}">
-    {% else %}
-      <img src="{% static '2022/images/icons/user.svg' %}">
-    {% endif %}
-  </a>
-{% else %}
-  <div class="l-navigation__login">
-    <a id="login-link" href='{% url 'login' %}?next={{ request.path }}'>Zaloguj się</a>
-    /
-    <a href='{% url 'register' %}?next={{ request.path }}'>Załóż konto</a>
-  </div>
-{% endif %}
index 372c941..b2bc74c 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
index 5f9693d..40c1de9 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 {% block body %}
   <div class="white-box normal-text">
diff --git a/src/wolnelektury/templates/base.html b/src/wolnelektury/templates/base.html
new file mode 100644 (file)
index 0000000..713a5b5
--- /dev/null
@@ -0,0 +1,66 @@
+<!doctype html>
+{% load cache %}
+{% load pipeline %}
+{% load static %}
+{% load funding_tags %}
+{% load piwik_tags %}
+{% load title %}
+
+{% block settings %}
+{% endblock %}
+
+<html class="no-js">
+  <head>
+    <meta charset="utf-8">
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width,minimum-scale=1">
+    <title>{% if title %}{{ title }} | {% endif %}WolneLektury.pl</title>
+    <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png"/>
+    <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury"
+          href="{% static 'opensearch.xml' %}"/>
+    <link rel="manifest" href="/manifest.json">
+    <link rel="apple-touch-icon" href="apple-touch-icon.png">
+    {% stylesheet 'main' %}
+      {% tracking_code %}
+      {% block extrahead %}{% endblock %}
+  </head>
+  <body>
+    {% include 'header.html' %}
+
+    {% block under-menu %}{% endblock %}
+
+    {% if not funding_no_show_current %}
+      <div class="l-container funding-promo-bar">
+        {% cache 120 funding_top_bar LANGUAGE_CODE %}
+          {% funding_top_bar %}
+        {% endcache %}
+      </div>
+    {% endif %}
+
+    {% block global-content %}
+      <div class="l-container">
+        <div class="l-breadcrumb">
+          <a href="/"><span>Strona główna</span></a>
+          {% block breadcrumbs %}<span>{{ title }}</span>{% endblock %}
+        </div>
+      </div>
+
+      <main class="l-main">
+        {% block main %}{% endblock %}
+      </main>
+    {% endblock %}
+
+    {% block footer %}
+      {% include 'footer.html' %}
+    {% endblock %}
+
+    <script type="text/javascript">
+      var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
+    </script>
+    {% javascript 'main' %}
+    {% javascript 'player' %}
+    {% block extrabody %}{% endblock %}
+    {% include 'hotjar.html' %}
+    {% csrf_token %}
+  </body>
+</html>
diff --git a/src/wolnelektury/templates/base_simple.html b/src/wolnelektury/templates/base_simple.html
new file mode 100644 (file)
index 0000000..01d89b9
--- /dev/null
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+
+{% block main %}
+  <div class="page-simple">
+    {% block body %}
+      {% block content %}
+        <h1>{{ title }}</h1>
+        {% block simple-content %}{% endblock %}
+      {% endblock %}
+    {% endblock %}
+  </div>
+{% endblock main %}
diff --git a/src/wolnelektury/templates/footer.html b/src/wolnelektury/templates/footer.html
new file mode 100644 (file)
index 0000000..777b55e
--- /dev/null
@@ -0,0 +1,33 @@
+{% load static %}
+
+<div class="l-footer">
+  <div class="l-container">
+    <div class="l-footer__row">
+      <ul>
+        <li><a href="https://fundacja.wolnelektury.pl">Fundacja Wolne Lektury</a></li>
+        <li>ul. Marszałkowska 84/92 lok. 125</li>
+        <li>00-514 Warszawa</li>
+        <li>tel. <a href="tel:+48-22-621-30-17">+48 22 621 30 17</a></li>
+        <li>email <a href="mailto:fundacja@wolnelektury.pl">fundacja@wolnelektury.pl</a></li>
+      </ul>
+      <ul>
+        <li>NIP: 952-187-70-87</li>
+        <li>KRS: 0000070056</li>
+        <li>REGON: 017423865</li>
+        <li>Numer konta: 75 1090 2851 0000 0001 4324 3317</li>
+      </ul>
+    </div>
+    <div class="l-footer__row">
+      <div>
+        Wolne Lektury to projekt prowadzony przez fundację <a href="https://fundacja.wolnelektury.pl">Wolne Lektury</a>. <br>
+      </div>
+      <div>
+        <a href="https://www.gov.pl/web/kultura"><img src="{% static '2022/images/MKiDN.png' %}" alt="MKiDN"></a>
+      </div>
+      <div>
+        Strona biblioteki Wolne Lektury powstała dzięki dofinansowaniu ze środków Ministra <a href="https://www.gov.pl/web/kultura">Kultury i Dziedzictwa Narodowego</a>
+        pochodzących z Funduszu Promocji Kultury – państwowego funduszu celowego.
+      </div>
+    </div>
+  </div>
+</div>
index 32df9d0..c94d702 100644 (file)
@@ -1,4 +1,4 @@
-{% extends form.base_template|default:"2022/base.html" %}
+{% extends form.base_template|default:"base.html" %}
 {% load forms_builder_tags %}
 {% load title %}
 
index ee4cc1f..515a643 100644 (file)
@@ -1,4 +1,4 @@
-{% extends form.base_template|default:"2022/base_simple.html" %}
+{% extends form.base_template|default:"base_simple.html" %}
 {% load forms_builder_tags %}
 {% load title %}
 {% load i18n %}
diff --git a/src/wolnelektury/templates/header.html b/src/wolnelektury/templates/header.html
new file mode 100644 (file)
index 0000000..2256724
--- /dev/null
@@ -0,0 +1,109 @@
+{% load cache %}
+{% load static %}
+{% load menu %}
+{% load latest_blog_posts from blog %}
+{% load preview_ad from catalogue_tags %}
+
+<nav class="l-navigation">
+  <div class="l-container">
+    <a href="/" class="l-navigation__logo">
+      <img src="{% static "2022/images/logo.svg" %}" alt="WolneLektury.pl">
+    </a>
+    <div class="l-naviagion__search">
+      <form action="/szukaj/">
+        <input id="search" name="q" type="text" placeholder="szukaj tytułu, autora, motywów…" autocomplete="off" data-source="/szukaj/hint/?max=10">
+      </form>
+    </div>
+    <div class="l-navigation__actions">
+      <div class="l-navigation__user-actions">
+        {% include 'user_actions.html' %}
+      </div>
+      <button class="l-navigation__button js-menu" aria-label="Menu">
+        <span class="c-hamburger">
+          <span class="bar"></span>
+        </span>
+      </button>
+    </div>
+    {% include 'lang-switcher.html' %}
+
+    <div class="l-navigation__menu">
+      <div class="scrollable">
+        <div class="l-container">
+
+          <div class="l-navigation__user-bar">
+            <div class="l-navigation__user-actions">
+              {% include 'lang-switcher.html' %}
+              {% include 'user_actions.html' %}
+            </div>
+          </div>
+
+          <div class="l-navigation__menu__blocks">
+            <div class="l-navigation__menu__links">
+              {% cache 30 menu LANGUAGE_CODE %}
+                <ul>
+                  <li><strong>Katalog</strong></li>
+                  {% menu 'Katalog' %}
+                </ul>
+                <ul>
+                  <li><strong>Włącz się</strong></li>
+                  {% menu 'Włącz się' %}
+                </ul>
+                <ul>
+                  <li><strong>Aktualności</strong></li>
+                  {% latest_blog_posts %}
+                  {% menu 'Aktualności' %}
+                </ul>
+                <ul>
+                  <li><strong>Narzędzia</strong></li>
+                  {% menu 'Narzędzia' %}
+                </ul>
+                <ul>
+                  <li><strong>O nas</strong></li>
+                  {% menu 'O nas' %}
+                </ul>
+              {% endcache %}
+            </div>
+
+            <div class="l-navigation__menu__info">
+
+              <div class="l-navigation__menu__book">
+                {% preview_ad %}
+              </div>
+
+              <div class="l-navigation__menu__social">
+                <ul>
+                  <li>
+                    <a href="https://www.facebook.com/wolnelektury/"
+                       title="Facebook" tabindex="-1" target="_blank">
+                      <i class="icon icon-fb" aria-hidden="true"></i>
+                    </a>
+                  </li>
+                  <li>
+                    <a href="https://www.youtube.com/c/WolneLekturyYT/"
+                       title="YouTube" tabindex="-1" target="_blank">
+                      <i class="icon icon-yt" aria-hidden="true"></i>
+                    </a>
+                  </li>
+                  <li>
+                    <a href="https://www.instagram.com/wolnelektury/"
+                       title="Instagram" tabindex="-1" target="_blank">
+                      <i class="icon icon-ig" aria-hidden="true"></i>
+                    </a>
+                  </li>
+                  <li>
+                    <a href="https://twitter.com/wolnelektury"
+                       title="Twitter" tabindex="-1" target="_blank">
+                      <i class="icon icon-tt" aria-hidden="true"></i>
+                    </a>
+              </li>
+            </ul>
+            </div>
+          </div>
+        </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</nav>
+
+{% block under-menu %}{% endblock %}
diff --git a/src/wolnelektury/templates/hotjar.html b/src/wolnelektury/templates/hotjar.html
new file mode 100644 (file)
index 0000000..a4cbd22
--- /dev/null
@@ -0,0 +1,24 @@
+<!-- Hotjar Tracking Code for https://wolnelektury.pl/ -->
+<script>
+ (function(h,o,t,j,a,r){
+     h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
+     h._hjSettings={hjid:2661024,hjsv:6};
+     a=o.getElementsByTagName('head')[0];
+     r=o.createElement('script');r.async=1;
+     r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
+     a.appendChild(r);
+ })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
+</script>
+
+
+<script>
+  window.markerConfig = {
+    destination: '6177df91cd90df729b89c94d', 
+    source: 'snippet'
+  };
+</script>
+
+<script>
+!function(e,r,a){if(!e.__Marker){e.__Marker={};var t=[],n={__cs:t};["show","hide","isVisible","capture","cancelCapture","unload","reload","isExtensionInstalled","setReporter","setCustomData","on","off"].forEach(function(e){n[e]=function(){var r=Array.prototype.slice.call(arguments);r.unshift(e),t.push(r)}}),e.Marker=n;var s=r.createElement("script");s.async=1,s.src="https://edge.marker.io/latest/shim.js";var i=r.getElementsByTagName("script")[0];i.parentNode.insertBefore(s,i)}}(window,document);
+</script>
+
diff --git a/src/wolnelektury/templates/lang-switcher.html b/src/wolnelektury/templates/lang-switcher.html
new file mode 100644 (file)
index 0000000..ea59d9f
--- /dev/null
@@ -0,0 +1,20 @@
+{% comment %}
+{% load i18n %}
+<div class="c-lang">
+  <div class="c-lang__button">
+    <i class="icon icon-lang"></i>
+    {{ LANGUAGE_CODE|language_name_local }}
+    <i class="icon icon-arrow-down"></i>
+  </div>
+  <form method="post" action="{% url 'set_language' %}">
+    {% csrf_token %}
+    <div class="c-lang__list">
+      {% for lang in LANGUAGES %}
+        <button type="submit" lang="{{ lang.0 }}"
+                name="language" value="{{ lang.0 }}" tabindex="121"
+                class="{% if lang.0 == LANGUAGE_CODE %}is-active{% endif %}">{{ lang.1 }}</button>
+      {% endfor %}
+    </div>
+  </form>
+</div>
+{% endcomment %}
diff --git a/src/wolnelektury/templates/main_page.html b/src/wolnelektury/templates/main_page.html
new file mode 100644 (file)
index 0000000..386ebe6
--- /dev/null
@@ -0,0 +1,328 @@
+{% extends "base.html" %}
+{% load static %}
+{% load thumbnail %}
+{% load catalogue_tags %}
+{% load social_tags %}
+{% load sponsors %}
+
+{% block under-menu %}
+  {% comment %}
+    <div class="l-your-books">
+      <div class="l-container">
+        <div class="l-your-books__continue">
+          <div class="l-your-books__header">
+            <h3>Czytaj dalej</h3>
+          </div>
+          <div class="l-books">
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+          </div>
+        </div>
+        <div class="l-your-books__shelf">
+          <div class="l-your-books__header">
+            <h3>Moja półka</h3>
+            <div class="l-your-books__header__actions">
+              <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
+              <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
+            </div>
+          </div>
+          <div class="l-books">
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+            <article class="l-books__item l-books__item--placeholder">
+              <figure class="l-books__item__img">
+                <a href="#">
+                  <img src="images/book-2.jpg" alt="Wstęp do filozofii">
+                </a>
+              </figure>
+              <div class="l-books__item__actions">
+                <a href="#"><i class="icon icon-book"></i></a>
+                <a href="#"><i class="icon icon-audio"></i></a>
+                <a href="#"><i class="icon icon-picture"></i></a>
+                <a href="#"><i class="icon icon-like"></i></a>
+              </div>
+              <h3><a href="#">Stanisław Brzozowski</a></h3>
+              <h2><a href="#">Wstęp do filozofii</a></h2>
+            </article>
+          </div>
+        </div>
+      </div>
+    </div>
+  {% endcomment %}
+{% endblock %}
+
+{% block global-content %}
+  <main class="l-main">
+
+    {% if widget %}
+      <div class="l-change-pop show"><p>{{ widget.description }}</p></div>
+      <section class="l-section">
+        <iframe src="{{ widget.url }}" style="width: 100%; height: 600px; border: none;"></iframe>
+      </section>
+    {% endif %}
+
+    {% if recommended_collection %}
+      <section class="l-section">
+        <div class="l-collections js-collections">
+          <div class="l-collections__header">
+            <h3><a href="{{ recommended_collection.get_absolute_url }}">{{ recommended_collection.title }}</a></h3>
+            <div class="l-your-books__header__actions">
+              <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
+              <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
+            </div>
+          </div>
+          <div class="l-books">
+            {% for book in recommended_collection.get_books %}
+              {% include 'catalogue/book_box.html' %}
+            {% endfor %}
+          </div>
+          <div class="c-read_more">
+            <a href="/katalog/kolekcje/">zobacz wszystkie kolekcje</a>
+          </div>
+        </div>
+
+      </section>
+    {% endif %}
+
+    <section class="l-section">
+      <div class="p-homepage__info">
+        <div class="p-homepage__info__box p-homepage__info__box--carousel">
+          {% carousel 'main_2022' %}
+        </div>
+        <div class="p-homepage__info__box p-homepage__info__box--donate">
+          <figure>
+            <img src="{% static '2022/images/book-donate.svg' %}" alt="Dorzuć się!">
+          </figure>
+          <div class="p-homepage__info__box__content">
+            <p>
+              Nasze książki są dostępne dla tysięcy
+              dzieciaków dzięki <strong>darowiznom</strong> od
+              osób takich jak <strong>Ty</strong>!
+            </p>
+            <a href="{% url 'club_join' %}?pk_campaign=home" class="l-button l-button--default l-button--default--dark">Dorzuć się!</a>
+          </div>
+        </div>
+        <div class="p-homepage__info__box p-homepage__info__box--newsletter">
+          <figure>
+            <img src="{% static '2022/images/book-newsletter.svg' %}" alt="Zapisz się na nasz Newsletter!">
+          </figure>
+          <div class="p-homepage__info__box__content">
+            <h3>
+              Informacja o&nbsp;nowościach <strong>Newsletter!</strong>
+            </h3>
+            <a href="{% url 'subscribe' %}?pk_campaign=home" class="l-button l-button--default">Zapisz się</a>
+          </div>
+        </div>
+      </div>
+    </section>
+
+    <section class="l-section l-section--row">
+      <div class="l-quotes" style="">
+        {% for ambassador in ambassadors %}
+          <div class="l-quotes__item">
+            {% thumbnail ambassador.photo '100x100' crop="center" as ambphoto %}
+            <img src="{{ ambphoto.url  }}" alt="{{ ambassador.name }}">
+              {% endthumbnail %}
+              <h4>{{ ambassador.name }}</h4>
+              <p>
+                {{ ambassador.text }}
+              </p>
+          </div>
+        {% endfor %}
+      </div>
+
+      <div class="l-quotes-ad" style="">
+        {% preview_ad_homepage %}
+      </div>
+
+    </section>
+
+    <section class="l-section">
+      <div class="p-homepage__info p-homepage__info--second">
+        <div class="p-homepage__info__box p-homepage__info__box--full">
+          <figure>
+            <img src="{% static '2022/images/kid.png' %}" alt="Dorzuć się!">
+          </figure>
+          <div class="p-homepage__info__box__content">
+            <p>
+              <strong>Wolne Lektury</strong> to lektury szkolne
+              i tysiące innych książek – za <strong>darmo</strong>
+              i <strong>bez rejestracji</strong>.
+            </p>
+            <p>Czytaj i słuchaj online, ściągaj na swój telefon lub komputer, dziel się z innymi.</p>
+            <p>Dla uczennic i uczniów dodajemy przypisy, motywy literackie, biogramy i geotagowanie.</p>
+            <a href="{% url 'infopage' 'o-projekcie' %}?pk_campaign=wl-infobox" class="l-button l-button--default l-button--default--dark">Dowiedz się więcej</a>
+          </div>
+        </div>
+        <div class="p-homepage__info__box__rows">
+          <div class="p-homepage__info__box p-homepage__info__box--full--sm">
+            <figure>
+              <img src="{% static '2022/images/kid-2.png' %}" alt="Dorzuć się!">
+            </figure>
+            <div class="p-homepage__info__box__content">
+              <p>
+                Jesteśmy częścią ruchu <strong>wolnej kultury</strong>!
+              </p>
+              <a href="https://fundacja.wolnelektury.pl/o-fundacji/?pk_campaign=wl-infobox" class="l-button l-button--default">Dowiedz się więcej</a>
+            </div>
+          </div>
+          <div class="p-homepage__info__box p-homepage__info__box--full--sm">
+            <figure>
+              <img src="{% static '2022/images/kid-3.png' %}" alt="Dorzuć się!">
+            </figure>
+            <div class="p-homepage__info__box__content">
+              <p>
+                Jak budujemy najpopularniejszą <strong>bibliotekę online</strong> w Polsce
+              </p>
+              <a href="/info/jak-powstaja-wolne-lektury/" class="l-button l-button--default">Dowiedz się więcej</a>
+            </div>
+          </div>
+        </div>
+      </div>
+    </section>
+  </main>
+
+
+  <section class="l-section">
+    <div class="l-collections js-collections">
+      <div class="l-collections__header">
+        <h3><a href="/katalog/nowe/">Nowości</a></h3>
+        <div class="l-your-books__header__actions">
+          <button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
+          <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
+        </div>
+      </div>
+      <div class="l-books" style="display:block;">
+        {% for book in last_published %}
+          {% include 'catalogue/book_box.html' %}
+        {% endfor %}
+      </div>
+    </div>
+  </section>
+
+  <div class="l-container">
+    <section class="l-section">
+      <div class="p-homepage__uptodate">
+        <div class="p-homepage__uptodate__header">
+          <h3>Bądź na bieżąco</h3>
+          <ul>
+            <li>
+              <a href="https://www.facebook.com/wolnelektury/"
+                 title="Facebook" tabindex="-1" target="_blank">
+                <i class="icon icon-fb" aria-hidden="true"></i>
+              </a>
+            </li>
+            <li>
+              <a href="https://www.youtube.com/c/WolneLekturyYT/"
+                 title="YouTube" tabindex="-1" target="_blank">
+                <i class="icon icon-yt" aria-hidden="true"></i>
+              </a>
+            </li>
+            <li>
+              <a href="https://www.instagram.com/wolnelektury/"
+                 title="Instagram" tabindex="-1" target="_blank">
+                <i class="icon icon-ig" aria-hidden="true"></i>
+              </a>
+            </li>
+            <li>
+              <a href="https://twitter.com/wolnelektury"
+                 title="Twitter" tabindex="-1" target="_blank">
+                <i class="icon icon-tt" aria-hidden="true"></i>
+              </a>
+            </li>
+          </ul>
+        </div>
+
+        {% sponsor_page 'footer' %}
+
+      </div>
+    </section>
+  </div>
+
+{% endblock %}
index 4609321..79ac191 100644 (file)
@@ -1,27 +1,27 @@
-{% load i18n %}
-
 {% if is_paginated %}
-  <div class="pagination">
+  <div class="l-pagination">
     {% if page_obj.has_previous %}
-      <a href="?page={{ page_obj.previous_page_number }}{{ getvars }}" class="prev">&lsaquo;&lsaquo; {% trans "previous" %} </a>
-    {% else %}
-      <span class="disabled prev">&lsaquo;&lsaquo; {% trans "previous" %} </span>
+      <a href="?page={{ page_obj.previous_page_number }}{{ getvars }}" class="l-pagination__arrow">
+        <i class="icon icon-arrow-left"></i>
+      </a>
     {% endif %}
-    {% for page in pages %}
-      {% if page %}
-        {% if page == page_obj.number %}
-          <span class="current page"> {{ page }} </span>
+    <ul>
+      {% for page in pages %}
+        {% if page %}
+          {% if page == page_obj.number %}
+            <li class="is-active"><a>{{ page }}</a></li>
+          {% else %}
+            <li><a href="?page={{ page }}{{ getvars }}">{{ page }}</a></li>
+          {% endif %}
         {% else %}
-          <a href="?page={{ page }}{{ getvars }}" class="page"> {{ page }} </a>
+          <li><a>…</a></li>
         {% endif %}
-      {% else %}
-        …
-      {% endif %}
-    {% endfor %}
+      {% endfor %}
+    </ul>
     {% if page_obj.has_next %}
-      <a href="?page={{ page_obj.next_page_number }}{{ getvars }}" class="next"> {% trans "next" %} &rsaquo;&rsaquo;</a>
-    {% else %}
-      <span class="disabled next"> {% trans "next" %} &rsaquo;&rsaquo;</span>
+      <a href="?page={{ page_obj.next_page_number }}{{ getvars }}" class="l-pagination__arrow">
+        <i class="icon icon-arrow-right"></i>
+      </a>
     {% endif %}
   </div>
 {% endif %}
index dec60b6..45e65c6 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
index 150988a..e3d4eee 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 {% block settings %}
index 33ad875..03827a0 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 
index a74a473..112369c 100644 (file)
@@ -1,2 +1,2 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {# This is for allauth templates. #}
index 3817211..be4b4a2 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 
 
 {% block breadcrumbs %}
index ca9d564..7090651 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "2022/base_simple.html" %}
+{% extends "base_simple.html" %}
 {% load i18n %}
 
 
diff --git a/src/wolnelektury/templates/user_actions.html b/src/wolnelektury/templates/user_actions.html
new file mode 100644 (file)
index 0000000..28ea5e7
--- /dev/null
@@ -0,0 +1,40 @@
+{% load static %}
+
+{% if request.user.is_authenticated %}
+  <a href="/ludzie/polka/"><i class="icon icon-liked"></i></a>
+  <div id="user-menu">
+    <ul>
+      <li>
+        <a href="{% url 'user_settings' %}" tabindex="-1">
+          <strong>
+            {{ request.user.username }}
+          </strong>
+        </a>
+      </li>
+      {% if request.user.is_staff %}
+        <li><a href="{% url 'admin:index' %}" tabindex="-1">Administracja</a></li>
+        <li><a class='edit-links-toggle' href="#" tabindex="-1">Edycja</a></li>
+      {% endif %}
+      {% if request.user.membership %}
+        <li><a href="{% url 'club_join' %}">Wspierasz Wolne Lektury, dziękujemy!</a></li>
+      {% endif %}
+
+      <li><a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}" tabindex="-1">Wyloguj się</a></li>
+    </ul>
+  </div>
+  <a href="{% url 'user_settings' %}" class="user">
+    {% if request.user.is_staffs %}
+      <img src="{% static '2022/images/icons/user-staff.svg' %}">
+    {% elif request.user.membership %}
+      <img src="{% static '2022/images/icons/user-vip.svg' %}">
+    {% else %}
+      <img src="{% static '2022/images/icons/user.svg' %}">
+    {% endif %}
+  </a>
+{% else %}
+  <div class="l-navigation__login">
+    <a id="login-link" href='{% url 'login' %}?next={{ request.path }}'>Zaloguj się</a>
+    /
+    <a href='{% url 'register' %}?next={{ request.path }}'>Załóż konto</a>
+  </div>
+{% endif %}
index a7b48c2..1267e73 100644 (file)
@@ -38,7 +38,7 @@ def main_page(request):
     ctx['widget'] = settings.WIDGETS.get(request.GET.get('w'))
     if not ctx['widget'] and request.EXPERIMENTS['sowka'].value:
         ctx['widget'] = settings.WIDGETS['pan-sowka']
-    return render(request, '2022/main_page.html', ctx)
+    return render(request, 'main_page.html', ctx)
 
 
 class WLLoginView(LoginView):