diff --git a/web/src/_templates/app/js.php b/web/src/_templates/app/js.php index ad34727..9c11671 100644 --- a/web/src/_templates/app/js.php +++ b/web/src/_templates/app/js.php @@ -22,4 +22,7 @@ var app = { collapse_text_size: 80, }, }; +var cssprops = { + meet_max_width: '40em', +}; diff --git a/web/src/app/app.php b/web/src/app/app.php index c4aed3c..5b14c5f 100644 --- a/web/src/app/app.php +++ b/web/src/app/app.php @@ -16,16 +16,13 @@ $actor = $database->getActorByUsername($user->username); 'actor' => $actor, ]) ?> -
diff --git a/web/src/app/css/app.css b/web/src/app/css/app.css index 81b9dfa..5e5a49b 100644 --- a/web/src/app/css/app.css +++ b/web/src/app/css/app.css @@ -106,7 +106,7 @@ main { } .meet.item { - max-width: 40em; + max-width: var(--meet_max_width); } .meet.item .back-avatar { display: grid; @@ -135,7 +135,10 @@ main { position: relative; top: 3px; } -.meet.item .status { color: #fff } +.meet.item .status { + color: #fff; + max-width: var(--meet_max_width); +} .meet.item .status-content { box-shadow: 0px 2px 1px #0000008c; margin-bottom: 1em; @@ -145,6 +148,7 @@ main { display: flex; top: 0; height: 100%; + width: var(--meet_max_width); z-index: 10; } .meet.item .status-content.full .text { margin: auto !important } diff --git a/web/src/app/js/base.js b/web/src/app/js/base.js index 8f66d17..f10be47 100644 --- a/web/src/app/js/base.js +++ b/web/src/app/js/base.js @@ -253,3 +253,14 @@ function calcHeightMobile() { } window.addEventListener('load', function(e) { calcHeightMobile() }); window.addEventListener('resize', function(e) { calcHeightMobile() }); +(function() { + if (window.cssprops !== undefined) { + const keys = Object.keys(window.cssprops); + for (var i in keys) { + const k = keys[i]; + document.querySelector(':root').style + .setProperty('--'+k, window.cssprops[k]); + } + window.cssprops = undefined; + } +})(); diff --git a/web/src/app/js/templates/meet/item.html b/web/src/app/js/templates/meet/item.html index 076eed9..0373f9c 100644 --- a/web/src/app/js/templates/meet/item.html +++ b/web/src/app/js/templates/meet/item.html @@ -12,7 +12,7 @@