UNPKG

haui

Version:

Home Automation UI

48 lines (45 loc) 1.54 kB
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: #666; font: 20px/25px sans-serif; margin: 0; padding: 0; } ul { list-style: none; margin: 0; padding: 0; } li { background: #222; border-bottom: 1px solid #333; border-right: 1px solid #333; box-sizing: border-box; float: left; width: 50%; } li:hover { background: #444; cursor: pointer; } a { color: #eee; 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")