Documentation
¶
Overview ¶
Package pages provides gomponent-based page templates for the CMS dashboard.
Index ¶
- func AddFieldPage(currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, ...) g.Node
- func Badge(text, colorClass string) g.Node
- func Breadcrumbs(items ...BreadcrumbItem) g.Node
- func CMSOverviewPage(currentApp *app.App, basePath string, ...) g.Node
- func Card(children ...g.Node) g.Node
- func CardWithHeader(headerTitle string, headerActions []g.Node, body ...g.Node) g.Node
- func ComponentSchemaSelector(components []*core.ComponentSchemaSummaryDTO, selectedName string) g.Node
- func ComponentSchemasPage(currentApp *app.App, basePath string, ...) g.Node
- func ConfirmButton(formAction, method, text, confirmMessage, colorClass string, icon g.Node) g.Node
- func ContentTypeDetailPage(currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, ...) g.Node
- func ContentTypesListPage(currentApp *app.App, basePath string, ...) g.Node
- func CreateComponentSchemaPage(currentApp *app.App, basePath string, errorMsg string) g.Node
- func CreateContentTypePage(currentApp *app.App, basePath string, err string) g.Node
- func CreateEntryPage(currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, ...) g.Node
- func DangerButton(href, text string, icon g.Node) g.Node
- func DataTable(headers []string, rows []g.Node) g.Node
- func EditComponentSchemaPage(currentApp *app.App, basePath string, component *core.ComponentSchemaDTO, ...) g.Node
- func EditEntryPage(currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, ...) g.Node
- func EditFieldPage(currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, ...) g.Node
- func EmptyState(icon g.Node, title, description, actionText, actionHref string) g.Node
- func EntriesListPage(currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, ...) g.Node
- func EntryDetailPage(currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, ...) g.Node
- func FormatTime(t time.Time) string
- func FormatTimeAgo(t time.Time) string
- func IconButton(href string, icon g.Node, title, colorClass string) g.Node
- func PageHeader(title, description string, actions ...g.Node) g.Node
- func Pagination(currentPage, totalPages int, baseURL string) g.Node
- func PrimaryButton(href, text string, icon g.Node) g.Node
- func SearchInput(placeholder, value, formAction string) g.Node
- func SecondaryButton(href, text string, icon g.Node) g.Node
- func StatCard(title, value string, icon g.Node, colorClass string) g.Node
- func StatusBadge(status string) g.Node
- func TableCell(content g.Node) g.Node
- func TableCellActions(actions ...g.Node) g.Node
- func TableCellSecondary(content g.Node) g.Node
- func TableRow(cells ...g.Node) g.Node
- type BreadcrumbItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFieldPage ¶
func AddFieldPage( currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, allContentTypes []*core.ContentTypeSummaryDTO, err string, ) g.Node
AddFieldPage renders the add field form
func Breadcrumbs ¶
func Breadcrumbs(items ...BreadcrumbItem) g.Node
Breadcrumbs creates a breadcrumb navigation
func CMSOverviewPage ¶
func CMSOverviewPage( currentApp *app.App, basePath string, contentTypes []*core.ContentTypeSummaryDTO, stats *core.CMSStatsDTO, ) g.Node
CMSOverviewPage renders the CMS overview page with content types list
func CardWithHeader ¶
CardWithHeader creates a card with a header section
func ComponentSchemaSelector ¶
func ComponentSchemaSelector(components []*core.ComponentSchemaSummaryDTO, selectedName string) g.Node
ComponentSchemaSelector renders a select dropdown for choosing a component schema
func ComponentSchemasPage ¶
func ComponentSchemasPage( currentApp *app.App, basePath string, components []*core.ComponentSchemaSummaryDTO, page, pageSize, totalItems int, searchQuery string, ) g.Node
ComponentSchemasPage renders the component schemas list page
func ConfirmButton ¶
ConfirmButton creates a button that requires confirmation
func ContentTypeDetailPage ¶
func ContentTypeDetailPage( currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, stats *core.ContentTypeStatsDTO, environmentID string, allContentTypes []*core.ContentTypeSummaryDTO, allComponentSchemas []*core.ComponentSchemaSummaryDTO, ) g.Node
ContentTypeDetailPage renders the content type detail/edit page
func ContentTypesListPage ¶
func ContentTypesListPage( currentApp *app.App, basePath string, contentTypes []*core.ContentTypeSummaryDTO, page, pageSize, totalItems int, searchQuery string, ) g.Node
ContentTypesListPage renders the content types as a table
func CreateComponentSchemaPage ¶
CreateComponentSchemaPage renders the create component schema form
func CreateContentTypePage ¶
CreateContentTypePage renders the create content type form
func CreateEntryPage ¶
func CreateEntryPage( currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, err string, ) g.Node
CreateEntryPage renders the create entry form
func DangerButton ¶
DangerButton creates a danger/delete action button
func EditComponentSchemaPage ¶
func EditComponentSchemaPage( currentApp *app.App, basePath string, component *core.ComponentSchemaDTO, errorMsg string, ) g.Node
EditComponentSchemaPage renders the edit component schema form
func EditEntryPage ¶
func EditEntryPage( currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, entry *core.ContentEntryDTO, err string, ) g.Node
EditEntryPage renders the edit entry form
func EditFieldPage ¶
func EditFieldPage( currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, allContentTypes []*core.ContentTypeSummaryDTO, field *core.ContentFieldDTO, err string, ) g.Node
EditFieldPage renders the edit field form
func EmptyState ¶
EmptyState creates an empty state message
func EntriesListPage ¶
func EntriesListPage( currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, entries []*core.ContentEntryDTO, stats *core.ContentTypeStatsDTO, page, pageSize, totalItems int, searchQuery, statusFilter string, ) g.Node
EntriesListPage renders the entries list page for a content type
func EntryDetailPage ¶
func EntryDetailPage( currentApp *app.App, basePath string, contentType *core.ContentTypeDTO, entry *core.ContentEntryDTO, revisions []*core.ContentRevisionDTO, ) g.Node
EntryDetailPage renders the entry detail/view page
func FormatTimeAgo ¶
FormatTimeAgo formats a time as relative time
func IconButton ¶
IconButton creates a small icon button
func PageHeader ¶
PageHeader renders a standard page header with title, description, and optional actions
func Pagination ¶
Pagination renders pagination controls
func PrimaryButton ¶
PrimaryButton creates a primary action button
func SearchInput ¶
SearchInput creates a search input field
func SecondaryButton ¶
SecondaryButton creates a secondary action button
func StatusBadge ¶
StatusBadge creates a status-specific badge
func TableCellActions ¶
TableCellActions creates a table cell with action buttons
func TableCellSecondary ¶
TableCellSecondary creates a secondary table cell with muted text
Types ¶
type BreadcrumbItem ¶
BreadcrumbItem represents a breadcrumb item