This commit is contained in:
parent
456b3cb8c0
commit
4f964c7d2b
@ -36,5 +36,22 @@ const { title, authors, description } = Astro.props;
|
|||||||
plugins: [Highlight, Zoom, Notes],
|
plugins: [Highlight, Zoom, Notes],
|
||||||
});
|
});
|
||||||
deck.initialize();
|
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>
|
</script>
|
||||||
|
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@ -239,9 +239,13 @@ export const description =
|
|||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
<section>
|
<section>
|
||||||
<h2>Демонстрация тестового кода с перехватом основных сигналов</h2>
|
<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>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user