Commit 22247f94 authored by LianaHus's avatar LianaHus

new style for landing page

parent 245a7fb2
This diff is collapsed.
...@@ -27,12 +27,11 @@ class Section { ...@@ -27,12 +27,11 @@ class Section {
constructor (title, actions) { constructor (title, actions) {
this.title = title this.title = title
this.actions = actions this.actions = actions
this.cardStyle = (this.title === 'Workspaces') ? 'bg-success text-light' : 'bg-light text-dark'
} }
render () { render () {
let sectionLook = yo` let sectionLook = yo`
<div class="card ${this.cardStyle} p-3" style="min-width: 300px; min-height: 190px;"> <div class="card border-0 bg-light bd-light text-dark p-1" style="min-width: 300px; min-height: 210px;">
<div class="card-header font-weight-bold" style="user-select: none;">${this.title}</div> <div class="card-header font-weight-bold" style="user-select: none;">${this.title}</div>
<p></p> <p></p>
</div> </div>
...@@ -41,7 +40,7 @@ class Section { ...@@ -41,7 +40,7 @@ class Section {
if (this.actions[i].type === `callback`) { if (this.actions[i].type === `callback`) {
sectionLook.appendChild(yo` sectionLook.appendChild(yo`
<div> <div>
<span class ="${css.text}" onclick=${this.actions[i].payload} > <span class="${css.text} text-dark" onclick=${this.actions[i].payload} >
${this.actions[i].label} ${this.actions[i].label}
</span> </span>
</div> </div>
...@@ -49,7 +48,7 @@ class Section { ...@@ -49,7 +48,7 @@ class Section {
} else if (this.actions[i].type === `link`) { } else if (this.actions[i].type === `link`) {
sectionLook.appendChild(yo` sectionLook.appendChild(yo`
<div > <div >
<a class="${css.link} text-decoration-none" href=${this.actions[i].payload} target="_blank" > <a class="${css.link} text-dark text-decoration-none" href=${this.actions[i].payload} target="_blank" >
${this.actions[i].label} ${this.actions[i].label}
</a> </a>
</div> </div>
......
export class Workspace { export class Workspace {
constructor (title, description, activate, deactivate) { constructor (title, description, isMain, activate, deactivate) {
this.title = title this.title = title
this.description = description this.description = description
this.isMain = isMain
this.activate = activate this.activate = activate
this.deactivate = deactivate this.deactivate = deactivate
} }
...@@ -9,23 +10,31 @@ export class Workspace { ...@@ -9,23 +10,31 @@ export class Workspace {
export const defaultWorkspaces = (appManager) => { export const defaultWorkspaces = (appManager) => {
return [ return [
new Workspace('Solidity', '', () => { new Workspace(
'Solidity',
'Writing smart contracts. It is used for implementing smart contracts on various blockchain platforms',
true,
() => {
appManager.ensureActivated('solidity') appManager.ensureActivated('solidity')
appManager.ensureActivated('run') appManager.ensureActivated('run')
appManager.ensureActivated('solidityStaticAnalysis') appManager.ensureActivated('solidityStaticAnalysis')
appManager.ensureActivated('solidityUnitTesting') appManager.ensureActivated('solidityUnitTesting')
}, () => {}), }, () => {}),
new Workspace('Vyper', '', () => { new Workspace(
'Vyper',
'Vyper is a contract-oriented, pythonic programming language that targets the Ethereum Virtual Machine (EVM)',
true,
() => {
appManager.ensureActivated('vyper') appManager.ensureActivated('vyper')
appManager.ensureActivated('run') appManager.ensureActivated('run')
}, () => {}), }, () => {}),
new Workspace('Pipeline', '', () => { new Workspace('Debugger', 'Debug transactions with remix', false, () => {
appManager.ensureActivated('debugger')
}, () => {}),
new Workspace('Pipeline', '', false, () => {
appManager.ensureActivated('solidity') appManager.ensureActivated('solidity')
appManager.ensureActivated('run')
appManager.ensureActivated('pipeline') appManager.ensureActivated('pipeline')
}, () => {}), appManager.ensureActivated('run')
new Workspace('Debugger', '', () => { })
appManager.ensureActivated('debugger')
}, () => {})
] ]
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment