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 4e231e016b..d7b88b4b24 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 @@ -1,3 +1,6 @@ +import * as packageJson from '../../../../../../package.json' +import { ViewPlugin } from '@remixproject/engine' + let yo = require('yo-yo') let csjs = require('csjs-inject') let globalRegistry = require('../../../global/registry') @@ -6,8 +9,6 @@ var modalDialogCustom = require('../modal-dialog-custom') var tooltip = require('../tooltip') var GistHandler = require('../../../lib/gist-handler') var QueryParams = require('../../../lib/query-params.js') -import * as packageJson from '../../../../../../package.json' -import { ViewPlugin } from '@remixproject/engine' let css = csjs` .text { @@ -39,7 +40,7 @@ let css = csjs` .hpSections { min-width: 640px; } - .remixHomeTwitter { + .remixHomeMedia { overflow-x: hidden; overflow-y: auto; } @@ -66,13 +67,27 @@ let css = csjs` .envLogo { height: 16px; } - .envLabel { + .cursorStyle { cursor: pointer; } .envButton { width: 120px; height: 70px; } + .block input[type='radio']:checked ~ .media{ + width: auto; + display: block; + transition: .5s ease-in; + } + .media{ + width: 0; + display: none; + overflow: hidden; + transition: .5s ease-out; + } + .mediumPanel { + width: 400px; + } } ` @@ -95,6 +110,42 @@ export class LandingPage extends ViewPlugin { this.appManager = appManager this.verticalIcons = verticalIcons this.gistHandler = new GistHandler() + const themeQuality = globalRegistry.get('themeModule').api.currentTheme().quality + this.twitterFrame = yo` +
+ + + +
+ ` + globalRegistry.get('themeModule').api.events.on('themeChanged', (theme) => { + console.log("theme is ", theme.quality) + this.onThemeChanged(theme.quality) + }) + } + + onThemeChanged (themeQuality) { + console.log("themes in listener is", themeQuality) + let twitterFrame = yo` +
+ + + +
+ ` + yo.update(this.twitterFrame, twitterFrame) } render () { @@ -184,7 +235,7 @@ export class LandingPage extends ViewPlugin { this.verticalIcons.select('fileExplorers') } - globalRegistry.get('themeModule').api.events.on('themeChanged', () => { + globalRegistry.get('themeModule').api.events.on('themeChanged', (theme) => { globalRegistry.get('themeModule').api.fixInvert(document.getElementById('remixLogo')) globalRegistry.get('themeModule').api.fixInvert(document.getElementById('solidityLogo')) globalRegistry.get('themeModule').api.fixInvert(document.getElementById('vyperLogo')) @@ -198,10 +249,11 @@ export class LandingPage extends ViewPlugin { return yo` ` } + // main const solEnv = createEnvButton('assets/img/solidityLogo.webp', 'solidityLogo', 'Solidity', startSolidity) const vyperEnv = createEnvButton('assets/img/vyperLogo.webp', 'vyperLogo', 'Vyper', startVyper) @@ -228,6 +280,9 @@ export class LandingPage extends ViewPlugin { document.location.reload() } const img = yo`` + + // to retrieve medium posts + document.body.appendChild(yo``) const container = yo`
@@ -309,11 +364,30 @@ export class LandingPage extends ViewPlugin {
-
- - Tweets by EthereumRemix - - +
+
+ + + ${this.twitterFrame} +
+
+ + +
+
+
+
+
+
+
` diff --git a/workspace.json b/workspace.json index d81084a528..41a7fb24b2 100644 --- a/workspace.json +++ b/workspace.json @@ -54,7 +54,14 @@ "builder": "@nrwl/web:dev-server", "options": { "buildTarget": "remix-ide:build", - "port": 8080 + "port": 8080, + "exclude": ["**/node_modules/**", + "apps/remix-ide/build/**/*.js", + "apps/remix-ide/src/app/editor/mode-solidity.js", + "apps/remix-ide/soljson.js", + "apps/remix-ide/js/**/*.js", + "apps/remix-ide/src/assets/js/**/*.js" + ] }, "configurations": { "production": {