{% load choose_cites from social_tags %}
-{% block content %}
+{% block global-content %}
<div class="l-container">
<div class="l-breadcrumb">
<a href="/"><span>Strona główna</span></a>
{% load likes_book from social_tags %}
-{% block content %}
+{% block global-content %}
<div class="l-container">
<div class="l-breadcrumb">
<a href="/"><span>Strona główna</span></a>
{% extends '2022/base_real.html' %}
{% load pagination_tags %}
-{% block content %}
+{% block global-content %}
<div class="l-container">
<div class="l-breadcrumb">
<a href="/"><span>Strona główna</span></a>
{% load static %}
-{% block content %}
+{% block global-content %}
<div class="l-container">
<div class="l-breadcrumb">
- <a href="#"><span>Strona główna</span></a>
- <a href="#"><span>Wesprzyj nas</span></a>
+ <a href="/"><span>Strona główna</span></a>
+ <span>Wesprzyj nas</span>
</div>
</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>
{% extends '2022/base.html' %}
-{% block content %}
+{% block global-content %}
<div class="l-container">
<div class="l-breadcrumb">
<a href="/"><span>Strona główna</span></a>
class SubscribeForm(NewsletterForm):
mailing = True
agree_newsletter = None
+ required_css_class = 'required'
email = EmailField(label=_('email address'))
-{% extends "2022/base.html" %}
+{% extends "2022/base_simple.html" %}
{% load i18n %}
{% load honeypot %}
+{% block settings %}
+ {% load title %}
+ {% title form.newsletter.page_title %}
+{% endblock %}
-{% block content %}
- <div class="l-container">
- <div class="l-breadcrumb">
- <a href="/"><span>Strona główna</span></a>
- <a>{{ page_title }}</a>
- </div>
- </div>
-
- <main class="l-main">
- <div class="l-checkout__box" style="margin-bottom: 70px;">
- <div class="l-checkout__box__header">
- <div class="l-checkout__box__header__content">
- <h1>{{ page_title }}</h1>
- </div>
- </div>
-
- <div class="l-checkout__cols">
- <div class="l-checkout__col"></div>
- <div class="l-checkout__col">
- <form method="post">
- <div class="l-checkout__form">
- {% csrf_token %}
- {% render_honeypot_field %}
- {{ form }}
- <div class="helptext">
- {{ form.data_processing }}
- </div>
+{% block content %}
+ <h1>{{ title }}</h1>
- <div class="l-checkout__form__row confirm">
- <div class="l-checkout__input">
- <button style="margin-left:0">Dalej</button>
- </div>
- </div>
+ <form method="post">
+ {% csrf_token %}
+ {% render_honeypot_field %}
+ {{ form }}
- </div>
- </form>
- </div>
- </div>
+ <div class="helptext">
+ {{ form.data_processing }}
</div>
- </main>
+
+ <button>Dalej</button>
+ </form>
{% endblock %}
-{% extends "2022/base.html" %}
+{% extends "2022/base_simple.html" %}
{% load i18n %}
-{% block content %}
- <div class="l-container">
- <div class="l-breadcrumb">
- <a href="/"><span>Strona główna</span></a>
- <a>{{ page_title }}</a>
- </div>
- </div>
- <main class="l-main">
- <div class="l-checkout__box" style="margin-bottom: 70px;">
- <div class="l-checkout__box__header">
- <div class="l-checkout__box__header__content">
- <h1>{{ page_title }}</h1>
- </div>
- </div>
+{% block settings %}
+ {% load title %}
+ {% trans "Subscribed" as title %}
+ {% title title %}
+{% endblock %}
+
+
+{% block content %}
+ <h1>{{ title }}</h1>
- <div class="l-checkout__cols">
- <div class="l-checkout__col"></div>
- <div class="l-checkout__col">
- {% trans "You have subscribed to Wolne Lektury newsletter." %}
- </div>
- </div>
- </div>
- </main>
+ <p>
+ {% trans "You have subscribed to Wolne Lektury newsletter." %}
+ </p>
{% endblock %}
if new_layout:
template_name = 'newsletter/2022/subscribe_form.html'
- form.template_name = '2022/form.html'
else:
template_name = 'newsletter/subscribe_form.html'
return render(request, template_name, {
class WLAuthenticationForm(AuthenticationForm):
- template_name = '2022/form.html'
+ required_css_class = 'required'
# has to be this order, because otherwise the form is lacking fields
class RegistrationForm(UserCreationForm, NewsletterForm):
+ required_css_class = 'required'
data_processing_part2 = '''\
Dane są przetwarzane w zakresie niezbędnym do prowadzenia serwisu, a także w celach prowadzenia statystyk, \
ewaluacji i sprawozdawczości. W przypadku wyrażenia dodatkowej zgody adres e-mail zostanie wykorzystany \
form {
- .required {
- label:before {
- content: "* ";
- color: #FF4C54;
- }
+ label.required:before {
+ content: "* ";
+ color: #FF4C54;
}
.helptext {
color: #808080;
}
}
+
+
+.page-simple {
+ margin-bottom: 70px;
+ padding-bottom: 30px;
+ border-radius: 10px;
+ background: #E1F1F2;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ .white-box {
+ // for legacy templates
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ }
+
+ h1 {
+ width: 100%;
+ margin: 0 0 50px 0;
+ padding: 32px 45px;
+ border-radius: 10px 10px 0 0;
+
+ font-style: italic;
+ font-weight: 300;
+ font-size: 48px;
+ line-height: 55px;
+ letter-spacing: -0.02em;
+ background: #083F4D;
+ color: #92BD39;
+ }
+
+ > p, form {
+ min-width: 300px;
+ margin-left: 50px;
+ margin-right: 50px;
+ }
+
+ button, input[type=submit] {
+ margin: 24px 0;
+ height: 56px;
+ background: #083F4D;
+ border-radius: 3px;
+ font-weight: 600;
+ font-size: 20px;
+ line-height: 25px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ color: #FFFFFF;
+ width: 340px;
+ }
+
+ label {
+ font-style: normal;
+ font-weight: 600;
+ font-size: 15px;
+ line-height: 160%;
+ color: #083F4D;
+ margin-top: 24px;
+ }
+
+ input {
+ display: block;
+ width: 100%;
+ height: 56px;
+ background: #FFFFFF;
+ color: black;
+ border: 1px solid #D5ECED;
+ border-radius: 3px;
+ transition: all cubic-bezier(0, 0, 0.2, 1) 250ms;
+ padding: 10px;
+ outline: 0;
+ }
+ input[type=checkbox], input[type=radio] {
+ display: inline;
+ float: left;
+ width: 1.2em;
+ height: 1.2em;
+ vertical-align: middle;
+ margin-right: 1em;
+ }
+}
{% load pipeline %}
{% load static %}
{% 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,initial-scale=1">
- <title>WolneLektury.pl</title>
+ <title>{% if title %}{{ title }} | {% endif %}WolneLektury.pl</title>
<link rel="apple-touch-icon" href="apple-touch-icon.png">
{% stylesheet '2022' %}
<script src="scripts/modernizr.js"></script>
<body>
{% include '2022/header.html' %}
- {% block content %}{% endblock %}
+ {% 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 %}
{% include '2022/footer.html' %}
--- /dev/null
+{% 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 %}
+++ /dev/null
-{% if errors %}
- {{ errors }}
- {% if not fields %}
- {% endif %}
-{% endif %}
-{% for field in hidden_fields %}{{ field }}{% endfor %}
-{% for field, errors in fields %}
- <div class="l-checkout__form__row {% if field.field.required %}required {% endif %} {{ field.css_classes }}">
- <div class="l-checkout__input">
- {{ errors }}
- {% if field.label %}{{ field.label_tag }}{% endif %}
- {# <span>*</span> #}
- {{ field }}
- {# field.help_text|safe #}
- </div>
- <div class="l-checkout__input">
- </div>
- </div>
-{% endfor %}
-{% extends "site_base.html" %}
+{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,site_base.html" %}
{% block body %}
<div class="white-box normal-text">
-{% extends "site_base.html" %}
+{% extends "openid/base.html" %}
+
{% load i18n %}
+{% block settings %}
+ {% load title %}
+ {% trans "OpenID Sign In" as title %}
+ {% title title %}
+{% endblock %}
+
+
+{% block breadcrumbs %}
+ <a href="{% url 'login' %}"><span>{% trans "Sign In" %}</span></a>
+ {{ block.super }}
+{% endblock %}
+
-{% block head_title %}{% trans "OpenID Sign In" %}{% endblock %}
+{% block head_title %}{% endblock %}
{% block body %}
<h1>{% trans 'OpenID Sign In' %}</h1>
<div class="normal-text white-box">
<form id="openid_login_form" class="openid_login" method="post" action="{% url 'openid_login' %}">
{% csrf_token %}
- <label for="id_openid">
- OpenID:
- </label><br>
- <input id="id_openid" type="text" class="textinput" name="openid" /><br><br>
- <button type="submit">{% trans "Sign In" %}</button>
+ <label for="id_openid" class="required">
+ OpenID:
+ </label><br>
+ <input id="id_openid" type="text" class="textinput" name="openid" /><br><br>
+ <button type="submit">{% trans "Sign In" %}</button>
</form>
</div>
{% endblock %}
-{% extends "2022/base.html" %}
+{% extends "2022/base_simple.html" %}
{% load i18n %}
+{% block settings %}
+ {% load title %}
+ {% trans 'Sign In' as title %}
+ {% title title %}
+{% endblock %}
+
+
+{% block sbreadcrumbs %}
+ <a>Zaloguj się</a>
+{% endblock %}
+
+{% block stitle %}Zaloguj się{% endblock %}
+
{% block content %}
- <div class="l-container">
- <div class="l-breadcrumb">
- <a href="/"><span>Strona główna</span></a>
- <a>Zaloguj się</a>
- </div>
- </div>
-
- <main class="l-main">
- <div class="l-checkout__box" style="margin-bottom: 70px;">
- <div class="l-checkout__box__header">
- <div class="l-checkout__box__header__content">
- <h1>Zaloguj się</h1>
- </div>
- </div>
- <div class="l-checkout__cols">
- <div class="l-checkout__col"></div>
- <div class="l-checkout__col">
- <form method="post">
- <div class="l-checkout__form">
- {% csrf_token %}
- {{ form }}
- <div class="l-checkout__form__row confirm">
- <div class="l-checkout__input">
- <button style="margin-left:0">Dalej</button>
- </div>
- </div>
-
- <a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
- </div>
- </form>
-
- {% if USE_OPENID %}
- <h3>{% trans "Sign in using:" %}</h3>
-
- <ul class="socialaccount_providers">
- {% include "socialaccount/snippets/provider_list.html" %}
- </ul>
-
- {% include "socialaccount/snippets/login_extra.html" %}
- {% endif %}
-
- </div>
- </div>
- </div>
- </main>
+ <h1>{{ title }}</h1>
+
+ <form method="post">
+ {% csrf_token %}
+ {{ form }}
+ <button>Dalej</button>
+
+ <a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
+
+ {% if USE_OPENID %}
+ <h3>{% trans "Sign in using:" %}</h3>
+
+ <ul class="socialaccount_providers">
+ {% include "socialaccount/snippets/provider_list.html" %}
+ </ul>
+
+ {% include "socialaccount/snippets/login_extra.html" %}
+ {% endif %}
+ </form>
{% endblock %}
--- /dev/null
+{% extends "2022/base_simple.html" %}
+{% load i18n %}
+
+
+{% block settings %}
+ {% load title %}
+ {% trans "Register" as title %}
+ {% title title %}
+{% endblock %}
+
+
+{% block simple-content %}
+ <form method="post">
+ {% csrf_token %}
+ {{ form.as_p }}
+ <button>{% trans "Register" %}</button>
+ <p class="helptext">{{ form.data_processing }}</p>
+
+ {% if USE_OPENID %}
+ <h3>{% trans "Sign in using:" %}</h3>
+
+ <ul class="socialaccount_providers">
+ {% include "socialaccount/snippets/provider_list.html" %}
+ </ul>
+
+ {% include "socialaccount/snippets/login_extra.html" %}
+ {% endif %}
+
+ </form>
+{% endblock %}
--- /dev/null
+{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,account/base.html" %}
+
+
+{% block breadcrumbs %}
+ <span>{% block head_title %}{% endblock %}</span>
+ {{ block.super }}
+{% endblock %}
--- /dev/null
+from django.template import Library
+
+
+register = Library()
+
+@register.simple_tag(takes_context=True)
+def title(context, t=None):
+ context.dicts[0]['title'] = t
+ return ''
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.views import LoginView
from django.core.cache import cache
+from django.views.generic import FormView
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.utils.translation import gettext_lazy as _
auth.login(request, form.get_user())
+class WLRegisterView(FormView):
+ form_class = RegistrationForm
+ template_name = 'registration/register.html'
+
+wl_register_view = WLRegisterView.as_view()
+
+
class RegisterFormView(AjaxableFormView):
form_class = RegistrationForm
template = "auth/register.html"
honeypot = True
def __call__(self, request):
+ if request.EXPERIMENTS['layout'].value:
+ return wl_register_view(request)
+
if request.user.is_authenticated:
return self.redirect_or_refresh(
request, '/',