baobab.representation #
representation of BAOBAB
fn card #
fn card[T](t T) string
fn decode_form #
fn decode_form[T](data string) T
fn filter_object_form #
fn filter_object_form[T](endpoint string) string
fn form #
fn form[T](endpoint string) string
fn input #
fn input[T](field FieldData, t T) Input
fn list_object_page #
fn list_object_page[U](u []U, routes ObjectRoutes) Page
fn list_objectsection #
fn list_objectsection[U](u []U) Section
fn new_object_form #
fn new_object_form[T]() string
fn new_object_page #
fn new_object_page[T]() Page
fn row #
fn row[T](t T) Row
fn table #
fn table[U](u []U) Table
fn to_component #
fn to_component[T](t T) string
enum Color #
enum Color {
violet
zinc
}
enum InputType #
enum InputType {
input
dropdown
}
struct Button #
struct Button {
Element
pub mut:
label string
route string
}
struct Element #
struct Element {
htmx.HTMX
pub mut:
color Color
}
struct Input #
struct Input {
pub mut:
label string
typ InputType
endpoint string
name string
}
fn (Input) html #
fn (input Input) html() string
struct Item #
struct Item {
pub mut:
label string
icon string
route string
}
struct ObjectRoutes #
struct ObjectRoutes {
pub mut:
object_route string
new_object_route string
filter_object_route string
edit_object_route fn (string) string
object_page_route fn (string) string
}
struct Page #
struct Page {
// Element
pub mut:
heading PageHeading
content string
}
struct PageHeading #
struct PageHeading {
pub mut:
title string
description string
buttons []Button
}
struct Response #
struct Response {
target string
html string
}
struct Row #
struct Row {
pub mut:
route string
items []string
buttons []Button
}
fn (Row) html #
fn (row Row) html() string
struct Section #
struct Section {
pub mut:
heading SectionHeading
content string
}
struct SectionHeading #
struct SectionHeading {
pub mut:
title string
description string
buttons []Button
}
struct Shell #
struct Shell {
pub mut:
page Page
sidebar Sidebar
}
fn (Shell) html #
fn (shell Shell) html() string
fn (Shell) difference #
fn (shell Shell) difference(prev_shell Shell) string
struct Sidebar #
struct Sidebar {
pub mut:
items []Item
}
fn (Sidebar) html #
fn (sidebar Sidebar) html() string
struct Table #
struct Table {
pub mut:
title string
description string
headers []string
rows []Row
}
fn (Table) html #
fn (table Table) html() string
- README
- fn card
- fn decode_form
- fn filter_object_form
- fn form
- fn input
- fn list_object_page
- fn list_objectsection
- fn new_object_form
- fn new_object_page
- fn row
- fn table
- fn to_component
- enum Color
- enum InputType
- struct Button
- struct Element
- struct Input
- struct Item
- struct ObjectRoutes
- struct Page
- struct PageHeading
- struct Response
- struct Row
- struct Section
- struct SectionHeading
- struct Shell
- struct Sidebar
- struct Table