From ff21f9bc563f16fcde81eafccd38f212f22ba582 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 20 May 2021 09:24:33 +0200 Subject: [PATCH 1/1] Basic eink version. --- src/wolnelektury/context_processors.py | 3 +- src/wolnelektury/settings/custom.py | 5 + src/wolnelektury/static/scss/eink.scss | 140 ++++++++++++++++++ src/wolnelektury/static/scss/main.scss | 2 + .../templates/base/superbase.html | 2 +- 5 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 src/wolnelektury/static/scss/eink.scss diff --git a/src/wolnelektury/context_processors.py b/src/wolnelektury/context_processors.py index fb857baa6..8f763c9fc 100644 --- a/src/wolnelektury/context_processors.py +++ b/src/wolnelektury/context_processors.py @@ -8,5 +8,6 @@ def extra_settings(request): return { 'STATIC_URL': settings.STATIC_URL, 'FULL_STATIC_URL': request.build_absolute_uri(settings.STATIC_URL), - 'USE_OPENID': getattr(settings, 'USE_OPENID', False) + 'USE_OPENID': getattr(settings, 'USE_OPENID', False), + 'VARIANT': settings.VARIANTS.get(request.get_host()), } diff --git a/src/wolnelektury/settings/custom.py b/src/wolnelektury/settings/custom.py index af5661195..04cdd894b 100644 --- a/src/wolnelektury/settings/custom.py +++ b/src/wolnelektury/settings/custom.py @@ -45,3 +45,8 @@ AB_TESTS = { MESSAGING_MIN_DAYS = 2 NEWSLETTER_PHPLIST_SUBSCRIBE_URL = None + + +VARIANTS = { +} + diff --git a/src/wolnelektury/static/scss/eink.scss b/src/wolnelektury/static/scss/eink.scss new file mode 100644 index 000000000..50ffcfeac --- /dev/null +++ b/src/wolnelektury/static/scss/eink.scss @@ -0,0 +1,140 @@ +.media-eink{ + a { + } + + body { + background: white; + } + + #header-wrapper { + background: none; + + header#main { + background: none; + color: black; + + a { + color: black; + text-decoration: underline; + } + + #logo { + background-image: url('../img/logo-bez.png'); + background-size: contain; + background-position: 50%; + background-repeat: no-repeat; + + img { + opacity: 0; + } + } + + form#search-area { + background: none; + + #search-field { + right: 93px; + top: -1px; + + input#search { + box-sizing: border-box; + box-shadow: none; + border: 1px solid black; + border-radius: 0; + height: 45px; + &::placeholder { + opacity: 1; + color: black; + } + } + } + + button { + background: none; + color: black; + border: 1px solid black; + } + } + } + } + + #main-menu { + background: none; + } + + .book-mini-box { + .book-mini-box-inner, .white-box { + border: 1px solid black; + } + } + .white-box { + border: 1px solid black; + } + + + + + .book-wide-box { + .book-box-inner { + border: 1px solid black; + + .cite { + background: white; + border-width: 0 1px 1px 1px; + border-style: solid; + border-color: black; + } + } + } + + + + .book-box-tools { + .book-box-read { + a { + background: white; + color: black; + border: 1px solid black; + &:before { + filter: invert(1); + } + } + } + + .book-box-download a { + color: black; + &.downarrow { + color: black; + } + } + } + + + .plain-list a, .white-box a { + color: black; + text-decoration: underline; + } + + + #show-menu { + background: white; + color: black; + &:before, &:after { + border-color: black; + } + } + #menu { + background: white; + border-right: 3px solid black; + } + + + .annoy-banner { + background: white !important; + color: black !important; + border: 3px solid black; + } + +} + + diff --git a/src/wolnelektury/static/scss/main.scss b/src/wolnelektury/static/scss/main.scss index 9f0701fa3..ef45c793c 100644 --- a/src/wolnelektury/static/scss/main.scss +++ b/src/wolnelektury/static/scss/main.scss @@ -30,3 +30,5 @@ @import "polls/polls"; @import "social/shelf_tags"; + +@import "eink"; diff --git a/src/wolnelektury/templates/base/superbase.html b/src/wolnelektury/templates/base/superbase.html index e079a8ec8..0513a20c9 100644 --- a/src/wolnelektury/templates/base/superbase.html +++ b/src/wolnelektury/templates/base/superbase.html @@ -1,6 +1,6 @@ {% spaceless %} - + {% load pipeline i18n %} {% load static %} {% load catalogue_tags funding_tags reporting_stats %} -- 2.20.1