From dc2c2352118dbbfc42ec653af3801383aca5638c Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 24 Sep 2021 17:37:00 -0400 Subject: [PATCH] Update some styles to improve rendering on mobile * Add active links for nav on mobile * Smaller page margins for more edge to edge look --- server/styles.css | 12 ++++++++---- server/templates/community.hbs | 2 +- server/templates/partials/layout.hbs | 18 +++++++++++++----- server/templates/releases.hbs | 2 +- server/templates/team.hbs | 2 +- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/server/styles.css b/server/styles.css index 7fb6209947..33af3f1033 100644 --- a/server/styles.css +++ b/server/styles.css @@ -55,6 +55,10 @@ display: flex; } + .site-mobile-nav a.active { + font-weight: bold; + } + .text-columns-2 { -webkit-column-break-inside: avoid; page-break-inside: avoid; @@ -98,8 +102,8 @@ } .checkbox__control { - width: 1.5rem; - height: 1.5rem; + width: 30px; + height: 30px; } .checkbox__control svg { @@ -114,8 +118,8 @@ .checkbox__input input { opacity: 0; - width: 1.5rem; - height: 1.5rem; + width: 30px; + height: 30px; } .checkbox__input input:focus + .checkbox__control { diff --git a/server/templates/community.hbs b/server/templates/community.hbs index 6ef8cdd93f..4ff389952e 100644 --- a/server/templates/community.hbs +++ b/server/templates/community.hbs @@ -1,6 +1,6 @@ {{#> layout }} -
+

We’re building a community of passionate developers & advocates.

If you would like to get involved early, sign up for the our community below and we will let you know when it opens.

diff --git a/server/templates/partials/layout.hbs b/server/templates/partials/layout.hbs index 7506697659..1179a9482d 100644 --- a/server/templates/partials/layout.hbs +++ b/server/templates/partials/layout.hbs @@ -34,7 +34,7 @@
-
@@ -180,6 +180,14 @@ link.classList.add('active'); } } + const mnav = document.getElementById('mobile-nav'); + const mlinks = mnav.getElementsByTagName('a'); + const mcurrentPath = window.location.pathname; + for (const mlink of mlinks) { + if (mlink.getAttribute('href') === mcurrentPath) { + mlink.classList.add('active'); + } + } \ No newline at end of file diff --git a/server/templates/releases.hbs b/server/templates/releases.hbs index 4d3ff14eeb..ab02c16822 100644 --- a/server/templates/releases.hbs +++ b/server/templates/releases.hbs @@ -1,6 +1,6 @@ {{#> layout }} -
+
{{#if current_user}}

Releases

Zed is currently only available on macOS.

diff --git a/server/templates/team.hbs b/server/templates/team.hbs index 7d517d4343..70dceef690 100644 --- a/server/templates/team.hbs +++ b/server/templates/team.hbs @@ -1,6 +1,6 @@ {{#> layout }} -
+

We think there’s a better way to write code–and we've been working for more than a decade to bring it into existence.