支持设置分列数量,1~4列

This commit is contained in:
liuzhihang 2022-10-22 11:08:19 +08:00
parent 3ad80df398
commit d631813829
3 changed files with 25 additions and 2 deletions

View File

@ -77,7 +77,7 @@ spec:
formSchema:
- $formkit: select
name: cols
label: 文章列表布局(无效)
label: 文章列表布局
value: col1
options:
- label: 单列

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -8280,7 +8280,7 @@ span.recent-post-top-text {
}
#recent-posts > .recent-post-item:not(:first-child) {
width: calc(50% - 0.5rem);
/*width: calc(50% - 0.5rem);*/
margin-top: 0.25rem;
margin-bottom: 0.75rem;
box-shadow: var(--heo-shadow-border);
@ -8291,6 +8291,29 @@ span.recent-post-top-text {
transform: scale(0.97);
}
/* 设置分列 */
/* 1 列:左右排列 */
#recent-posts > .recent-post-item.col1 {
width: calc(100% - .5rem);
flex-direction: row;
}
/* 2 列 */
#recent-posts > .recent-post-item.col2 {
width: calc(100% / 2 - .5rem);
}
/* 3 列 */
#recent-posts > .recent-post-item.col3 {
width: calc(100% / 3 - .5rem);
}
/* 4 列 */
#recent-posts > .recent-post-item.col4 {
width: calc(100% / 4 - .5rem);
}
#category-bar {
margin-bottom: 0.75rem;
box-shadow: var(--heo-shadow-border);