mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 12:49:53 +00:00
deploy: a0ae4125c5
This commit is contained in:
parent
d91c983f14
commit
474ca4894a
4 changed files with 622 additions and 1 deletions
47
js/docs.js
47
js/docs.js
|
@ -1,4 +1,51 @@
|
|||
document.addEventListener("DOMContentLoaded", function () {
|
||||
if (window.location.pathname.endsWith('cli.html')) {
|
||||
const cliHeader = document.querySelector('h1')
|
||||
const demoSection = document.createElement('section')
|
||||
demoSection.id = 'demo'
|
||||
demoSection.innerHTML = `
|
||||
<div class="all-users">
|
||||
<div class="user alice">
|
||||
<h3>@alice</h3>
|
||||
<div class="terminal">
|
||||
<div class="display"></div>
|
||||
<div class="input"></div>
|
||||
<input type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="user bob">
|
||||
<h3>@bob</h3>
|
||||
<div class="terminal">
|
||||
<div class="display"></div>
|
||||
<div class="input"></div>
|
||||
<input type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="user tom">
|
||||
<h3>@tom</h3>
|
||||
<div class="terminal">
|
||||
<div class="display"></div>
|
||||
<div class="input"></div>
|
||||
<input type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<button class="run-demo">Run demo</button>
|
||||
<button class="run-faster">Faster!</button>
|
||||
<button class="try-it">Try it!</button>
|
||||
</div>
|
||||
`
|
||||
cliHeader.parentNode.insertBefore(demoSection, cliHeader.nextSibling)
|
||||
|
||||
const demoScript = document.createElement('script')
|
||||
demoScript.src = '/js/demo.js'
|
||||
document.body.appendChild(demoScript)
|
||||
|
||||
const demoStyles = document.createElement('link')
|
||||
demoStyles.rel = 'stylesheet'
|
||||
demoStyles.href = '/css/demo.css'
|
||||
document.head.appendChild(demoStyles)
|
||||
}
|
||||
|
||||
const imgs = document.querySelectorAll('p img')
|
||||
imgs.forEach(img => {
|
||||
console.log(img.height)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue