wip figures and images
This commit is contained in:
parent
ea235120f8
commit
c6bac45ecf
61 changed files with 1491 additions and 1315 deletions
|
@ -1,10 +1,25 @@
|
|||
const detailsElements = document.getElementsByTagName('details');
|
||||
|
||||
const save = () => {
|
||||
Array.from(detailsElements).forEach((details, i) => {
|
||||
localStorage.setItem(`details${i}`, details.hasAttribute('open'));
|
||||
});
|
||||
};
|
||||
|
||||
Array.from(detailsElements).forEach((details, i) => {
|
||||
details.toggleAttribute('open', JSON.parse(localStorage.getItem(`details${i}`)) || false);
|
||||
const isOpen = JSON.parse(localStorage.getItem(`details${i}`)) || false;
|
||||
details.toggleAttribute('open', isOpen);
|
||||
details.addEventListener('toggle', save);
|
||||
});
|
||||
|
||||
const svg = details.querySelector('summary svg');
|
||||
if (svg) {
|
||||
svg.style.transition = isOpen ? 'none' : '';
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
Array.from(detailsElements).forEach(details => {
|
||||
const svg = details.querySelector('summary svg');
|
||||
if (svg) svg.style.transition = '';
|
||||
});
|
||||
}, 100);
|
Loading…
Add table
Add a link
Reference in a new issue