pastebin skeleton
This commit is contained in:
@@ -1,8 +1,29 @@
|
|||||||
|
import Note from './Note.js';
|
||||||
|
|
||||||
function App(){
|
function App(){
|
||||||
return {
|
return {
|
||||||
view: function(){
|
view: function(vnode){
|
||||||
return m('div.app', [
|
const {bin} = vnode.attrs;
|
||||||
m('h1', 'App')
|
return m('.app', [
|
||||||
|
m('.top', [
|
||||||
|
m('.top-left', [
|
||||||
|
m('button', {key: 'button'}, 'New Note...'),
|
||||||
|
m('input.search', {key: 'search'}, {value: ''}),
|
||||||
|
m('select.sorting', {key: 'sorting'}, [
|
||||||
|
m('option', 'Newest -> Oldest'),
|
||||||
|
m('option', 'Oldest -> Newest')
|
||||||
|
])
|
||||||
|
]),
|
||||||
|
m('.top-right', [
|
||||||
|
m('.bin-id', bin.id),
|
||||||
|
m('button', 'New Bin...')
|
||||||
|
])
|
||||||
|
]),
|
||||||
|
m('.main', [
|
||||||
|
m('.notes', notes.map(note =>
|
||||||
|
m(Note, {note})
|
||||||
|
))
|
||||||
|
])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
body{
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #AAAACC;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app > .top{
|
||||||
|
height: 2rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app > .main{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: start;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user