pages

package
v0.0.0-...-9c28865 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

templ: version: v0.2.663

templ: version: v0.2.663

templ: version: v0.2.663

templ: version: v0.2.663

templ: version: v0.2.663

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blog404

func Blog404(pages *[]BlogPost) templ.Component

func BlogContent

func BlogContent(p BlogPost) templ.Component

func BlogIndex

func BlogIndex(pages *[]BlogPost) templ.Component

func Layout

func Layout(data Data, content templ.Component) templ.Component

func NotFound

func NotFound() templ.Component

func OpenAiChat

func OpenAiChat(chat Chat) templ.Component

func OpenAiTranslate

func OpenAiTranslate(trans []Translation) templ.Component

TRANSLATION PAGE

func PageContent

func PageContent(p BlogPost) templ.Component

func Style

func Style(css string) templ.Component

func Translated

func Translated(trans []Translation) templ.Component

Types

type BlogMeta

type BlogMeta map[string]interface{}

type BlogPost

type BlogPost struct {
	Title  string
	Body   []byte
	Path   string
	Listed bool
	BlogMeta
}

func MdToPage

func MdToPage(file []byte, baseUrl string) (BlogPost, error)

func (BlogPost) Render

func (p BlogPost) Render(ctx context.Context, w io.Writer) error

type Chat

type Chat struct {
	// contains filtered or unexported fields
}

type Data

type Data struct {
	DocTitle    string
	Metadata    map[string]string
	TopNav      []Link
	FooterLinks []Link
	StyleInline templ.Component
	StyleTheme  templ.Component
}
type Link struct {
	Url      string
	Text     string
	External bool
}

type Page

type Page struct {
	Title string
	Body  []byte
	// Path  string
	PageMeta
}

func (Page) Render

func (p Page) Render(ctx context.Context, w io.Writer) error

type PageMeta

type PageMeta map[string]interface{}

type Theme

type Theme struct {
	ColorPrimary       string
	ColorSecondary     string
	ColorBackground    string
	ColorBackgroundAlt string
	ColorText          string
	ColorTextMuted     string
	ColorBorder        string
	BorderRadius       string
}

func (Theme) Component

func (t Theme) Component() (templ.Component, error)

type Translation

type Translation struct {
	Prompt  string
	Choices []string
}

Jump to

Keyboard shortcuts

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