webui

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package webui delivers Space Aurora HTML templates, SVG assets, and responsive stylesheets for the GitVerse platform.

Package webui holds what every page shares: site constants, the layout template, CSS and scripts. cmd/gendocs renders static pages with it; web renders results with it, so the two never drift.

Index

Constants

View Source
const (
	SiteURL         = "https://gitverse.vercel.app/"
	BasePath        = "/"
	RepoURL         = "https://github.com/TheVicky1/GitVerse.git"
	Install         = "go install github.com/TheVicky1/GitVerse/cmd/gitverse@latest"
	GAMeasurementID = "G-3EEKKGL110"
)

Variables

This section is empty.

Functions

func Initials

func Initials(name string) string

Initials is the first letter of the first two words, upper-case: "Open Sourcerer" → "OS".

func Rel

func Rel(u string) string

Rel keeps internal links root-relative, so a local preview stays local.

func Render

func Render(p Page) ([]byte, error)

Render renders a full page: layout plus p.Content.

func RenderFragment

func RenderFragment(name string, data any) ([]byte, error)

RenderFragment executes one named template from result.html or parts.html without the layout.

func Static

func Static(name string) ([]byte, error)

Static returns a file from static/ (style.css, app.js, callback.js).

Types

type Crumb

type Crumb struct{ Name, URL string }

Crumb is one breadcrumb entry.

type Page

type Page struct {
	Path, URL, Title, Description, Heading, Content string
	NoIndex, NoReferrer                             bool
	Crumbs                                          []Crumb
	JSONLD                                          []template.JS
	Scripts                                         []string // extra script paths, e.g. "/callback.js"
	Data                                            any
}

Page is one rendered page. Content names the template file that defines "content".

Jump to

Keyboard shortcuts

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