Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
5ca1481c
Commit
5ca1481c
authored
Sep 14, 2020
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed the way media panels are shown
parent
d92d3078
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
40 deletions
+84
-40
landing-page.js
apps/remix-ide/src/app/ui/landing-page/landing-page.js
+84
-40
No files found.
apps/remix-ide/src/app/ui/landing-page/landing-page.js
View file @
5ca1481c
...
@@ -32,12 +32,24 @@ let css = csjs`
...
@@ -32,12 +32,24 @@ let css = csjs`
margin:30px;
margin:30px;
padding-right: 90px;
padding-right: 90px;
}
}
.mediaBadge {
font-size: 2em;
height: 2em;
width: 2em;
}
.logoImg {
height: 10em;
}
.hpSections {
.hpSections {
min-width: 640px;
min-width: 640px;
}
}
.remixHomeMedia {
.remixHomeMedia {
overflow-x: hidden;
overflow-y: auto;
overflow-y: auto;
overflow-x: hidden;
max-height: 570px;
}
.panels {
box-shadow: 5px 5px 15px 0px;
}
}
.labelIt {
.labelIt {
margin-bottom: 0;
margin-bottom: 0;
...
@@ -49,9 +61,6 @@ let css = csjs`
...
@@ -49,9 +61,6 @@ let css = csjs`
.importFrom p {
.importFrom p {
margin-right: 10px;
margin-right: 10px;
}
}
.logoContainer {
float: left;
}
.logoContainer img{
.logoContainer img{
height: 150px;
height: 150px;
opacity: 0.7;
opacity: 0.7;
...
@@ -66,18 +75,14 @@ let css = csjs`
...
@@ -66,18 +75,14 @@ let css = csjs`
width: 120px;
width: 120px;
height: 70px;
height: 70px;
}
}
.block input[type='radio']:checked ~ .media{
.media {
width: auto;
display: block;
transition: .5s ease-in;
}
.media{
width: 0;
display: none;
overflow: hidden;
overflow: hidden;
width: 400px;
transition: .5s ease-out;
transition: .5s ease-out;
z-index: 1000;
}
}
.mediumPanel {
.mediaMedium {
width: 400px;
width: 400px;
}
}
}
}
...
@@ -106,7 +111,7 @@ export class LandingPage extends ViewPlugin {
...
@@ -106,7 +111,7 @@ export class LandingPage extends ViewPlugin {
this
.
twitterFrame
=
yo
`
this
.
twitterFrame
=
yo
`
<div class="px-2
${
css
.
media
}
">
<div class="px-2
${
css
.
media
}
">
<a class="twitter-timeline"
<a class="twitter-timeline"
data-width="
40
0"
data-width="
35
0"
data-theme="
${
themeQuality
}
"
data-theme="
${
themeQuality
}
"
data-chrome="nofooter noheader transparent"
data-chrome="nofooter noheader transparent"
data-tweet-limit="8"
data-tweet-limit="8"
...
@@ -116,6 +121,39 @@ export class LandingPage extends ViewPlugin {
...
@@ -116,6 +121,39 @@ export class LandingPage extends ViewPlugin {
<script src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<script src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
</div>
`
`
this
.
badgeTwitter
=
yo
`<button
class="btn-info p-2 m-1 border rounded-circle
${
css
.
mediaBadge
}
fab fa-twitter"
src="assets/img/sleepingRemiCroped.webp"
id="remixIDEHomeTwitterbtn"
onclick=
${(
e
)
=>
this
.
showMediaPanel
(
e
)}
></button>`
this
.
badgeMedium
=
yo
`<button
class="btn-danger p-2 m-1 border rounded-circle
${
css
.
mediaBadge
}
fab fa-medium"
src="assets/img/sleepingRemiCroped.webp"
id="remixIDEHomeMediumbtn"
onclick=
${(
e
)
=>
this
.
showMediaPanel
(
e
)}
></button>`
this
.
twitterPanel
=
yo
`
<div id="remixIDE_TwitterBlock" class="p-2 mx-0 mb-0 d-none
${
css
.
remixHomeMedia
}
">
${
this
.
twitterFrame
}
</div>
`
this
.
mediumPanel
=
yo
`
<div id="remixIDE_MediumBlock" class="p-2 mx-04 mb-0 d-none
${
css
.
remixHomeMedia
}
">
<div id="medium-widget" class="p-3
${
css
.
media
}
">
<div
id="retainable-rss-embed"
data-rss="https://medium.com/feed/remix-ide"
data-maxcols="1"
data-layout="grid"
data-poststyle="external"
data-readmore="More..."
data-buttonclass="btn mb-3"
data-offset="-100">
</div>
</div>
</div>
`
globalRegistry
.
get
(
'themeModule'
).
api
.
events
.
on
(
'themeChanged'
,
(
theme
)
=>
{
globalRegistry
.
get
(
'themeModule'
).
api
.
events
.
on
(
'themeChanged'
,
(
theme
)
=>
{
console
.
log
(
"theme is "
,
theme
.
quality
)
console
.
log
(
"theme is "
,
theme
.
quality
)
this
.
onThemeChanged
(
theme
.
quality
)
this
.
onThemeChanged
(
theme
.
quality
)
...
@@ -127,7 +165,7 @@ export class LandingPage extends ViewPlugin {
...
@@ -127,7 +165,7 @@ export class LandingPage extends ViewPlugin {
let
twitterFrame
=
yo
`
let
twitterFrame
=
yo
`
<div class="px-2
${
css
.
media
}
">
<div class="px-2
${
css
.
media
}
">
<a class="twitter-timeline"
<a class="twitter-timeline"
data-width="
40
0"
data-width="
35
0"
data-theme="
${
themeQuality
}
"
data-theme="
${
themeQuality
}
"
data-chrome="nofooter noheader transparent"
data-chrome="nofooter noheader transparent"
data-tweet-limit="8"
data-tweet-limit="8"
...
@@ -140,6 +178,18 @@ export class LandingPage extends ViewPlugin {
...
@@ -140,6 +178,18 @@ export class LandingPage extends ViewPlugin {
yo
.
update
(
this
.
twitterFrame
,
twitterFrame
)
yo
.
update
(
this
.
twitterFrame
,
twitterFrame
)
}
}
showMediaPanel
(
e
)
{
console
.
log
(
e
)
if
(
e
.
target
.
id
===
'remixIDEHomeTwitterbtn'
)
{
this
.
mediumPanel
.
classList
.
remove
(
'd-block'
)
this
.
mediumPanel
.
classList
.
add
(
'd-none'
)
this
.
twitterPanel
.
classList
.
toggle
(
'd-block'
)
}
else
{
this
.
twitterPanel
.
classList
.
remove
(
'd-block'
)
this
.
twitterPanel
.
classList
.
add
(
'd-none'
)
this
.
mediumPanel
.
classList
.
toggle
(
'd-block'
)
}
}
render
()
{
render
()
{
let
load
=
(
service
,
item
,
examples
,
info
)
=>
{
let
load
=
(
service
,
item
,
examples
,
info
)
=>
{
let
compilerImport
=
new
CompilerImport
()
let
compilerImport
=
new
CompilerImport
()
...
@@ -233,7 +283,11 @@ export class LandingPage extends ViewPlugin {
...
@@ -233,7 +283,11 @@ export class LandingPage extends ViewPlugin {
const
createLargeButton
=
(
imgPath
,
envID
,
envText
,
callback
)
=>
{
const
createLargeButton
=
(
imgPath
,
envID
,
envText
,
callback
)
=>
{
return
yo
`
return
yo
`
<button class="btn border-secondary d-flex mr-3 text-nowrap justify-content-center flex-column align-items-center
${
css
.
envButton
}
" data-id="landingPageStartSolidity" onclick=
${()
=>
callback
()}
>
<button
class="btn border-secondary d-flex mr-3 text-nowrap justify-content-center flex-column align-items-center
${
css
.
envButton
}
"
data-id="landingPageStartSolidity"
onclick=
${()
=>
callback
()}
>
<img class="m-2 align-self-center
${
css
.
envLogo
}
" id=
${
envID
}
src="
${
imgPath
}
">
<img class="m-2 align-self-center
${
css
.
envLogo
}
" id=
${
envID
}
src="
${
imgPath
}
">
<label class="text-uppercase text-dark
${
css
.
cursorStyle
}
">
${
envText
}
</label>
<label class="text-uppercase text-dark
${
css
.
cursorStyle
}
">
${
envText
}
</label>
</button>
</button>
...
@@ -263,16 +317,19 @@ export class LandingPage extends ViewPlugin {
...
@@ -263,16 +317,19 @@ export class LandingPage extends ViewPlugin {
query
.
update
({
appVersion
:
'0.7.7'
})
query
.
update
({
appVersion
:
'0.7.7'
})
document
.
location
.
reload
()
document
.
location
.
reload
()
}
}
const
img
=
yo
`<img src="assets/img/sleepingRemiCroped.webp"></img>`
const
img
=
yo
`<img
class=
${
css
.
logoImg
}
src="assets/img/sleepingRemiCroped.webp"></img>`
// to retrieve medium posts
// to retrieve medium posts
document
.
body
.
appendChild
(
yo
`<script src="https://www.retainable.io/assets/retainable/rss-embed/retainable-rss-embed.js"></script>`
)
document
.
body
.
appendChild
(
yo
`<script src="https://www.retainable.io/assets/retainable/rss-embed/retainable-rss-embed.js"></script>`
)
const
container
=
yo
`
const
container
=
yo
`
<div class="
${
css
.
homeContainer
}
d-flex" data-id="landingPageHomeContainer">
<div class="
${
css
.
homeContainer
}
d-flex" data-id="landingPageHomeContainer">
<div class="
${
css
.
mainContent
}
bg-light">
<div class="
${
css
.
mainContent
}
bg-light">
<div class="border-bottom clearfix py-3 align-items-center mb-4">
<div class="d-flex justify-content-between">
<div class="mx-4
${
css
.
logoContainer
}
">
${
img
}
</div>
<div class="d-flex flex-column">
<div class="border-bottom d-flex justify-content-between clearfix py-3 mb-4">
<div class="mx-4 w-100">
${
img
}
</div>
</div>
</div>
<div class="row
${
css
.
hpSections
}
mx-4" data-id="landingPageHpSections">
<div class="row
${
css
.
hpSections
}
mx-4" data-id="landingPageHpSections">
<div class="ml-3">
<div class="ml-3">
<div class="plugins mb-5">
<div class="plugins mb-5">
...
@@ -320,7 +377,7 @@ export class LandingPage extends ViewPlugin {
...
@@ -320,7 +377,7 @@ export class LandingPage extends ViewPlugin {
<button class="btn mx-1 btn-secondary text-nowrap" onclick="
${()
=>
load
(
'@resolver-engine'
,
'resolver-engine URL'
,
[
'github:OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol#v2.1.2'
],
yo
`<span>please checkout <a class='text-primary' href="https://github.com/Crypto-Punkers/resolver-engine" target='_blank'>https://github.com/Crypto-Punkers/resolver-engine</a> for more information</span>`
)}
">Resolver-engine</button>
<button class="btn mx-1 btn-secondary text-nowrap" onclick="
${()
=>
load
(
'@resolver-engine'
,
'resolver-engine URL'
,
[
'github:OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol#v2.1.2'
],
yo
`<span>please checkout <a class='text-primary' href="https://github.com/Crypto-Punkers/resolver-engine" target='_blank'>https://github.com/Crypto-Punkers/resolver-engine</a> for more information</span>`
)}
">Resolver-engine</button>
</div><!-- end of btn-group -->
</div><!-- end of btn-group -->
</div><!-- end of div.file -->
</div><!-- end of div.file -->
<div class="ml-3
">
<div class="ml-4 pl-4
">
<h4>Resources</h4>
<h4>Resources</h4>
<p class="mb-1">
<p class="mb-1">
<i class="mr-1 fas fa-book"></i>
<i class="mr-1 fas fa-book"></i>
...
@@ -343,27 +400,14 @@ export class LandingPage extends ViewPlugin {
...
@@ -343,27 +400,14 @@ export class LandingPage extends ViewPlugin {
</div>
</div>
</div><!-- end of hpSections -->
</div><!-- end of hpSections -->
</div>
</div>
<div class="d-flex">
<div class="d-flex flex-column">
<div id="remixIDE_TwitterBlock" class="border-left p-2 mx-0 mb-0
${
css
.
block
}
${
css
.
remixHomeMedia
}
">
<div class="d-flex pr-2 py-2 align-self-end">
<input type="radio" name="media" id="remixIDE_TwitterRadio" class="d-none" checked />
${
this
.
badgeTwitter
}
<label class="mx-1 mt-0 mb-1 btn p-0 text-info fab fa-twitter
${
css
.
cursorStyle
}
" for="remixIDE_TwitterRadio"></label>
${
this
.
badgeMedium
}
${
this
.
twitterFrame
}
</div>
<div id="remixIDE_MediumBlock" class="border-left p-2 mx-0 mb-0
${
css
.
block
}
${
css
.
remixHomeMedia
}
">
<input type="radio" name="media" id="remixIDE_MediumRadio" class="d-none" />
<label class="mx-1 mt-0 mb-1 btn p-0 text-danger fab fa-medium
${
css
.
cursorStyle
}
" for="remixIDE_MediumRadio"></label>
<div class="px-2
${
css
.
media
}
">
<div id="medium-widget" class="
${
css
.
mediumPanel
}
">
<div
id="retainable-rss-embed"
data-rss="https://medium.com/feed/remix-ide"
data-maxcols="1"
data-layout="grid"
data-poststyle="external"
data-readmore="More..."
data-buttonclass="btn mb-3"
data-offset="-100">
</div>
</div>
<div class="d-flex bg-light
${
css
.
panels
}
">
${
this
.
mediumPanel
}
${
this
.
twitterPanel
}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment