web

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2025 License: EUPL-1.2 Imports: 11 Imported by: 0

Documentation

Overview

templ: version: v0.3.887

Index

Constants

This section is empty.

Variables

View Source
var Bootstrap []byte

Bootstrap CSS

View Source
var Module = fx.Module("web", fx.Provide(New))

Functions

func AssetHandler

func AssetHandler(mime string, asset []byte) http.Handler

func Day

func Day(day time.Time, logs []store.LogLine, cumulative []store.Cumulative) templ.Component

func Error

func Error(err error) templ.Component

func Index

func Index(dcs []store.DayCount) templ.Component

func Layout

func Layout() templ.Component
func NavTodayTomorrow(day time.Time) templ.Component

func NextWorkday

func NextWorkday(t time.Time) time.Time

func PrevWorkday

func PrevWorkday(t time.Time) time.Time

PrevWorkday goes backwards, skipping weekends

Types

type Config

type Config struct {
	Addr string `hcl:"addr"`
}

type Opts

type Opts struct {
	fx.In

	Store  *store.Store
	LC     fx.Lifecycle
	Config Config

	Logger *slog.Logger
}

type Web

type Web struct {
	Store  *store.Store
	Config Config
	Logger *slog.Logger
	// contains filtered or unexported fields
}

func New

func New(o Opts) *Web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL