chore(*): try example
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Карпич Дмитрий Александрович 2025-05-28 15:19:12 +03:00
parent 456b3cb8c0
commit 4f964c7d2b
2 changed files with 22 additions and 1 deletions

View File

@ -36,5 +36,22 @@ const { title, authors, description } = Astro.props;
plugins: [Highlight, Zoom, Notes],
});
deck.initialize();
document.addEventListener('DOMContentLoaded', async function() {
const codeBlocks = document.querySelectorAll('code[data-external]');
for (const block of codeBlocks) {
try {
const response = await fetch(block.dataset.external);
const code = await response.text();
block.textContent = code;
} catch (error) {
block.textContent = '⚠️ Error loading code: ' + error.message;
}
}
});
</script>
</Layout>

View File

@ -239,9 +239,13 @@ export const description =
</section>
</section>
<section>
<section>
<h2>Демонстрация тестового кода с перехватом основных сигналов</h2>
<p>Переходим к коду.</p>
</section>
<section>
<pre><code class="javascript" data-external="https://gitea.meettya.ru/Meettya/signal-slides/raw/branch/main/example/server.cjs"></code></pre>
</section>
</section>
<section>