JS menu delete autofocus, updates

This commit is contained in:
madrilene 2023-04-11 10:02:03 +02:00
parent f73a13226f
commit f8ffd5c423
6 changed files with 1077 additions and 1080 deletions

2128
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "eleventy-excellent",
"version": "1.4.6",
"version": "1.4.7",
"description": "Eleventy starter based on the workflow suggested by Andy Bell's buildexcellentwebsit.es.",
"author": "Lene Saile",
"license": "ISC",
@ -34,7 +34,7 @@
"@toycode/markdown-it-class": "^1.2.4",
"autoprefixer": "^10.4.13",
"clean-css": "^5.3.1",
"cssnano": "^5.1.7",
"cssnano": "^6.0.0",
"dayjs": "^1.11.5",
"dotenv": "^16.0.3",
"esbuild": "^0.17.0",
@ -56,7 +56,7 @@
"postcss-import": "^15.0.0",
"postcss-import-ext-glob": "^2.0.1",
"postcss-js": "^4.0.0",
"rimraf": "^4.0.5",
"rimraf": "^5.0.0",
"sanitize-html": "^2.7.2",
"slugify": "^1.6.5"
}

View file

@ -38,20 +38,6 @@ pre[class*='language-'] {
hyphens: none;
}
code[class*='language-']::-moz-selection,
pre[class*='language-']::-moz-selection,
code[class*='language-'] ::-moz-selection,
pre[class*='language-'] ::-moz-selection {
background: var(--color-dark);
}
code[class*='language-']::selection,
pre[class*='language-']::selection,
code[class*='language-'] ::selection,
pre[class*='language-'] ::selection {
background: var(--color-dark);
}
:not(pre) > code[class*='language-'] {
white-space: normal;
border-radius: var(--border-radius);

View file

@ -113,7 +113,7 @@ article [href^='http']:not([href*='eleventy-excellent.netlify.app'])::after {
/* Base selection styles that invert whatever colours are rendered */
::selection {
background: var(--color-dark);
background: var(--color-primary);
color: var(--color-light);
}

View file

@ -7,14 +7,13 @@ const svg = nav.querySelector('svg');
const button = burgerClone.querySelector('button');
button.addEventListener('click', e => {
const isOpen = button.getAttribute('aria-expanded') === 'false';
button.setAttribute('aria-expanded', isOpen);
const isOpen = button.getAttribute('aria-expanded') === 'true';
button.setAttribute('aria-expanded', !isOpen);
});
// avoid DRY: disabling menu
const disableMenu = () => {
button.setAttribute('aria-expanded', false);
button.focus();
};
// close on escape

View file

@ -7,4 +7,4 @@ youtube: true
This starter uses Justin Ribeiro's lite-youtube web component. Add `youtube: true` to frontmatter to activate.
{% youtube 'qvrNwWaNVGo', 'Alberto Ballesteros - Una Película A Medias' %}
{% youtube 'Ah6je_bBSH8', 'Alberto Ballesteros - Artista Sin Obra' %}