Browse Source

grid -> flex

master
Roderic Day 4 years ago
parent
commit
8e49804ee3
2 changed files with 11 additions and 3 deletions
  1. +7
    -2
      pico.html
  2. +4
    -1
      pico.js

+ 7
- 2
pico.html View File

@@ -41,8 +41,13 @@ header {
}
main {
overflow: hidden;
display: grid;
grid-auto-flow: column;
display: flex;
}
.videos {
flex: 1;
}
.screen-share {
flex: 10;
}
</style>
<body>PicoChat requires JS</body>

+ 4
- 1
pico.js View File

@@ -185,6 +185,9 @@ const Base = {
autocomplete: 'off',
value: localStorage.username,
}
const style = {
flexDirection: innerWidth > innerHeight ? 'row' : 'column',
}
return [
m('header',
State.isConnected
@@ -197,7 +200,7 @@ const Base = {
),
],
),
m('main',
m('main', {style},
State.isConnected
? Apps.map(a => m(...a))
: [

Loading…
Cancel
Save