aboutsummaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorAutumn <git@autumnfo.rest>2026-05-16 08:12:51 +0100
committerAutumn <git@autumnfo.rest>2026-05-16 08:12:51 +0100
commit04bfb5881c510aff5544f276e5a37d9316bbf249 (patch)
tree0c12a2d7ee6025989064f1c6b897994c577385ec /src/views
parent621ec4cb3afdae23f8aa0a093eabde20d770a75a (diff)
[pages] added styling & improved components
Diffstat (limited to 'src/views')
-rw-r--r--src/views/components/dashboard/action.pug9
-rw-r--r--src/views/components/dashboard/device.pug12
-rw-r--r--src/views/components/head.pug2
-rw-r--r--src/views/pages/dashboard/actions.pug9
-rw-r--r--src/views/pages/dashboard/devices.pug8
-rw-r--r--src/views/pages/dashboard/home.pug2
6 files changed, 38 insertions, 4 deletions
diff --git a/src/views/components/dashboard/action.pug b/src/views/components/dashboard/action.pug
new file mode 100644
index 0000000..6c14434
--- /dev/null
+++ b/src/views/components/dashboard/action.pug
@@ -0,0 +1,9 @@
+article.action
+
+ div
+ p= action.name
+
+ div
+
+ - let location = `/actions/${action.id}`
+ a(href=location) View
diff --git a/src/views/components/dashboard/device.pug b/src/views/components/dashboard/device.pug
new file mode 100644
index 0000000..099a54b
--- /dev/null
+++ b/src/views/components/dashboard/device.pug
@@ -0,0 +1,12 @@
+article.device
+
+ div
+ p= device.name
+
+ div
+
+ if device.type == "light"
+ button Toggle
+
+ - let location = `/devices/${device.id}`
+ a(href=location) View
diff --git a/src/views/components/head.pug b/src/views/components/head.pug
index d28b9d5..3d684fe 100644
--- a/src/views/components/head.pug
+++ b/src/views/components/head.pug
@@ -1,2 +1,4 @@
meta(charset="utf-8")
meta(name="viewport" content="width=device-width,initial-scale=1.0")
+
+link(href="/public/css/global.css" rel="stylesheet")
diff --git a/src/views/pages/dashboard/actions.pug b/src/views/pages/dashboard/actions.pug
index 06f5aed..9fa9086 100644
--- a/src/views/pages/dashboard/actions.pug
+++ b/src/views/pages/dashboard/actions.pug
@@ -6,6 +6,8 @@ html
include ../../components/head.pug
+ link(href="/public/css/dashboard.css" rel="stylesheet")
+
title Actions | Home Control
body
@@ -22,6 +24,9 @@ html
else
- each action in actions
+ section.actions
+
+ each action in actions
+
+ include ../../components/dashboard/action.pug
- p= JSON.stringify(action)
diff --git a/src/views/pages/dashboard/devices.pug b/src/views/pages/dashboard/devices.pug
index 1175136..f3605c0 100644
--- a/src/views/pages/dashboard/devices.pug
+++ b/src/views/pages/dashboard/devices.pug
@@ -6,6 +6,8 @@ html
include ../../components/head.pug
+ link(href="/public/css/dashboard.css" rel="stylesheet")
+
title Devices | Home Control
body
@@ -22,6 +24,8 @@ html
else
- each device in devices
+ section.devices
+
+ each device in devices
- p= JSON.stringify(device)
+ include ../../components/dashboard/device.pug
diff --git a/src/views/pages/dashboard/home.pug b/src/views/pages/dashboard/home.pug
index c5267bf..8ae2c4b 100644
--- a/src/views/pages/dashboard/home.pug
+++ b/src/views/pages/dashboard/home.pug
@@ -6,6 +6,8 @@ html
include ../../components/head.pug
+ link(href="/public/css/dashboard.css" rel="stylesheet")
+
title Dashboard | Home Control
body