views

package
v0.0.0-...-2dbaee0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package views provides the page templates for different sections of the skladka frontend. Each view is implemented as a templ template and represents a complete page or major section of the application.

The views in this package are responsible for:

  • Composing components into complete pages
  • Implementing page-specific logic and interactions
  • Managing the layout and structure of each section
  • Handling data display and user input

Available Views

  • Archive: Displays a list of all public pastes
  • Creation: Form for creating new pastes
  • Document: Displays a single paste with its content and metadata

Example Usage

func renderCreationPage(w http.ResponseWriter, r *http.Request) {
	layouts.Base(
		views.Creation("New Paste"),
	).Render(r.Context(), w)
}

Views are designed to work with the [layouts] package for consistent page structure and the components package for reusable UI elements. Each view is type-safe and compiled at build time by the templ engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive

func Archive(title string, pastes []paste.Paste) templ.Component

func Creation

func Creation(name string) templ.Component

func Document

func Document(paste paste.Paste) templ.Component

func PasswordPrompt

func PasswordPrompt(reference string) templ.Component

func RawPasswordPrompt

func RawPasswordPrompt(reference string) templ.Component

Types

This section is empty.

Jump to

Keyboard shortcuts

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