瀏覽代碼

grid -> flex

master
Roderic Day 4 年之前
父節點
當前提交
8e49804ee3
共有 2 個檔案被更改,包括 11 行新增3 行删除
  1. +7
    -2
      pico.html
  2. +4
    -1
      pico.js

+ 7
- 2
pico.html 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存