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
d874d504
Commit
d874d504
authored
Sep 22, 2020
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hideing on click outside panel
parent
c5f58295
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
landing-page.js
apps/remix-ide/src/app/ui/landing-page/landing-page.js
+17
-5
No files found.
apps/remix-ide/src/app/ui/landing-page/landing-page.js
View file @
d874d504
...
@@ -111,7 +111,8 @@ export class LandingPage extends ViewPlugin {
...
@@ -111,7 +111,8 @@ export class LandingPage extends ViewPlugin {
this
.
verticalIcons
=
verticalIcons
this
.
verticalIcons
=
verticalIcons
this
.
gistHandler
=
new
GistHandler
()
this
.
gistHandler
=
new
GistHandler
()
const
themeQuality
=
globalRegistry
.
get
(
'themeModule'
).
api
.
currentTheme
().
quality
const
themeQuality
=
globalRegistry
.
get
(
'themeModule'
).
api
.
currentTheme
().
quality
window
.
addEventListener
(
'resize'
,
()
=>
this
.
adjustRightPanel
())
window
.
addEventListener
(
'resize'
,
()
=>
this
.
adjustMediaPanel
())
window
.
addEventListener
(
'click'
,
(
e
)
=>
this
.
hideMediaPanel
(
e
))
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"
...
@@ -158,18 +159,29 @@ export class LandingPage extends ViewPlugin {
...
@@ -158,18 +159,29 @@ export class LandingPage extends ViewPlugin {
</div>
</div>
</div>
</div>
`
`
this
.
adjust
Right
Panel
()
this
.
adjust
Media
Panel
()
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
)
})
})
}
}
adjust
Right
Panel
()
{
adjust
Media
Panel
()
{
this
.
twitterPanel
.
style
.
maxHeight
=
Math
.
max
(
window
.
innerHeight
-
150
,
200
)
+
'px'
this
.
twitterPanel
.
style
.
maxHeight
=
Math
.
max
(
window
.
innerHeight
-
150
,
200
)
+
'px'
this
.
mediumPanel
.
style
.
maxHeight
=
Math
.
max
(
window
.
innerHeight
-
150
,
200
)
+
'px'
this
.
mediumPanel
.
style
.
maxHeight
=
Math
.
max
(
window
.
innerHeight
-
150
,
200
)
+
'px'
}
}
hideMediaPanel
(
e
)
{
const
mediaPanelsTitle
=
document
.
getElementById
(
'remixIDEMediaPanelsTitle'
)
const
mediaPanels
=
document
.
getElementById
(
'remixIDEMediaPanels'
)
if
(
!
mediaPanelsTitle
.
contains
(
e
.
target
)
&&
!
mediaPanels
.
contains
(
e
.
target
))
{
this
.
mediumPanel
.
classList
.
remove
(
'd-block'
)
this
.
mediumPanel
.
classList
.
add
(
'd-none'
)
this
.
twitterPanel
.
classList
.
remove
(
'd-block'
)
this
.
twitterPanel
.
classList
.
add
(
'd-none'
)
}
}
onThemeChanged
(
themeQuality
)
{
onThemeChanged
(
themeQuality
)
{
console
.
log
(
"themes in listener is"
,
themeQuality
)
console
.
log
(
"themes in listener is"
,
themeQuality
)
let
twitterFrame
=
yo
`
let
twitterFrame
=
yo
`
...
@@ -411,11 +423,11 @@ export class LandingPage extends ViewPlugin {
...
@@ -411,11 +423,11 @@ export class LandingPage extends ViewPlugin {
</div><!-- end of hpSections -->
</div><!-- end of hpSections -->
</div>
</div>
<div class="d-flex flex-column
${
css
.
rightPanel
}
">
<div class="d-flex flex-column
${
css
.
rightPanel
}
">
<div class="d-flex pr-2 py-2 align-self-end">
<div class="d-flex pr-2 py-2 align-self-end"
id="remixIDEMediaPanelsTitle"
>
${
this
.
badgeTwitter
}
${
this
.
badgeTwitter
}
${
this
.
badgeMedium
}
${
this
.
badgeMedium
}
</div>
</div>
<div class="mr-3 d-flex bg-light
${
css
.
panels
}
">
<div class="mr-3 d-flex bg-light
${
css
.
panels
}
"
id="remixIDEMediaPanels"
>
${
this
.
mediumPanel
}
${
this
.
mediumPanel
}
${
this
.
twitterPanel
}
${
this
.
twitterPanel
}
</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