Make log viewer mobile-friendly

This commit is contained in:
osmarks 2018-10-06 11:45:14 +01:00
parent ab2760fb28
commit 99dcba1d80
1 changed files with 19 additions and 0 deletions

View File

@ -1,5 +1,19 @@
<div id="app"></div>
<style>
.mobile #app {
font-size: 2em;
}
.mobile #app input {
font-size: 1em;
padding: 0.3em;
}
.messages {
padding-left: 1em;
padding-right: 1em;
}
.messages li {
list-style-type: none;
font-family: monospace;
@ -223,4 +237,9 @@ const view = (state, actions) => ijk("nodeName", "attributes", "children")(
const main = hyperapp.app(state, actions, view, document.getElementById("app"))
main.connect()
// Detect mobile devices
if ("onorientationchange" in window) {
document.documentElement.classList.add("mobile")
}
</script>