unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: 63720@debbugs.gnu.org
Subject: [bug#63720] [PATCH] website: List languages in two columns.
Date: Thu, 25 May 2023 17:41:45 +0200	[thread overview]
Message-ID: <878rdcxvt2.fsf@pelzflorian.de> (raw)


* website/apps/base/templates/components.scm (navbar): Specify a CSS
class for the languages dropdown list.
* website/static/base/css/navbar.css (languages-dropdown-list): New
rule.
---

The translations dropdown is too long and high.  It seems to me
adjusting the number of columns dynamically and limiting the height is
not possible, unless we rewrite dropdowns to use CSS flexbox in <div>
elements instead of lists.  Instead, this patch sets a fixed column
number of two, which should be appropriate for the foreseeable future.

Also, there is only one languages dropdown, so this patch could
specify an id and not a new class for the languages dropdown.  But a
class works too and works always, so using a class seems better (?).

 website/apps/base/templates/components.scm | 3 ++-
 website/static/base/css/navbar.css         | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm
index 5f4af9c..241c27e 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix web site
-;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
+;;; Copyright © 2019, 2023 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
 ;;; Initially written by sirgazil who waives all
 ;;; copyright interest on this file.
@@ -501,6 +501,7 @@ manual.
       ,(menu-dropdown #:label (locale-display-name) #:active-item active-item
         #:items
         (append
+          (list '(@ (class "languages-dropdown-list")))
           (map-in-order
            (lambda (ietf-info)
              (let ((lingua (car ietf-info))
diff --git a/website/static/base/css/navbar.css b/website/static/base/css/navbar.css
index 974516a..c2dce90 100644
--- a/website/static/base/css/navbar.css
+++ b/website/static/base/css/navbar.css
@@ -117,6 +117,9 @@ label.menu-item {
     display: none;
 }
 
+.languages-dropdown-list {
+    columns: 2;
+}
 
 
 

base-commit: c4df5a59a97bce391e1be68dd8b4c1107cce4b23
-- 
2.39.2





             reply	other threads:[~2023-05-25 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 15:41 pelzflorian (Florian Pelz) [this message]
2023-06-05 12:47 ` [bug#63720] [PATCH] website: List languages in two columns Ludovic Courtès
2023-06-06  6:29   ` bug#63720: " pelzflorian (Florian Pelz)

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=878rdcxvt2.fsf@pelzflorian.de \
    --to=pelzflorian@pelzflorian.de \
    --cc=63720@debbugs.gnu.org \
    /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).