use img for banner

pull/1/head
yann300 7 years ago
parent 78b1bf57b5
commit 8a3c137c11
  1. 49
      src/app/panels/editor-panel.js
  2. 8
      src/app/panels/terminal.js

@ -122,6 +122,10 @@ var css = csjs`
height : 100%;
width : 100%;
}
.banner {
width : 25em;
}
`
class EditorPanel {
@ -158,48 +162,9 @@ class EditorPanel {
return self._api.context()
}
},
banner: `
/******************************************************************************
...........................................
.....................:.....................
....................o:;....................
...................oo:;;...................
..................ooo:;;;..................
.................oooo:;;;;.................
................ooooo:;;;;;................
...............oooooo:;;;;;;...............
..............ooooooo:;;;;;;;..............
.............ooooooo;:';;;;;;;.............
............ooooo;;;;:'''';;;;;............
...........oo;;;;;;;;:'''''''';;...........
..........;;;;;;;;;;;:'''''''''''..........
..............;;;;;;;:'''''''..............
...........oo...;;;;;:'''''...;;...........
............oooo...;;:''...;;;;............
..............oooo...:...;;;;..............
...............oooooo:;;;;;;...............
................ooooo:;;;;;................
.................oooo:;;;;.................
..................ooo:;;;..................
...................oo:;;...................
....................o:;....................
.....................:.....................
...........................................
######## ######## ## ## #### ## ##
## ## ## ### ### ## ## ##
## ## ## #### #### ## ## ##
######## ###### ## ### ## ## ###
## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ##
## ## ######## ## ## #### ## ##
welcome to browser solidity
******************************************************************************/
`
banner: yo`<div>
<img class=${css.banner} title="Remix" src="assets/img/remix_logo_512x512.svg" alt="Remix">
</div>`
})
}
self._components.terminal.event.register('resize', delta => self._adjustLayout('top', delta))

@ -156,6 +156,9 @@ class Terminal {
self._INDEX.allMain = []
self._INDEX.commands = {}
self._INDEX.commandsMain = {}
self.registerCommand('banner', function (args, scopedCommands, append) {
append(args[0])
})
self.registerCommand('log', self._blocksRenderer('log'))
self.registerCommand('info', self._blocksRenderer('info'))
self.registerCommand('error', self._blocksRenderer('error'))
@ -214,7 +217,10 @@ class Terminal {
${self._view.term}
</div>
`
if (self.data.banner) self.commands.log(self.data.banner)
if (self.data.banner) {
self.data.activeFilters.commands['banner'] = true
self.commands.banner(self.data.banner)
}
function throttle (fn, wait) {
var time = Date.now()

Loading…
Cancel
Save