From: Radek Czajka Date: Fri, 1 Jul 2022 11:42:37 +0000 (+0200) Subject: infopage X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/06175c1d644d5a6f3093c945f18d6b3c33cc8d46 infopage --- diff --git a/src/catalogue/templates/catalogue/2022/book_detail.html b/src/catalogue/templates/catalogue/2022/book_detail.html index 118a05941..052782354 100644 --- a/src/catalogue/templates/catalogue/2022/book_detail.html +++ b/src/catalogue/templates/catalogue/2022/book_detail.html @@ -1,65 +1,12 @@ - -{% load pipeline %} +{% extends '2022/base_real.html' %} + {% load static %} {% load choose_cites from social_tags %} -{% load choose_fragment license_icon from catalogue_tags %} {% load catalogue_tags %} {% load likes_book from social_tags %} -{% load piwik_tags %} - - - - - - - - WolneLektury.pl - - - {% stylesheet '2022' %} - - - - - - - {% tracking_code %} - - - - +{% block content %}
@@ -492,50 +441,5 @@
- - - - - {% javascript '2022' %} - {% javascript '2022_player' %} - - - - +{% endblock %} diff --git a/src/infopages/templates/infopages/2022/infopage.html b/src/infopages/templates/infopages/2022/infopage.html new file mode 100644 index 000000000..78679084f --- /dev/null +++ b/src/infopages/templates/infopages/2022/infopage.html @@ -0,0 +1,29 @@ +{% extends '2022/base.html' %} + + +{% block content %} +
+ +
+ + +
+
+

{{ page.title }}

