Remove accessibility info
This commit is contained in:
parent
a922a10303
commit
46c913a614
2 changed files with 115 additions and 5 deletions
2
en.html
2
en.html
|
|
@ -50,7 +50,7 @@
|
|||
<dt>Schedule</dt> <dd><a href="https://cfp.berlin.ccc.de">cfp.berlin.ccc.de</a></dd>
|
||||
<dt>Food</dt> <dd>Eternal breakfast, vegan</dd>
|
||||
<dt>Rules</dt> <dd><a href="coc-en.html">Code of Conduct</a></dd>
|
||||
<dt>Access</dt> <dd>About half of the club is accessible. The basement is not accessible. The toilets and the kitchen can only be reached over a threshold. There is no accessible toilet.</dd>
|
||||
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
118
index.html
118
index.html
|
|
@ -52,7 +52,7 @@
|
|||
<dt>Fahrplan</dt> <dd><a href="https://cfp.berlin.ccc.de">cfp.berlin.ccc.de</a></dd>
|
||||
<dt>Essen</dt> <dd>Ewiges Frühstück, vegan</dd>
|
||||
<dt>Regeln</dt> <dd><a href="coc.html">Code of Conduct</a></dd>
|
||||
<dt>Barrierefrei</dt> <dd>Etwa die Hälfte des Clubs ist barrierefrei. Der Keller ist nicht barrierefrei. Toiletten und Küche sind nur über eine Schwelle erreichbar. Es gibt keine behindertengerechte Toilette.</dd>
|
||||
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
|
|
@ -97,11 +97,121 @@
|
|||
</section>
|
||||
|
||||
<footer>
|
||||
<a href="https://berlin.ccc.de/page/impressum/">Impressum</a> ·
|
||||
<a href="https://berlin.ccc.de/">CCC Berlin</a>
|
||||
<p class="prompt"><b>visitor@khaos-im-kiez</b>:~$ <span class="cursor"></span></p>
|
||||
<p>
|
||||
<a href="https://berlin.ccc.de/page/impressum/">Impressum</a> ·
|
||||
<a href="https://berlin.ccc.de/">CCC Berlin</a>
|
||||
</p>
|
||||
<p class="prompt"><b>visitor@khaos-im-kiez</b>:~$ <span id="term-input"></span><span class="cursor"></span></p>
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
<script>
|
||||
(function(){
|
||||
const term = document.getElementById('term-input');
|
||||
if(!term) return;
|
||||
let buf = '';
|
||||
let ws = null;
|
||||
let connected = false;
|
||||
let firstEnter = true;
|
||||
|
||||
function appendOutput(text){
|
||||
if(!text) return;
|
||||
// append to term display (simple)
|
||||
term.textContent += text;
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e){
|
||||
const t = e.target;
|
||||
if(t && (t.tagName === 'INPUT' || t.tagName === 'TEXTAREA' || t.isContentEditable)) return;
|
||||
if(e.ctrlKey || e.altKey || e.metaKey) return;
|
||||
|
||||
if(e.key === 'Backspace'){
|
||||
e.preventDefault();
|
||||
if(connected && ws && ws.readyState === WebSocket.OPEN){
|
||||
ws.send('\b');
|
||||
return;
|
||||
}
|
||||
buf = buf.slice(0, -1);
|
||||
term.textContent = buf;
|
||||
return;
|
||||
}
|
||||
if(e.key === 'Enter'){
|
||||
e.preventDefault();
|
||||
if(firstEnter && !connected){
|
||||
// open ssh over websocket connection with username/password auth
|
||||
// keep connection open; run command after connection
|
||||
const line = buf;
|
||||
buf = '';
|
||||
firstEnter = false;
|
||||
term.textContent = term.textContent + '\n';
|
||||
// try to connect - endpoint can be configured
|
||||
const wsUrl = (location.protocol === 'https:' ? 'wss://' : 'ws://') + location.host + '/ssh';
|
||||
try {
|
||||
ws = new WebSocket(wsUrl);
|
||||
ws.onopen = function(){
|
||||
connected = true;
|
||||
// send auth info and/or initial command
|
||||
try {
|
||||
ws.send(JSON.stringify({type:'auth', line: line}));
|
||||
} catch(err) {
|
||||
ws.send(line + '\n');
|
||||
}
|
||||
ws.send('\n'); // run command/start shell
|
||||
};
|
||||
ws.onmessage = function(ev){
|
||||
appendOutput(ev.data);
|
||||
};
|
||||
ws.onclose = function(){
|
||||
connected = false;
|
||||
};
|
||||
ws.onerror = function(){
|
||||
connected = false;
|
||||
};
|
||||
} catch(err) {
|
||||
// fallback
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(connected && ws && ws.readyState === WebSocket.OPEN){
|
||||
ws.send('\r');
|
||||
term.textContent = term.textContent + '\n';
|
||||
return;
|
||||
}
|
||||
buf += '\n';
|
||||
term.textContent = buf;
|
||||
return;
|
||||
}
|
||||
if(e.key === 'Escape'){
|
||||
e.preventDefault();
|
||||
if(connected && ws && ws.readyState === WebSocket.OPEN){
|
||||
ws.send('\x1b');
|
||||
return;
|
||||
}
|
||||
buf = '';
|
||||
term.textContent = buf;
|
||||
return;
|
||||
}
|
||||
if(e.key === 'Tab'){
|
||||
e.preventDefault();
|
||||
if(connected && ws && ws.readyState === WebSocket.OPEN){
|
||||
ws.send('\t');
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(e.key.length === 1){
|
||||
e.preventDefault();
|
||||
if(connected && ws && ws.readyState === WebSocket.OPEN){
|
||||
ws.send(e.key);
|
||||
// don't echo locally if server echoes; but keep simple
|
||||
return;
|
||||
}
|
||||
buf += e.key;
|
||||
term.textContent = buf;
|
||||
return;
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue