web

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package web provides embedded static assets and templ-based UI components and pages for Outtake.

Index

Constants

View Source
const CSRFFormField = "_csrf"

CSRFFormField is the hidden form field name for Fiber CSRF tokens.

Variables

View Source
var Assets embed.FS

Assets contains the embedded static assets (CSS, JavaScript, brand icons).

Functions

func CSRFHeaderJSON

func CSRFHeaderJSON(ctx context.Context) string

CSRFHeaderJSON returns hx-headers JSON for the CSRF header.

Parameters:

  • ctx: Request context that may carry a CSRF token.

Returns:

  • JSON object mapping X-Csrf-Token, or empty when no token is set.

func CSRFToken

func CSRFToken(ctx context.Context) string

CSRFToken returns the CSRF token stored on ctx.

Parameters:

  • ctx: Request context, optionally carrying a token from middleware.

Returns:

  • Token string, or empty when none is present.

func ContextWithCSRFToken

func ContextWithCSRFToken(parent context.Context, token string) context.Context

ContextWithCSRFToken stores a CSRF token on ctx for templates.

Parameters:

  • parent: Parent context.
  • token: CSRF token to store.

Returns:

  • Derived context that carries the token.

Types

This section is empty.

Directories

Path Synopsis
components
nav
Package handlers provides HTTP request handlers for the outtake API and HTML UI.
Package handlers provides HTTP request handlers for the outtake API and HTML UI.
Package middleware provides HTTP middleware for the outtake API.
Package middleware provides HTTP middleware for the outtake API.
Package theme catalogs selectable UI color palettes.
Package theme catalogs selectable UI color palettes.
Package view holds shared HTML view models for Outtake pages and widgets.
Package view holds shared HTML view models for Outtake pages and widgets.

Jump to

Keyboard shortcuts

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