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
7cc20961
Commit
7cc20961
authored
Mar 20, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- restyleing
- added Start section(todo: add cbs after rebase)
parent
4c1e0487
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
29 deletions
+23
-29
.gitignore
.gitignore
+1
-0
landing-page.js
src/app/ui/landing-page/landing-page.js
+0
-0
section.js
src/app/ui/landing-page/section.js
+22
-29
No files found.
.gitignore
View file @
7cc20961
...
...
@@ -11,3 +11,4 @@ remix
contracts
TODO
.tern-port
.history
src/app/ui/landing-page/landing-page.js
View file @
7cc20961
This diff is collapsed.
Click to expand it.
src/app/ui/landing-page/section.js
View file @
7cc20961
...
...
@@ -2,33 +2,26 @@ let yo = require('yo-yo')
let
csjs
=
require
(
'csjs-inject'
)
var
css
=
csjs
`
.item {
display : flex;
flex-direction : column;
align-items : center;
width : 400px;
height : 160px;
padding : 20px;
background-color: var(--primary);
font-family : "Lucida Console", Monaco, monospace;
font-size : 12px;
cursor : default;
}
span {
.text {
background-color : var(--success);
cursor: pointer;
font-size: 100%;
color: var(--primary);
font-weight: normal;
}
span
:hover {
font-
size: 120%
;
.text
:hover {
font-
weight: bold
;
}
a:link {
.link {
cursor: pointer;
background-color : var(--primary);
color: var(--success);
font-weight: normal;
text-decoration : none;
color: white
font-size: 100%;
}
a:hover {
color: var(--bg-warning);
font-size: 120%;
.link:hover {
color: var(--success);
font-weight: bold;
text-decoration : none;
}
`
...
...
@@ -36,36 +29,36 @@ class Section {
constructor
(
title
,
actions
)
{
this
.
title
=
title
this
.
actions
=
actions
this
.
cardStyle
=
(
this
.
title
===
'Workspaces'
)
?
'bg-success
'
:
'
border-success'
this
.
cardStyle
=
(
this
.
title
===
'Workspaces'
)
?
'bg-success
text-primary'
:
'bg-primary text-success
border-success'
}
render
()
{
let
sectionLook
=
yo
`
<div class="card
${
this
.
cardStyle
}
bg-primary mb-3
">
<div class="card
${
this
.
cardStyle
}
p-2" style="min-width: 300px;
">
<div class="card-header">
${
this
.
title
}
</div>
<div class="card-body" style="min-width: 350px;">
</div>
<p></p>
</div>
`
for
(
var
i
=
0
;
i
<
this
.
actions
.
length
;
i
++
)
{
if
(
this
.
actions
[
i
].
type
===
`callback`
)
{
sectionLook
.
appendChild
(
yo
`
<div>
<span class
="card-text
" onclick=
${
this
.
actions
[
i
].
payload
}
>
<span class
="
${
css
.
text
}
" onclick=
${
this
.
actions
[
i
].
payload
}
>
${
this
.
actions
[
i
].
label
}
</span>
</div>
`
)
}
else
if
(
this
.
actions
[
i
].
type
===
`link`
)
{
sectionLook
.
appendChild
(
yo
`
<div>
<a href=
${
this
.
actions
[
i
].
payload
}
target="_blank" >
<div
>
<a
class="
${
css
.
link
}
text-decoration-none"
href=
${
this
.
actions
[
i
].
payload
}
target="_blank" >
${
this
.
actions
[
i
].
label
}
</a>
</div>
`
)
}
}
sectionLook
.
appendChild
(
yo
`<p></p>`
)
if
(
!
this
.
_view
)
{
this
.
_view
=
sectionLook
...
...
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