Add: Sources tool

This commit is contained in:
surunzi
2016-05-06 21:59:48 +08:00
parent a6fe4468b8
commit b7e64d0002
5 changed files with 66 additions and 0 deletions

40
src/Sources/Sources.es6 Normal file
View File

@@ -0,0 +1,40 @@
import Tool from '../DevTools/Tool.es6'
require('./Sources.scss');
export default class Sources extends Tool
{
constructor()
{
super();
this.name = 'sources';
this._data = {
type: ''
};
this._loadTpl();
}
init($el)
{
super.init($el);
this._render();
}
set(data)
{
this._data = data;
}
_loadTpl()
{
this._emptyTpl = require('./empty.hbs');
}
_render()
{
var data = this._data;
var tpl = this._emptyTpl;
this._$el.html(tpl(data));
}
}

18
src/Sources/Sources.scss Normal file
View File

@@ -0,0 +1,18 @@
@import "../variable";
.dev-tools { .tools {
.sources {
.empty {
width: 100%;
height: 100%;
.content {
position: absolute;
top: 50%;
left: 0;
width: 100%;
text-align: center;
transform: translate3d(0, -50%, 0);
}
}
}
} }

0
src/Sources/Sourees.hbs Normal file
View File

5
src/Sources/empty.hbs Normal file
View File

@@ -0,0 +1,5 @@
<div class="eruda-empty">
<div class="eruda-content">
Used for displaying html, javaScript, css and image.
</div>
</div>