mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-21 19:41:33 +00:00
* add scroll-to-top and scroll class toggle with vanilla JS * add language detection * add i18n * Fix bug: there was no class hidden in CSS. Notice was hidden by hide(). Now HTML hidden attribute is used to hide notice using CSS. This improves A11y. * fix flashing of i18n notice and improve a11y * add menu highlighting on scroll * ♻️ remove jquery * defer app.js Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com> * remove DOMContentLoaded and fix root margin to 25% --------- Co-authored-by: bjohansebas <103585995+bjohansebas@users.noreply.github.com>
10 lines
593 B
HTML
10 lines
593 B
HTML
{% assign notice = site.data[page.lang].general.i18n_notice %}
|
|
{% assign lang_path = '/' | append: page.lang | append: '/' %}
|
|
{% if notice %}
|
|
{% assign notice_link_text = site.data[page.lang].general.i18n_notice_link_text %}
|
|
{% else %}
|
|
{% assign notice = site.data.en.general.i18n_notice %}
|
|
{% assign notice_link_text = site.data.en.general.i18n_notice_link_text %}
|
|
{% endif %}
|
|
<p>{{ notice }} <a href="{{ page.url | replace: lang_path, '/en/' }}">{{ notice_link_text}}</a>.</p>
|
|
<div id="close-i18n-notice-box" title="Close" role="button" aria-label="Close notice" tabindex="0">✖</div> |