haui
Version:
Home Automation UI
48 lines (45 loc) • 1.54 kB
text/jade
doctype html
html(lang="en")
head
title Haui
meta(name="viewport", content="width=device=width,initial-scale=1,maximum-scale=1")
link(href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css", rel="stylesheet")
style.
html, body { background:
ul { list-style: none; margin: 0; padding: 0; }
li {
background:
border-bottom: 1px solid
border-right: 1px solid
box-sizing: border-box;
float: left;
width: 50%;
}
li:hover { background:
a {
color:
text-decoration: none;
box-sizing: border-box;
display: inline-block;
padding: 1.5rem;
width: 100%;
height: 4rem;
}
i.fa {
display: block;
float: right;
margin: 0 auto 0.5rem;
}
body
ul
each button in buttons
li
- if (button.type === "x10")
a(href="javascript:$.get('" + ["/x10", button.command, button.house, button.unit].join("/") + "')")
i.fa.fa-lg(class=button.icon)
span= button.label
- else if (button.type === "lirc")
a(href="javascript:$.get('" + ["/lirc", button.command, button.device, button.button].join("/") + "')")
i.fa.fa-lg(class=button.icon)
span= button.label
script(src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js")