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
4c1e0487
Commit
4c1e0487
authored
Mar 20, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added cards(wip)
parent
cdb37d74
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
97 deletions
+22
-97
generate.js
src/app/ui/landing-page/generate.js
+0
-80
landing-page.js
src/app/ui/landing-page/landing-page.js
+9
-9
section.js
src/app/ui/landing-page/section.js
+13
-8
No files found.
src/app/ui/landing-page/generate.js
deleted
100644 → 0
View file @
cdb37d74
/* global */
import
LandingPage
from
'./landing-page'
import
Section
from
'./section'
import
{
defaultWorkspaces
}
from
'./workspace'
// var globalRegistry = require('../../../global/registry')
export
function
homepageProfile
()
{
return
{
displayName
:
'Home'
,
name
:
'home'
,
methods
:
[],
events
:
[],
description
:
' - '
,
icon
:
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUwIDUwIiBoZWlnaHQ9IjUwcHgiIGlkPSJMYXllcl8xIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9I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rZS13aWR0aD0iMi4wNTgzIi8+PHBhdGggZD0iICBNMS44NTIsMjIuOTMyYzAsMCw2LjQ5Myw2LjIzMiwyMy4xNDgsNi4yMzJzMjMuNDM4LTYuMjQ2LDIzLjQzOC02LjI0NiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgc3Ryb2tlLXdpZHRoPSIyLjA1ODMiLz48cGF0aCBkPSIgIE0yNS42NDgsMS41NDhjMCwwLTYuODk1LDcuOTM1LTYuODk1LDIzLjQ1MkMxOC43NTQsNDAuNTE4LDI1LDQ4LjYyNSwyNSw0OC42MjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS13aWR0aD0iMi4wNTgzIi8+PC9zdmc+'
,
prefferedLocation
:
'mainPanel'
}
}
export
function
generateHomePage
(
appManager
,
appStore
)
{
/* var actions1 = [
{ label: 'New file',
type: 'callback',
payload: () => {
let fileManager = globalRegistry.get('fileexplorerbrowser').api
fileManager.creatNewFile()
}
},
{label: 'Import from GitHub', type: `callback`, payload: () => { this.alert(`-imported from GitHub-`) }},
{label: 'Import from gist', type: `callback`, payload: () => { this.alert(`-imported from gist-`) }}
] */
var
actions3
=
[
{
label
:
'Remix documentation'
,
type
:
`link`
,
payload
:
`https://remix.readthedocs.io/en/latest/#`
},
{
label
:
'GitHub repository'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-ide`
},
{
label
:
'Access local file system with remixd'
,
type
:
`link`
,
payload
:
`https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html`
},
{
label
:
'npm module for remixd'
,
type
:
`link`
,
payload
:
`https://www.npmjs.com/package/remixd`
},
{
label
:
'Medium posts'
,
type
:
`link`
,
payload
:
`https://medium.com/remix-ide`
},
{
label
:
'Tutorials'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-workshops`
}
]
var
actions4
=
[
{
label
:
'Remix plugins & modules'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin/blob/master/readme.md`
},
{
label
:
'Repository on GitHub'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin`
},
{
label
:
'Examples'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin/tree/master/examples`
},
{
label
:
'Build a plugin for Remix'
,
type
:
`link`
,
payload
:
`https://medium.com/remix-ide/build-a-plugin-for-remix-90d43b209c5a`
}
]
var
actions5
=
[
{
label
:
'Gitter channel'
,
type
:
`link`
,
payload
:
`https://gitter.im/ethereum/remix`
},
{
label
:
'Stack Overflow'
,
type
:
`link`
,
payload
:
`https://stackoverflow.com/questions/tagged/remix`
},
{
label
:
'Reddit'
,
type
:
`link`
,
payload
:
`https://www.reddit.com/r/ethdev/search?q=remix&restrict_sr=1`
}
]
// var sectionStart = new Section('Start', actions1)
var
sectionLearn
=
new
Section
(
'Learn'
,
actions3
)
var
sectionPlugins
=
new
Section
(
'Plugins'
,
actions4
)
var
sectionHelp
=
new
Section
(
'Help'
,
actions5
)
var
sectionsWorkspaces
=
[]
sectionsWorkspaces
.
push
({
label
:
'Close All Modules'
,
type
:
'callback'
,
payload
:
()
=>
{
appStore
.
getActives
()
.
filter
(({
profile
})
=>
!
profile
.
required
)
.
forEach
(({
profile
})
=>
{
appManager
.
deactivateOne
(
profile
.
name
)
})
}})
defaultWorkspaces
(
appManager
).
forEach
((
workspace
)
=>
{
sectionsWorkspaces
.
push
({
label
:
workspace
.
title
,
type
:
'callback'
,
payload
:
()
=>
{
workspace
.
activate
()
}
})
})
var
sectionWorkspace
=
new
Section
(
'Workspaces'
,
sectionsWorkspaces
)
return
new
LandingPage
([
sectionWorkspace
,
/* sectionStart, */
sectionLearn
,
sectionPlugins
,
sectionHelp
])
}
src/app/ui/landing-page/landing-page.js
View file @
4c1e0487
...
...
@@ -48,7 +48,7 @@ export class LandingPage extends ApiFactory {
constructor
(
appManager
,
appStore
)
{
super
()
this
.
sections
=
[]
/* var actions
1
= [
/* var actions
Start
= [
{ label: 'New file',
type: 'callback',
payload: () => {
...
...
@@ -60,7 +60,7 @@ export class LandingPage extends ApiFactory {
{label: 'Import from gist', type: `callback`, payload: () => { this.alert(`-imported from gist-`) }}
] */
var
actions
3
=
[
var
actions
Learn
=
[
{
label
:
'Remix documentation'
,
type
:
`link`
,
payload
:
`https://remix.readthedocs.io/en/latest/#`
},
{
label
:
'GitHub repository'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-ide`
},
{
label
:
'Access local file system with remixd'
,
type
:
`link`
,
payload
:
`https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html`
},
...
...
@@ -69,23 +69,23 @@ export class LandingPage extends ApiFactory {
{
label
:
'Tutorials'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-workshops`
}
]
var
actions
4
=
[
var
actions
Plugins
=
[
{
label
:
'Remix plugins & modules'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin/blob/master/readme.md`
},
{
label
:
'Repository on GitHub'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin`
},
{
label
:
'Examples'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin/tree/master/examples`
},
{
label
:
'Build a plugin for Remix'
,
type
:
`link`
,
payload
:
`https://medium.com/remix-ide/build-a-plugin-for-remix-90d43b209c5a`
}
]
var
actions
5
=
[
var
actions
Help
=
[
{
label
:
'Gitter channel'
,
type
:
`link`
,
payload
:
`https://gitter.im/ethereum/remix`
},
{
label
:
'Stack Overflow'
,
type
:
`link`
,
payload
:
`https://stackoverflow.com/questions/tagged/remix`
},
{
label
:
'Reddit'
,
type
:
`link`
,
payload
:
`https://www.reddit.com/r/ethdev/search?q=remix&restrict_sr=1`
}
]
// var sectionStart = new Section('Start', actions1)
var
sectionLearn
=
new
Section
(
'Learn'
,
actions
3
)
var
sectionPlugins
=
new
Section
(
'Plugins'
,
actions
4
)
var
sectionHelp
=
new
Section
(
'Help'
,
actions
5
)
var
sectionLearn
=
new
Section
(
'Learn'
,
actions
Learn
)
var
sectionPlugins
=
new
Section
(
'Plugins'
,
actions
Plugins
)
var
sectionHelp
=
new
Section
(
'Help'
,
actions
Help
)
var
sectionsWorkspaces
=
[]
sectionsWorkspaces
.
push
({
...
...
@@ -113,7 +113,7 @@ export class LandingPage extends ApiFactory {
get
profile
()
{
return
{
displayName
:
'
h
ome'
,
displayName
:
'
H
ome'
,
name
:
'home'
,
methods
:
[],
events
:
[],
...
...
@@ -132,7 +132,7 @@ export class LandingPage extends ApiFactory {
`
for
(
let
i
=
0
;
i
<
this
.
sections
.
length
;
i
++
)
{
totalLook
.
appendChild
(
yo
`
<div
class="
${
css
.
section
}
"
>
<div>
${
this
.
sections
[
i
].
render
()}
</div>
`
)
...
...
src/app/ui/landing-page/section.js
View file @
4c1e0487
...
...
@@ -16,17 +16,19 @@ var css = csjs`
}
span {
cursor: pointer;
font-size: 1
2px
;
font-size: 1
00%
;
}
span:hover {
font-size: 1
4px
;
font-size: 1
20%
;
}
a:link {
text-decoration : none;
font-size: 12px;
color: white
font-size: 100%;
}
a:hover {
font-size: 14px;
color: var(--bg-warning);
font-size: 120%;
}
`
...
...
@@ -34,19 +36,22 @@ class Section {
constructor
(
title
,
actions
)
{
this
.
title
=
title
this
.
actions
=
actions
this
.
cardStyle
=
(
this
.
title
===
'Workspaces'
)
?
'bg-success'
:
'border-success'
}
render
()
{
let
sectionLook
=
yo
`
<div class="
${
css
.
item
}
">
<h2>
${
this
.
title
}
</h2>
<div class="card
${
this
.
cardStyle
}
bg-primary mb-3">
<div class="card-header">
${
this
.
title
}
</div>
<div class="card-body" style="min-width: 350px;">
</div>
</div>
`
for
(
var
i
=
0
;
i
<
this
.
actions
.
length
;
i
++
)
{
if
(
this
.
actions
[
i
].
type
===
`callback`
)
{
sectionLook
.
appendChild
(
yo
`
<div>
<span class=
'text-warning h7 span' " onclick=
${
this
.
actions
[
i
].
payload
}
>
<span class=
"card-text" onclick=
${
this
.
actions
[
i
].
payload
}
>
${
this
.
actions
[
i
].
label
}
</span>
</div>
...
...
@@ -54,7 +59,7 @@ class Section {
}
else
if
(
this
.
actions
[
i
].
type
===
`link`
)
{
sectionLook
.
appendChild
(
yo
`
<div>
<a
class='text-warning h7' href=
${
this
.
actions
[
i
].
payload
}
target="_blank" >
<a
href=
${
this
.
actions
[
i
].
payload
}
target="_blank" >
${
this
.
actions
[
i
].
label
}
</a>
</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