mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Database gallery view https://github.com/siyuan-note/siyuan/issues/10414
This commit is contained in:
parent
49354816e3
commit
4c55a240f3
5 changed files with 101 additions and 31 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue