templates

package
v0.0.0-...-eca5ad7 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ThemeJavascript string

Functions

func AccountPage

func AccountPage(account Account, profile *data.Profile) gomponents.Node

func Alert

func Alert(text, class string) gomponents.Node

func BasePage

func BasePage(title, baseURL string, bodyNodes gomponents.Group) gomponents.Node

func Cart

func Cart() gomponents.Node

func CartProductDetailsModalContent

func CartProductDetailsModalContent(cartProduct data.CartProduct) gomponents.Node

func CartProductRow

func CartProductRow(cartProduct CartProduct) gomponents.Node

func CartQuickAddModalContent

func CartQuickAddModalContent() gomponents.Node

func CartTable

func CartTable(cartProducts []CartProduct) gomponents.Node

func Checked

func Checked(b bool) gomponents.Node

func Disabled

func Disabled(b bool) gomponents.Node

func ErrorPage

func ErrorPage(statusCode int, statusCodeText string) gomponents.Node

func ExploreRecipes

func ExploreRecipes() gomponents.Node

func FavoriteButton

func FavoriteButton(listID uuid.UUID, favorite bool) gomponents.Node

func FavoriteRecipes

func FavoriteRecipes() gomponents.Node

func FormCheck

func FormCheck(id, label string, isSwitch bool, input gomponents.Node) gomponents.Node

func FormInput

func FormInput(id, label string, attributes, input gomponents.Node) gomponents.Node

func IngredientDetailsModalContent

func IngredientDetailsModalContent(listID uuid.UUID, ingredient data.Ingredient) gomponents.Node

func IngredientRow

func IngredientRow(accountID, recipeAccountID uuid.UUID, ingredient Ingredient) gomponents.Node

func Ingredients

func Ingredients(accountID uuid.UUID, list data.List) gomponents.Node

func IngredientsTable

func IngredientsTable(accountID, listAccountID uuid.UUID, ingredients []Ingredient) gomponents.Node

func ListDetailsEdit

func ListDetailsEdit(list data.List, copy bool) gomponents.Node

func ListDetailsModalContent

func ListDetailsModalContent(accountID uuid.UUID, list data.List, copy bool) gomponents.Node

func ListDetailsView

func ListDetailsView(list data.List) gomponents.Node

func ListRow

func ListRow(accountID uuid.UUID, list data.List) gomponents.Node

func ListTable

func ListTable(accountID uuid.UUID, lists []data.List) gomponents.Node

func Lists

func Lists(accountID uuid.UUID) gomponents.Node

func LocationNode

func LocationNode(location *data.CacheLocation) gomponents.Node

func LocationSearchRow

func LocationSearchRow(location Location) gomponents.Node

func LocationsSearchModal

func LocationsSearchModal(accountID uuid.UUID) gomponents.Node

func LocationsSearchTable

func LocationsSearchTable(locations []Location) gomponents.Node
func Menu() gomponents.Node
func Modal() gomponents.Node

func ModalButton

func ModalButton(btnClass, text string, htmxContentEndpoint gomponents.Node) gomponents.Node

func ModalContent

func ModalContent(
	title string,
	bodyContent gomponents.Node,
	footerContent gomponents.Node,
) gomponents.Node

func ModalDismiss

func ModalDismiss() gomponents.Node

func ModalForm

func ModalForm(htmxFormSubmit gomponents.Node, inputs ...gomponents.Node) gomponents.Node

func ModalSubmit

func ModalSubmit() gomponents.Node

func ProductSearchRow

func ProductSearchRow(product Product) gomponents.Node

func ProductsSearch

func ProductsSearch() gomponents.Node

func ProductsSearchTable

func ProductsSearchTable(products []Product) gomponents.Node

func Profile

func Profile(account Account, profile *data.Profile) gomponents.Node

func ProfilePage

func ProfilePage(profile data.Profile) gomponents.Node

func Profiles

func Profiles() gomponents.Node

func ProfilesSearchResults

func ProfilesSearchResults(profiles []data.Profile) gomponents.Node

func RecipeDetailsEdit

func RecipeDetailsEdit(recipe data.Recipe, copy bool) gomponents.Node

func RecipeDetailsModalContent

func RecipeDetailsModalContent(accountID uuid.UUID, recipe data.Recipe, copy bool) gomponents.Node

func RecipeDetailsView

func RecipeDetailsView(recipe data.Recipe) gomponents.Node

func RecipeRow

func RecipeRow(accountID uuid.UUID, recipe data.Recipe) gomponents.Node

func RecipeTable

func RecipeTable(accountID uuid.UUID, recipes []data.Recipe) gomponents.Node

func Recipes

func Recipes(accountID uuid.UUID) gomponents.Node

func Select

func Select[T comparable](id, label, name string, selected T, values []T, action gomponents.Node) gomponents.Node

func Settings

func Settings(account Account) gomponents.Node

func ShoppingList

func ShoppingList() gomponents.Node

func ShoppingListLocation

func ShoppingListLocation(location string, shoppingListRows gomponents.Group) gomponents.Node

func ShoppingListRow

func ShoppingListRow(cartProduct CartProduct) gomponents.Node

func ShoppingListTable

func ShoppingListTable(cartProducts []CartProduct) gomponents.Node

func WelcomePage

func WelcomePage() gomponents.Node

Types

type Account

type Account struct {
	ID        uuid.UUID
	ImageSize string
	Location  *data.CacheLocation
	Homepage  string
}

type CartProduct

type CartProduct struct {
	ProductID   string
	Brand       string
	Description string
	Size        string
	ImageURL    string
	Quantity    int
	Staple      bool
	ProductURL  string
	Location    string
}

type Ingredient

type Ingredient struct {
	Product
	ListID   uuid.UUID
	Quantity int
	Staple   bool
}

type Location

type Location struct {
	LocationID string
	Name       string
	Address    string
}

type Product

type Product struct {
	ProductID   string
	Brand       string
	Description string
	Size        string
	ImageURL    string
	ProductURL  string
}

Jump to

Keyboard shortcuts

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