From 0879d8cd255b6617e4c41e27fdec056e45e84ad2 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 21 Sep 2020 23:06:55 +0200 Subject: [PATCH 1/3] adjust right panel height --- .../src/app/ui/landing-page/landing-page.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide/src/app/ui/landing-page/landing-page.js b/apps/remix-ide/src/app/ui/landing-page/landing-page.js index 5fb0a700d0..2d57e7cec3 100644 --- a/apps/remix-ide/src/app/ui/landing-page/landing-page.js +++ b/apps/remix-ide/src/app/ui/landing-page/landing-page.js @@ -29,7 +29,7 @@ let css = csjs` flex-grow: 3; } .hpLogoContainer { - margin:30px; + margin: 30px; padding-right: 90px; } .mediaBadge { @@ -44,12 +44,16 @@ let css = csjs` height: 10em; } .hpSections { - min-width: 640px; + } + .rightPanel { + right: 0; + position: absolute; + z-index: 1000; } .remixHomeMedia { overflow-y: auto; overflow-x: hidden; - max-height: 570px; + max-height: 720px; } .panels { box-shadow: 0px 0px 17px -7px; @@ -107,6 +111,7 @@ export class LandingPage extends ViewPlugin { this.verticalIcons = verticalIcons this.gistHandler = new GistHandler() const themeQuality = globalRegistry.get('themeModule').api.currentTheme().quality + window.addEventListener('resize', () => this.adjustRightPanel()) this.twitterFrame = yo`
` + this.adjustRightPanel() globalRegistry.get('themeModule').api.events.on('themeChanged', (theme) => { console.log("theme is ", theme.quality) this.onThemeChanged(theme.quality) }) } + adjustRightPanel () { + this.twitterPanel.style.maxHeight = Math.max(window.innerHeight - 130, 200) + 'px' + this.mediumPanel.style.maxHeight = Math.max(window.innerHeight - 130, 200) + 'px' + } + onThemeChanged (themeQuality) { console.log("themes in listener is", themeQuality) let twitterFrame = yo` @@ -399,7 +410,7 @@ export class LandingPage extends ViewPlugin { -