tmpl

package
v0.0.0-...-ea2ceb1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

package html keeps the embedding of local (./) html file

if you want to add a template page use this template, modify, and place them accordingly:

var (
	...
	<template-name-lowercase> = parse("<filepath-relative-to-this-file>.html")
)

...

type <template-name-capitalized>Params struct {
	... // anything that goes here becomes a dot parameter to its template
}

func <template-name-capitalized>(w io.Writer, p <template-name-capitalized>Params) error {
	return <template-name-lowercase>.Execute(w, p)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Account

func Account(w io.Writer, p AccountParams) error

func AssetsFS

func AssetsFS() http.Handler

func Home

func Home(w io.Writer, p HomeParams) error

func Privacy

func Privacy(w io.Writer, p PrivacyParams) error

func Profile

func Profile(w io.Writer, p ProfileParams) error

func Settings

func Settings(w io.Writer, p SettingsParams) error

func UserLogin

func UserLogin(w io.Writer, p UserLoginParams) error

func UserRegister

func UserRegister(w io.Writer, p UserRegisterParams) error

Types

type AccountParams

type AccountParams struct {
	Title      string
	Name       string
	User       *manager.User
	IsVerified bool
}

type HomeParams

type HomeParams struct {
	Title       string
	Name        string
	DisplayForm bool
	Posts       []pensive.PostPublic
}

type PrivacyParams

type PrivacyParams struct {
	Title string
	Name  string
	User  *manager.User
}

type ProfileParams

type ProfileParams struct {
	Title string
	Name  string
	User  *manager.User
}

type SettingsParams

type SettingsParams struct {
	Title string
	Name  string
	User  *manager.User
}

type UserLoginParams

type UserLoginParams struct{}

type UserRegisterParams

type UserRegisterParams struct{}

Jump to

Keyboard shortcuts

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