unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Luis Felipe via Guix-patches via <guix-patches@gnu.org>
To: 44715@debbugs.gnu.org
Subject: [bug#44715] [PATCH] website: Restyle message box
Date: Tue, 17 Nov 2020 22:57:34 +0000	[thread overview]
Message-ID: <43MggAOQpBN3sdW8UrY3T8EnuVux7cI7OJFtW-5sUUROfD7ni3IjWRYJysNI94VofFx1lTycZXntgy7LZnVIimZqhpUz1TDEnk0yCQeC7KU=@protonmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

Hi, this is the change I proposed in #guix (https://logs.guix.gnu.org/guix/2020-11-09.log#233905).

---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-website-Restyle-message-box.patch --]
[-- Type: text/x-patch; name=0001-website-Restyle-message-box.patch, Size: 4875 bytes --]

From 764b90ff3314989a7d65777c14dbc100817e45c8 Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Tue, 17 Nov 2020 17:16:04 -0500
Subject: [PATCH] website: Restyle message box.

This change modifies the style of the message box so that it better
integrates with the style of the website, and fixes some contrast
issues.

* website/apps/base/templates/theme.scm (theme): Move the message box
  below the header and use the general style for messages instead of
  the specific "#confbar".

* website/static/base/css/common.css (#confbar, #confbar a): Remove
  them in favor of the general purpose ".message-box".

* website/static/base/css/messages.css (.message-box): Restyle, remove
  use of missing background image, inherit font size.
  (.message-box a): New rule.
  (.message-box > a:link, .message-box > a:visited): Replace with
  ".message-box a".
  (.msg-info): Use a darker blue for better contrast.
  (.msg-error): New rule.
  (.msg-warning): Use a purple background and leave red for
  ".msg-error" instead.
---
 website/apps/base/templates/theme.scm | 25 ++++++++-------
 website/static/base/css/common.css    | 11 -------
 website/static/base/css/messages.css  | 46 +++++++++++++++------------
 3 files changed, 39 insertions(+), 43 deletions(-)

diff --git a/website/apps/base/templates/theme.scm b/website/apps/base/templates/theme.scm
index 179adab..62ee6bb 100644
--- a/website/apps/base/templates/theme.scm
+++ b/website/apps/base/templates/theme.scm
@@ -118,19 +118,22 @@
 	     scripts))
 
      (body
-      (div (@ (id "confbar"))
-           (p ,(G_ `("Online conference November 22nd. "
-                     "Watch the "
-                     ,(G_ `(a
-			    (@ (href "https://xana.lepiller.eu/guix-days-2020/"))
-			    "pre-recorded talks"))
-                     ". Learn "
-                     ,(G_ `(a
-			    (@ (href ,(guix-url "blog/2020/online-guix-day-announce-2/")))
-			    "more"))
-                     "!"))))
       ,(navbar #:active-item active-menu-item)
 
+      ;; NOTE: Comment this message out when it is not needed anymore.
+      (div
+       (@ (class "message-box msg-info"))
+       (p ,(G_ `("Online conference November 22nd. "
+                 "Watch the "
+                 ,(G_ `(a
+			(@ (href "https://xana.lepiller.eu/guix-days-2020/"))
+			"pre-recorded talks"))
+                 ". Learn "
+                 ,(G_ `(a
+			(@ (href ,(guix-url "blog/2020/online-guix-day-announce-2/")))
+			"more"))
+                 "!"))))
+
       ,(if (null? crumbs) "" (breadcrumbs crumbs))
 
       ,content
diff --git a/website/static/base/css/common.css b/website/static/base/css/common.css
index 44e23c6..ee7a4e7 100644
--- a/website/static/base/css/common.css
+++ b/website/static/base/css/common.css
@@ -156,17 +156,6 @@
     background-repeat: repeat-x;
 }
 
-#confbar {
-    background-color: #542414;
-    color: #F5F5F5;
-    padding: 10px;
-    text-align: center;
-}
-
-#confbar a {
-    color: white;
-}
-
 
 
 @media screen and (min-width: 1280px) {
diff --git a/website/static/base/css/messages.css b/website/static/base/css/messages.css
index 0049c31..77f3c1b 100644
--- a/website/static/base/css/messages.css
+++ b/website/static/base/css/messages.css
@@ -1,38 +1,44 @@
 /*
     Public domain 2015 Luis Felipe López Acevedo. All rights waived.
     <felipe.lopez@openmailbox.org>
-   
+
     NOTE  The default style is targeted at screens with a width less than
           1024 pixels.
 */
 
 .message-box {
-    background-image: url("../img/msg-info-bg.png");
-    background-position: -5px -5px;
-    background-repeat: no-repeat;
-    color: white;
-    font-size: 12px;
-    padding: 20px;
+    box-shadow: inset 0px 0px 4px black;
+    color: #F5F5F5;
+    padding: 10px;
+    text-align: center;
 }
 
-.message-box > a:link, .message-box > a:visited {
-    border-color: white;
-    border-style: none none dotted none;
-    border-width: thin;
-    color: white;
-    text-decoration: none;
+.message-box a {
+    color: inherit;
 }
 
 .msg-info {
-    background-color: #5FBCD3;
+    background-color: #144054;
+}
+
+.msg-error {
+    background-color: #993838;
+}
+
+.msg-warning {
+    background-color: #54142C;
+}
+
+.msg-label {
+    font-weight: bold;
+    padding-right: 10px;
 }
+
 .donate-info {
     background-color: #FFFFFF;
     color: #000;
 }
-.msg-warning {
-    background-color: #D35F5F;
-}
+
 .donate-button {
     background-color: #F4BB15;
     padding: 5px;
@@ -40,15 +46,13 @@
     -moz-border-radius: 5px;
     border-radius: 5px;
 }
+
 .donate-button:hover {
     background-color: #F7CB50;
 }
+
 .donate-info > a:link, .donate-info > a:visited {
     color: #000;
     font-weight: bold;
     border: none;
 }
-.msg-label {
-    font-weight: bold;
-    padding-right: 10px;
-}

base-commit: de4f6efb24984c4b59d82d0fe080d37ba73de39f
-- 
2.28.0


             reply	other threads:[~2020-11-17 22:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 22:57 Luis Felipe via Guix-patches via [this message]
2020-11-21 11:35 ` bug#44715: [PATCH] website: Restyle message box Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='43MggAOQpBN3sdW8UrY3T8EnuVux7cI7OJFtW-5sUUROfD7ni3IjWRYJysNI94VofFx1lTycZXntgy7LZnVIimZqhpUz1TDEnk0yCQeC7KU=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=44715@debbugs.gnu.org \
    --cc=luis.felipe.la@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).