This commit is contained in:
Daniel 2025-06-10 12:23:07 +08:00
parent 49354816e3
commit 4c55a240f3
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 101 additions and 31 deletions

View file

@ -16,7 +16,11 @@
package av
import "sort"
import (
"sort"
"github.com/88250/lute/ast"
)
// LayoutGallery 描述了画廊布局的结构。
type LayoutGallery struct {
@ -33,6 +37,21 @@ type LayoutGallery struct {
CardIDs []string `json:"cardIds"` // 卡片 ID用于自定义排序
}
func NewLayoutGallery() *LayoutGallery {
return &LayoutGallery{
BaseLayout: &BaseLayout{
Spec: 0,
ID: ast.NewNodeID(),
Filters: []*ViewFilter{},
Sorts: []*ViewSort{},
PageSize: GalleryViewDefaultPageSize,
},
CoverFrom: CoverFromContentImage,
CardSize: CardSizeMedium,
ShowIcon: true,
}
}
type CardSize int
const (