zk_html/lj-dump/L-490.html

57 lines
2.4 KiB
HTML

<!doctype html>
<html>
<head>
<title>Zk | [no subject]</title>
<link rel="stylesheet" type="text/css" href="/style.css" />
<meta name="viewport" content="width=device-width" />
<meta charset="utf-8" />
</head>
<body>
<main>
<header>
<h1>Zk | [no subject]</h1>
</header>
<article class="content">
<p>More roommate troubles. More severe this time. He woke me up at around 5 (from a rather pleasant dream, mind you), and didn't go to bed until 5:45. For those forty-five minutes, he did everthing from spill a bottle of pills on the bathroom floor, inhale some noodles (at least, that's what it sounded like; loud hoovering noises from the other side of the room and a strong smell of Vegetal Bowl Noodle), brush his teeth, and talk to himself. Didn't get back to sleep until 6:30, so I'm a little tired and pissed at the moment. I think we need to have a talk when we're both awake at the same time, and I don't feel like biting his head off.</p>
<p>You'd think I'd have something better to write about in here, but really, I don't. Nothing worth sharing, at least</p>
<span class="control">Expand all</span>
</article>
<footer>
<p>Page generated on 2005-04-06 16:49:25</p>
</footer>
</main>
<script type="text/javascript">
document.querySelectorAll('li').forEach(el => {
if (el.querySelectorAll('li').length !== 0) {
el.classList.add('has-nested', 'closed');
el.innerHTML = `<span class="toggle"></span> ${el.innerHTML}`;
}
});
document.querySelectorAll('.toc .has-nested').forEach(el => {
el.classList.remove('has-nested', 'closed');
});
document.querySelectorAll('li.has-nested').forEach(el => {
el.querySelector('.toggle').addEventListener('click', () => {
el.classList.toggle('closed');
});
});
let expanded = false;
document.querySelector('.control').addEventListener('click', (e) => {
expanded = !expanded;
if (expanded) {
e.target.innerText = 'Collapse all';
} else {
e.target.innerText = 'Expand all';
}
document.querySelectorAll('.has-nested').forEach((el) => {
if (expanded) {
el.classList.remove('closed');
} else {
el.classList.add('closed')
}
});
});
</script>
</body>
</html>