package home import "gitlab.unjx.de/flohoss/godash/services" import "gitlab.unjx.de/flohoss/godash/views/layout" import "gitlab.unjx.de/flohoss/godash/components" import "fmt" templ Home(title string, bookmarks *services.Bookmarks, static *services.StaticInformation, live *services.LiveInformation) {
@components.System("icon-[bi--cpu]",static.CPU.Name,"",static.CPU.Threads,"systemCpuPercentage","",live.CPU) @components.System("icon-[bi--nvme]",live.Disk.Value,fmt.Sprintf(" | %s", static.Disk.Total),static.Disk.Partitions,"systemDiskPercentage","systemDiskValue",live.Disk.Percentage) @components.System("icon-[bi--memory]",live.Ram.Value,fmt.Sprintf(" | %s", static.Ram.Total),static.Ram.Swap,"systemRamPercentage","systemRamValue",live.Ram.Percentage) @components.Uptime(static.Host.Architecture,"systemUptimePercentage",live.Uptime)
for _, app := range bookmarks.Applications {
if app.Category != "" {
{ app.Category }
}
for _, entry := range app.Entries { @components.Application(entry) }
}
for _, link := range bookmarks.Links {
if link.Category != "" {
{ link.Category }
} for _, entry := range link.Entries { @components.Link(entry) }
}
} templ HomeIndex( title, version string, bookmarks *services.Bookmarks, static *services.StaticInformation, live *services.LiveInformation, cmp templ.Component, ) { @layout.Base(title, version) { @cmp } }