JS menu delete autofocus, updates
This commit is contained in:
parent
f73a13226f
commit
f8ffd5c423
6 changed files with 1077 additions and 1080 deletions
2128
package-lock.json
generated
2128
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "eleventy-excellent",
|
"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.",
|
"description": "Eleventy starter based on the workflow suggested by Andy Bell's buildexcellentwebsit.es.",
|
||||||
"author": "Lene Saile",
|
"author": "Lene Saile",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
"@toycode/markdown-it-class": "^1.2.4",
|
"@toycode/markdown-it-class": "^1.2.4",
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.13",
|
||||||
"clean-css": "^5.3.1",
|
"clean-css": "^5.3.1",
|
||||||
"cssnano": "^5.1.7",
|
"cssnano": "^6.0.0",
|
||||||
"dayjs": "^1.11.5",
|
"dayjs": "^1.11.5",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"esbuild": "^0.17.0",
|
"esbuild": "^0.17.0",
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
"postcss-import": "^15.0.0",
|
"postcss-import": "^15.0.0",
|
||||||
"postcss-import-ext-glob": "^2.0.1",
|
"postcss-import-ext-glob": "^2.0.1",
|
||||||
"postcss-js": "^4.0.0",
|
"postcss-js": "^4.0.0",
|
||||||
"rimraf": "^4.0.5",
|
"rimraf": "^5.0.0",
|
||||||
"sanitize-html": "^2.7.2",
|
"sanitize-html": "^2.7.2",
|
||||||
"slugify": "^1.6.5"
|
"slugify": "^1.6.5"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,20 +38,6 @@ pre[class*='language-'] {
|
||||||
hyphens: none;
|
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-'] {
|
:not(pre) > code[class*='language-'] {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ article [href^='http']:not([href*='eleventy-excellent.netlify.app'])::after {
|
||||||
|
|
||||||
/* Base selection styles that invert whatever colours are rendered */
|
/* Base selection styles that invert whatever colours are rendered */
|
||||||
::selection {
|
::selection {
|
||||||
background: var(--color-dark);
|
background: var(--color-primary);
|
||||||
color: var(--color-light);
|
color: var(--color-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,13 @@ const svg = nav.querySelector('svg');
|
||||||
|
|
||||||
const button = burgerClone.querySelector('button');
|
const button = burgerClone.querySelector('button');
|
||||||
button.addEventListener('click', e => {
|
button.addEventListener('click', e => {
|
||||||
const isOpen = button.getAttribute('aria-expanded') === 'false';
|
const isOpen = button.getAttribute('aria-expanded') === 'true';
|
||||||
button.setAttribute('aria-expanded', isOpen);
|
button.setAttribute('aria-expanded', !isOpen);
|
||||||
});
|
});
|
||||||
|
|
||||||
// avoid DRY: disabling menu
|
// avoid DRY: disabling menu
|
||||||
const disableMenu = () => {
|
const disableMenu = () => {
|
||||||
button.setAttribute('aria-expanded', false);
|
button.setAttribute('aria-expanded', false);
|
||||||
button.focus();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// close on escape
|
// close on escape
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,4 @@ youtube: true
|
||||||
|
|
||||||
This starter uses Justin Ribeiro's lite-youtube web component. Add `youtube: true` to frontmatter to activate.
|
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' %}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue