scroll

package
v1.2.37 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

templ: version: v0.3.1020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawerSlot

func DrawerSlot(c echo.Context, book *model.Book) templ.Component

卷轴阅读页面,放在侧栏里的【非共通设置】

func ImageXData

func ImageXData(Url string) string

ImageXData 在Go函数里面计算图片的x-data属性。渲染结果例: x-data="{ isDoublePage: false, imageUrl: '/api/get-file?id=asxScIDD&filename=1.jpg' + ($store.global.autoCrop ? "&auto_crop=1" : ")"

func InsertData

func InsertData(bookData any, serverStatus any) templ.Component

func InsertRawJSONScript

func InsertRawJSONScript(data string) templ.Component

func MainArea

func MainArea(c echo.Context, book *model.Book, loadMode string, pagedIndex int, pageLimit int) templ.Component

ScrollMainArea 定义 BodyHTML 需要更复杂的屏幕状态判断的时候,可以参考:https://developer.mozilla.org/zh-CN/docs/Web/API/Screen/orientation orientation: (screen.orientation || {}).type || screen.mozOrientation || screen.msOrientation tips:使用 alpine.js 的 x-init 和 fetch API 来加载 HTML 内容 tips: Alpine.js 动态CSS,只支持内联写法 min-h-16 是为了图片未加载时,图片高度为0,导致页面不美观。极端设置下会导致图片变形。 text-center:居中 alert文字,因为需要等待css加载,所以现在没设置alt文字。

func ScrollBookSwitch added in v1.2.33

func ScrollBookSwitch(view common.BookSwitchView) templ.Component

func ScrollLoadModeControls added in v1.2.30

func ScrollLoadModeControls() templ.Component

ScrollLoadModeControls 是 scroll 页面放在阅读历史上方的加载策略控件。

func ScrollModeHandler added in v1.1.0

func ScrollModeHandler(c echo.Context) error

ScrollModeHandler 阅读界面(卷轴阅读)

func ScrollPage

func ScrollPage(c echo.Context, book *model.Book, loadMode string, pagedIndex int, pageLimit int) templ.Component

ScrollPage 定义卷轴阅读页面。

func ScrollPagination

func ScrollPagination(book *model.Book, paginationIndex int, pageLimit int) 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