common

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

templ: version: v0.3.865

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Drawer

func Drawer(serverHost string, slot templ.Component) templ.Component
func Footer(version string) templ.Component

func GetImageAlt

func GetImageAlt(key int) string

GetImageAlt 获取图片的 alt 属性

func GetPageTitle

func GetPageTitle(bookID string) string

GetPageTitle 获取页面标题

func GetReturnUrl

func GetReturnUrl(BookID string) string

GetReturnUrl 阅读或书架页面,返回按钮实际使用的链接

func Header(prop HeaderProps) templ.Component

bg-base-100/50 透明背景 backdrop-blur-sm 模糊背景 暂时没加上,因为现在不生效 可能是因为父元素或祖先元素上存在一些会创建新的层叠上下文或隔离背景的属性(例如 overflow: hidden、opacity<1、transform、filter、isolation 等)造成的

func Html

func Html(c echo.Context, s *state.GlobalState, bodyContent templ.Component, insertScript []string) templ.Component

Html 定义网页布局

func MessageModal

func MessageModal() templ.Component

func QRCode

func QRCode(serverHost string) templ.Component

func QuickJumpBarBooks

func QuickJumpBarBooks(b *model.Book) (list *model.BookInfoList)

func ServerHostBindStr

func ServerHostBindStr(serverHost string) string

ServerHostBindStr 传递给前端,显示QRCode用的"主机域名"字符串

func ShowQuickJumpBar

func ShowQuickJumpBar(b *model.Book) (QuickJumpBar bool)

func Toast

func Toast() templ.Component

func UploadArea

func UploadArea(s *state.GlobalState) templ.Component

Types

type HeaderProps

type HeaderProps struct {
	BookID            string
	Title             string
	ShowReturnIcon    bool
	ReturnUrl         string
	SetDownLoadLink   bool
	InShelf           bool
	DownLoadLink      string
	SetTheme          bool
	FlipMode          bool
	ShowQuickJumpBar  bool
	QuickJumpBarBooks *model.BookInfoList
}

Directories

Path Synopsis
templ: version: v0.3.865
templ: version: v0.3.865

Jump to

Keyboard shortcuts

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