package home import ( "fmt" "gitlab.unjx.de/flohoss/godash/services" "gitlab.unjx.de/flohoss/godash/views/layout" "gitlab.unjx.de/flohoss/godash/components" ) templ Home(title string, bookmarks *services.Bookmarks, static *services.StaticInformation, live *services.LiveInformation, weather *services.OpenWeather) {
@components.Weather(weather)
@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 _, a := range bookmarks.Applications {
if a.Category != "" {
{ a.Category }
}
for _, entry := range a.Entries { @components.Application(entry) }
}
for _, l := range bookmarks.Links {
if l.Category != "" {
{ l.Category }
} else {
} for _, entry := range l.Entries { @components.Link(entry) }
}
} templ HomeIndex( title, version string, cmp templ.Component, ) { @layout.Base(title, version) { @cmp } }