+
+
+
+
+ {{ left_column }} +
+
+ {{ right_column }} +
+
+
+
+ +{% endblock %} diff --git a/src/infopages/views.py b/src/infopages/views.py index 0713a16e8..5c19e72e6 100644 --- a/src/infopages/views.py +++ b/src/infopages/views.py @@ -9,6 +9,9 @@ from infopages.models import InfoPage def infopage(request, slug): page = get_object_or_404(InfoPage, slug=slug) + + new_layout = request.EXPERIMENTS['layout'] + rc = RequestContext(request) try: left_column = Template(page.left_column).render(rc) @@ -20,9 +23,13 @@ def infopage(request, slug): except TemplateSyntaxError: right_column = '' - return render(request, 'infopages/infopage.html', { - 'page': page, - 'left_column': left_column, - 'right_column': right_column, - 'active_menu_item': f'info:{slug}', - }) + return render( + request, + 'infopages/2022/infopage.html' if new_layout.value else 'infopages/infopage.html', + { + 'page': page, + 'left_column': left_column, + 'right_column': right_column, + 'active_menu_item': f'info:{slug}', + } + ) diff --git a/src/wolnelektury/static/2022/images/fav2.svg b/src/wolnelektury/static/2022/images/fav2.svg new file mode 100644 index 000000000..8bae3cc27 --- /dev/null +++ b/src/wolnelektury/static/2022/images/fav2.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + diff --git a/src/wolnelektury/static/2022/images/logo.svg b/src/wolnelektury/static/2022/images/logo.svg new file mode 100644 index 000000000..984a919b5 --- /dev/null +++ b/src/wolnelektury/static/2022/images/logo.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wolnelektury/static/2022/styles/layout/_article.scss b/src/wolnelektury/static/2022/styles/layout/_article.scss index fb7b0e7b4..9930b5917 100644 --- a/src/wolnelektury/static/2022/styles/layout/_article.scss +++ b/src/wolnelektury/static/2022/styles/layout/_article.scss @@ -25,7 +25,7 @@ font-weight: bolder; } - ol { + .toc ol { padding: 0; list-style: none; margin-top: 0.25rem; @@ -41,8 +41,138 @@ color: #007880; } } + + video { + margin-bottom: 30px; + } + + textarea[readonly] { + margin-bottom: 30px; + background: #052A33; + border-radius: 10px; + width: 100%; + min-height: 119px; + padding: 10px; + resize: none; + color: #92BD39; + font-family: 'Consolas', monospace; + font-style: normal; + font-weight: 400; + font-size: 16px; + line-height: 150%; + } +} + +.l-article__cols { + display: flex; + + .left-column { + padding-right: 27px; + } + + .right-column { + padding-left: 27px; + } + + .left-column, + .right-column { + width: 50%; + + p { + margin-top: 0; + margin-bottom: 30px; + @include font-size(18px); + line-height: 150%; + + strong, b { + font-weight: $semibold; + } + + a { + color: $color-primary; + &:hover { + text-decoration: underline; + } + } + } + + h3 { + margin-top: 0; + margin-bottom: 30px; + border-bottom: 0; + padding-bottom: 0; + font-weight: $semibold; + @include font-size(25px); + line-height: 140%; + letter-spacing: -0.01em; + color: #474747; + } + + h4 { + display: flex; + align-items: center; + font-weight: $semibold; + @include font-size(21px); + line-height: 140%; + letter-spacing: -0.01em; + color: #474747; + + img { + margin-right: 15px; + } + + & + p { + margin-top: 15px; + margin-bottom: 50px; + } + + &:first-of-type { + margin-top: 0; + } + } + + ul, ol { + li { + font-weight: $regular; + @include font-size(18px); + line-height: 150%; + + strong, b { + font-weight: $semibold; + } + + a { + color: $color-primary; + &:hover { + text-decoration: underline; + } + } + } + } + + & > img { + max-width: 100%; + margin-bottom: 30px; + } + } } +.l-article__title { + margin-top: 28px; + margin-bottom: 38px; + padding-bottom: 20px; + border-bottom: 1px solid #D9D9D9; + * { + margin-top: 0; + font-weight: $regular; + @include font-size(37px); + line-height: 130%; + letter-spacing: -0.01em; + color: #083F4D; + } +} + + .l-article__overlay { display: flex; flex-direction: column; diff --git a/src/wolnelektury/templates/2022/base.html b/src/wolnelektury/templates/2022/base.html new file mode 100644 index 000000000..6d9a056f5 --- /dev/null +++ b/src/wolnelektury/templates/2022/base.html @@ -0,0 +1,4 @@ +{% extends "2022/base_real.html" %} + + +{% block ogtitle %}{% block titleextra %}{{ page_title }}{% endblock %}{% endblock %} diff --git a/src/wolnelektury/templates/2022/base_real.html b/src/wolnelektury/templates/2022/base_real.html new file mode 100644 index 000000000..5993bec59 --- /dev/null +++ b/src/wolnelektury/templates/2022/base_real.html @@ -0,0 +1,36 @@ + +{% load pipeline %} +{% load static %} +{% load piwik_tags %} + + + + + + + WolneLektury.pl + + {% stylesheet '2022' %} + + + + + + + {% tracking_code %} + + + {% include '2022/header.html' %} + + {% block content %}{% endblock %} + + {% include '2022/footer.html' %} + + + + + {% javascript '2022' %} + {% javascript '2022_player' %} + {% include '2022/hotjar.html' %} + + diff --git a/src/wolnelektury/templates/2022/footer.html b/src/wolnelektury/templates/2022/footer.html new file mode 100644 index 000000000..33368a670 --- /dev/null +++ b/src/wolnelektury/templates/2022/footer.html @@ -0,0 +1,30 @@ +{% load static %} + + diff --git a/src/wolnelektury/templates/2022/header.html b/src/wolnelektury/templates/2022/header.html new file mode 100644 index 000000000..ed971540b --- /dev/null +++ b/src/wolnelektury/templates/2022/header.html @@ -0,0 +1,33 @@ +{% load static %} + + diff --git a/src/wolnelektury/templates/2022/hotjar.html b/src/wolnelektury/templates/2022/hotjar.html new file mode 100644 index 000000000..3e41800e3 --- /dev/null +++ b/src/wolnelektury/templates/2022/hotjar.html @@ -0,0 +1,11 @@ + +