aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-01-12 16:52:59 -0500
committerXe Iaso <me@xeiaso.net>2025-01-12 16:52:59 -0500
commit674fb0b22243dc49b2865c48a42a30243e535d29 (patch)
tree84dad46e8dc48b3cbc5030b96dbe42df8250fbf7 /cmd
parentbc996c9e5bfe66c3651e4521feaeb68917145c47 (diff)
downloadx-674fb0b22243dc49b2865c48a42a30243e535d29.tar.xz
x-674fb0b22243dc49b2865c48a42a30243e535d29.zip
cmd/mi/services/glance: make this look better
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mi/services/glance/glance.templ15
-rw-r--r--cmd/mi/services/glance/glance_templ.go22
2 files changed, 23 insertions, 14 deletions
diff --git a/cmd/mi/services/glance/glance.templ b/cmd/mi/services/glance/glance.templ
index 19928c1..88889a3 100644
--- a/cmd/mi/services/glance/glance.templ
+++ b/cmd/mi/services/glance/glance.templ
@@ -7,9 +7,18 @@ import (
)
templ whoIsFront(sw *models.Switch) {
- <p><span class="color-primary">{sw.Member.Name}</span> is front</p>
- <p>Change logged <span data-dynamic-relative-time={ fmt.Sprint(sw.CreatedAt.Unix()) }></span> ago</p>
- <img src={ sw.Member.AvatarURL } alt="" loading="lazy" />
+ <div class="cards-vertical">
+ <div class="widget-content-frame relative">
+ <div class="reddit-card-thumbnail-container">
+ <img class="reddit-card-thumbnail cached finished-transition" loading="lazy" src={ sw.Member.AvatarURL } alt="">
+ </div>
+
+ <div class="padding-widget relative">
+ <p><span class="color-primary">{sw.Member.Name}</span> is front</p>
+ <p>Change logged <span data-dynamic-relative-time={ fmt.Sprint(sw.CreatedAt.Unix()) }></span> ago</p>
+ </div>
+ </div>
+ </div>
}
templ ohNoes(err error) {
diff --git a/cmd/mi/services/glance/glance_templ.go b/cmd/mi/services/glance/glance_templ.go
index cc1e928..b1a9414 100644
--- a/cmd/mi/services/glance/glance_templ.go
+++ b/cmd/mi/services/glance/glance_templ.go
@@ -35,46 +35,46 @@ func whoIsFront(sw *models.Switch) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<p><span class=\"color-primary\">")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"cards-vertical\"><div class=\"widget-content-frame relative\"><div class=\"reddit-card-thumbnail-container\"><img class=\"reddit-card-thumbnail cached finished-transition\" loading=\"lazy\" src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(sw.Member.Name)
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(sw.Member.AvatarURL)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `glance.templ`, Line: 10, Col: 48}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `glance.templ`, Line: 13, Col: 114}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</span> is front</p><p>Change logged <span data-dynamic-relative-time=\"")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" alt=\"\"></div><div class=\"padding-widget relative\"><p><span class=\"color-primary\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
- templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(sw.CreatedAt.Unix()))
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(sw.Member.Name)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `glance.templ`, Line: 11, Col: 85}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `glance.templ`, Line: 17, Col: 58}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\"></span> ago</p><img src=\"")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "</span> is front</p><p>Change logged <span data-dynamic-relative-time=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
- templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(sw.Member.AvatarURL)
+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(sw.CreatedAt.Unix()))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `glance.templ`, Line: 12, Col: 32}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `glance.templ`, Line: 18, Col: 95}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" alt=\"\" loading=\"lazy\">")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\"></span> ago</p></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -110,7 +110,7 @@ func ohNoes(err error) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(err.Error())
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `glance.templ`, Line: 17, Col: 18}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `glance.templ`, Line: 26, Col: 18}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {