Basic eink version.
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 20 May 2021 07:24:33 +0000 (09:24 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 20 May 2021 07:24:33 +0000 (09:24 +0200)
src/wolnelektury/context_processors.py
src/wolnelektury/settings/custom.py
src/wolnelektury/static/scss/eink.scss [new file with mode: 0644]
src/wolnelektury/static/scss/main.scss
src/wolnelektury/templates/base/superbase.html

index fb857ba..8f763c9 100644 (file)
@@ -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()),
     }
index af56611..04cdd89 100644 (file)
@@ -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 (file)
index 0000000..50ffcfe
--- /dev/null
@@ -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;
+    }
+
+}
+
+
index 9f0701f..ef45c79 100644 (file)
@@ -30,3 +30,5 @@
 @import "polls/polls";
 
 @import "social/shelf_tags";
+
+@import "eink";
index e079a8e..0513a20 100644 (file)
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 {% spaceless %}
-  <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
+  <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" class="{% if VARIANT %}VARIANT{% endif %}">
     {% load pipeline i18n %}
     {% load static %}
     {% load catalogue_tags funding_tags reporting_stats %}