Documentation
¶
Overview ¶
Package layout provides composable layout builders for ForgeUI applications.
The layout package is designed for building root layouts that define the complete HTML structure with head and body sections. Child layouts should use standard gomponents to wrap content with structural elements only.
Index ¶
- func Alpine() g.Node
- func AlpineBridgeClient() g.Node
- func AlpineScripts(plugins ...alpine.Plugin) g.Node
- func Body(content ...g.Node) g.Node
- func BridgeClient() g.Node
- func Build(head g.Node, body g.Node) g.Node
- func BuildWithLang(lang string, head g.Node, body g.Node) g.Node
- func Charset(charset string) g.Node
- func Class(classes string) g.Node
- func DarkModeScript() g.Node
- func Description(description string) g.Node
- func Favicon(href string) g.Node
- func GoogleFonts(families ...string) g.Node
- func Head(content ...g.Node) g.Node
- func HotReload() g.Node
- func InlineScript(content string) g.Node
- func InlineStyle(content string) g.Node
- func Link(rel, href string, attrs ...g.Node) g.Node
- func Meta(name, content string) g.Node
- func OpenGraph(title, description, image, url string) g.Node
- func Preload(href, as string) g.Node
- func PreloadFont(href string) g.Node
- func ProviderScriptUtilities() g.Node
- func Script(src string, attrs ...g.Node) g.Node
- func Scripts(scripts ...g.Node) g.Node
- func StyleSheet(href string) g.Node
- func Styles(styles ...g.Node) g.Node
- func Theme(lightTheme, darkTheme *theme.Theme) g.Node
- func ThemeSingle(t *theme.Theme) g.Node
- func Title(title string) g.Node
- func TwitterCard(title, description, image string) g.Node
- func Viewport(content string) g.Node
- type Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alpine ¶
Alpine injects Alpine.js cloak CSS into the head This prevents flash of unstyled content before Alpine initializes
func AlpineBridgeClient ¶
AlpineBridgeClient injects the Alpine.js bridge client script
func AlpineScripts ¶
AlpineScripts injects Alpine.js scripts at the end of body Accepts optional plugins
func BridgeClient ¶
BridgeClient injects the ForgeUI bridge client script
func BuildWithLang ¶
BuildWithLang creates a new layout builder with custom language
func DarkModeScript ¶
DarkModeScript injects the dark mode toggle script into the body
func Description ¶
Description creates a meta description tag
func GoogleFonts ¶
GoogleFonts adds Google Fonts preconnect and stylesheet links
func HotReload ¶
HotReload injects the hot reload script for development mode This should only be used in development
func InlineScript ¶
InlineScript creates an inline script element
func InlineStyle ¶
InlineStyle creates an inline style element
func ProviderScriptUtilities ¶
ProviderScriptUtilities injects the provider utility scripts
func Theme ¶
Theme injects theme system (styles and scripts) into the layout Supports both light and dark themes
func ThemeSingle ¶
ThemeSingle injects a single theme into the layout (uses same theme for light and dark)
func TwitterCard ¶
TwitterCard adds Twitter Card meta tags