templates

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

templ: version: 0.2.476

templ: version: 0.2.476

templ: version: 0.2.476

templ: version: 0.2.476

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Document

func Document(vars DocumentVars) templ.Component

func Error

func Error(vars ErrorVars) templ.Component

func WriteUnsafe

func WriteUnsafe(str string) templ.Component

Types

type DocumentVars

type DocumentVars struct {
	ID      string
	Version int64
	Edit    bool

	Files       []File
	CurrentFile int
	Versions    []DocumentVersion

	Preview    bool
	PreviewAlt string

	Lexers []string
	Styles []Style
	Style  string
	Theme  string
	Max    int
	Host   string
}

func (DocumentVars) FileClasses

func (v DocumentVars) FileClasses(i int) string

func (DocumentVars) FileTabClasses

func (v DocumentVars) FileTabClasses(i int) string

func (DocumentVars) PreviewURL

func (v DocumentVars) PreviewURL() string

func (DocumentVars) StateJSON

func (v DocumentVars) StateJSON() string

func (DocumentVars) ThemeCSSURL

func (v DocumentVars) ThemeCSSURL() string

func (DocumentVars) URL

func (v DocumentVars) URL() string

type DocumentVersion

type DocumentVersion struct {
	Version int64
	Label   string
	Time    string
}

type ErrorVars

type ErrorVars struct {
	Error     string
	Status    int
	Path      string
	RequestID string
}

type File

type File struct {
	Name      string `json:"name"`
	Content   string `json:"content"`
	Formatted string `json:"formatted"`
	Language  string `json:"language"`
}

type Style

type Style struct {
	Name  string
	Theme string
}

Jump to

Keyboard shortcuts

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