Skip to content

Commit 1917b49

Browse files
chore: refactor footer and header icons (#1962)
* refactor footer * fix icons layout * remove font awesome icons * refactor header icons * redeploy netlify preview * use absolute path for a svg icons * replace img elements with CSS background-image and mask-image for theme icons * fix bugs and remove unused css classes * apply thin scroller for tables (chrome) * inherit colors for footer social icons * simplify openjs icon * use openjs white logo * simplify theme icons * fix theme icons * fix background color * fix bugs and refactor theme.js * remove color flicker * fix bugs and refactor theme.js * refactor * remove comments from svg * legacy fix: alignment of icons
1 parent 35b4b3b commit 1917b49

20 files changed

+202
-161
lines changed

_includes/footer.html

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@
33
<footer>
44
<section id="footer-content">
55
<div id="footer-copyright">
6-
<a href="https://openjsf.org/">
7-
<img
8-
src="https://raw.githubusercontent.com/openjs-foundation/artwork/main/openjs_foundation/openjs_foundation-logo-horizontal-color.svg"
9-
alt="OpenJS Foundation" width="125" height="39" class="hidden-dark" />
10-
<img
11-
src="https://raw.githubusercontent.com/openjs-foundation/artwork/main/openjs_foundation/openjs_foundation-logo-horizontal-white.svg"
12-
alt="OpenJS Foundation" width="125" height="39" class="hidden-light" />
6+
<a href="https://openjsf.org/" class="openjs-logo" title="OpenJS Foundation">
7+
{% include icons/openjs_foundation-logo-horizontal-white.svg %}
138
</a>
149
<div id="footer-policy">
1510
<a href="https://terms-of-use.openjsf.org">
@@ -33,44 +28,36 @@
3328
<div class="footer-social">
3429
<div>
3530
<a href="https://github.com/expressjs/express" aria-label="Go to the repository on GitHub">
36-
<span class="hidden-dark">
37-
{% include icons/github-light.svg %}
38-
</span>
39-
<span class="hidden-light">
40-
{% include icons/github-dark.svg %}
41-
</span>
31+
{% include icons/github.svg %}
4232
</a>
4333
</div>
4434
<div>
4535
<a href="https://www.youtube.com/channel/UCYjxjAeH6TRik9Iwy5nXw7g"
46-
aria-label="Go to the repository on Youtube">{% include icons/youtube.svg %}</a>
36+
aria-label="Go to the repository on Youtube">
37+
{% include icons/youtube.svg %}</a>
4738
</div>
4839
<div>
49-
<a href="https://x.com/UseExpressJS" aria-label="Go to the repository on X">
50-
<span class="hidden-dark">
51-
{% include icons/x-light.svg %}
52-
</span>
53-
<span class="hidden-light">
54-
{% include icons/x-dark.svg %}
55-
</span>
40+
<a href="https://x.com/UseExpressJS" aria-label="Go to the X account">
41+
{% include icons/X.svg %}
5642
</a>
5743
</div>
5844
<div>
5945
<a href="https://openjs-foundation.slack.com/archives/C02QB1731FH"
60-
aria-label="Go to the repository on Slack">{% include icons/slack.svg %}</a>
46+
aria-label="Join Slack group">
47+
{% include icons/slack.svg %}</a>
6148
</div>
6249
<div>
63-
<a href="https://opencollective.com/express" aria-label="Go to the repository on Open Collective">{% include
50+
<a href="https://opencollective.com/express" aria-label="Go to Open Collective">{% include
6451
icons/opencollective.svg %}</a>
6552
</div>
6653
<div>
67-
<a href="https://bsky.app/profile/expressjs.bsky.social" aria-label="Go to the repository on Bluesky">{%
54+
<a href="https://bsky.app/profile/expressjs.bsky.social" aria-label="Go to the Bluesky">{%
6855
include icons/bluesky.svg %}</a>
6956
</div>
7057
</div>
7158
<a href="https://www.netlify.com">
72-
<img src="https://www.netlify.com/v3/img/components/netlify-color-accent.svg" alt="Preview Deploys by Netlify"
73-
width="80" />
59+
<img src="https://www.netlify.com/v3/img/components/netlify-color-accent.svg" alt="Preview Deploys by Netlify"
60+
width="80" />
7461
</a>
7562
</div>
7663
</section>

_includes/head.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
<link rel="stylesheet" href="/css/themes/dark-theme.css?_={{ site.time | date: '%s' }}">
3636
<link rel="stylesheet" href="/css/style.css?_={{ site.time | date: '%s' }}">
3737
<link rel="stylesheet" href="/css/sintax.css?_={{ site.time | date: '%s' }}">
38-
<link rel="stylesheet" href="/css/font-awesome.min.css">
3938
<link rel="stylesheet" href="/css/langs/{{ page.lang }}.css">
4039
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4140
<meta name="description" content="{{page.description}}">

_includes/header.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<header>
22
<div id="mobile-menu">
3-
<div id="nav-button" class="fa fa-bars fa-2x button"></div>
3+
<div id="nav-button" class="header-btn">
4+
{% include icons/hamburger.svg %}
5+
</div>
46
</div>
57
<div class="logo-container">
68
<a href="/" title="Go to homepage" aria-label="Go to homepage">
@@ -245,9 +247,9 @@
245247
</ul>
246248
</nav>
247249
<div class="header-right">
248-
<button id="theme-toggle" type="button" class="theme-btn" title="change theme">
249-
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
250-
<span class="sun-icon hidden-light"></span>
250+
<button id="theme-toggle" type="button" class="theme-btn" title="change theme" aria-label="Switch to dark mode">
251+
<span id="icon-moon">{% include icons/moon.svg %}</span>
252+
<span id="icon-sun">{% include icons/sun.svg %}</span>
251253
</button>
252254
{% include language-picker.html %}
253255
{% include language-picker-mobile.html %}

_includes/icons/X.svg

Lines changed: 1 addition & 0 deletions
Loading

_includes/icons/github-dark.svg

Lines changed: 0 additions & 11 deletions
This file was deleted.

_includes/icons/github-light.svg

Lines changed: 0 additions & 11 deletions
This file was deleted.

_includes/icons/github.svg

Lines changed: 1 addition & 1 deletion
Loading

_includes/icons/hamburger.svg

Lines changed: 5 additions & 0 deletions
Loading

_includes/icons/i18n.svg

Lines changed: 3 additions & 0 deletions
Loading

_includes/icons/moon.svg

Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)