@@ -75,7 +75,7 @@ const LayoutBase = props => {
75
75
'relative mx-auto justify-center md:flex items-start py-8 px-2'
76
76
} >
77
77
{ /* 内容 */ }
78
- < div className = { `w-full ${ fullWidth ? '' : '' } px-4 max-w-[90rem] mx-auto ` } >
78
+ < div className = { `w-full ${ fullWidth ? '' : '' } px-4` } >
79
79
< Transition
80
80
show = { ! onLoading }
81
81
appear = { true }
@@ -125,10 +125,10 @@ const LayoutIndex = props => {
125
125
*/
126
126
const LayoutPostList = props => {
127
127
return (
128
- < >
128
+ < div className = 'max-w-[90rem] mx-auto' >
129
129
< SlotBar { ...props } />
130
130
{ siteConfig ( 'POST_LIST_STYLE' ) === 'page' ? < BlogListPage { ...props } /> : < BlogListScroll { ...props } /> }
131
- </ >
131
+ </ div >
132
132
)
133
133
}
134
134
@@ -155,15 +155,15 @@ const LayoutSlug = props => {
155
155
const exists = document . querySelectorAll ( '.video-wrapper' )
156
156
if ( exists && exists . length > 0 ) return
157
157
158
- // 创建一个新的容器元素
158
+ // 创建视频区块容器元素
159
159
const videoWrapper = document . createElement ( 'div' )
160
160
videoWrapper . className = 'video-wrapper py-1 px-3 bg-gray-100 dark:bg-white dark:text-black mx-auto'
161
161
162
- // 创建一个新的容器元素
162
+ // 创建走马灯封装容器元素
163
163
const carouselWrapper = document . createElement ( 'div' )
164
164
carouselWrapper . classList . add ( 'notion-carousel-wrapper' )
165
165
166
- // 创建一个用于保存 figcaption 文本内容的数组
166
+ // 创建分集按钮figcaption文本的数组
167
167
const figCaptionValues = [ ]
168
168
169
169
// 遍历所有 .notion-asset-wrapper 元素
@@ -178,7 +178,7 @@ const LayoutSlug = props => {
178
178
)
179
179
return
180
180
181
- if ( ! figCaption && siteConfig ( 'MOVIE_VIDEO_COMBINE_AUTO' , false , CONFIG ) ) return // 如果没有子元素 figcaption,则不处理该元素
181
+ if ( ! figCaption ) return // 如果没有子元素 figcaption,则不处理该元素
182
182
183
183
// 获取 figcaption 的文本内容并添加到数组中
184
184
const figCaptionValue = figCaption ? figCaption ?. textContent ?. trim ( ) : `P-${ index } `
@@ -224,14 +224,16 @@ const LayoutSlug = props => {
224
224
figCaptionWrapper . appendChild ( div )
225
225
} )
226
226
227
- // 将包含 figcaption 值的容器元素添加到 notion-article 的第一个子元素插入
228
- videoWrapper . appendChild ( carouselWrapper )
229
- // 显示分集按钮 ,caption的视频数量大于1个
230
- if ( figCaptionValues . length > 1 || siteConfig ( 'MOVIE_VIDEO_COMBINE_SHOW_PAGE_FORCE' , false , CONFIG ) ) {
231
- videoWrapper . appendChild ( figCaptionWrapper )
227
+ if ( carouselWrapper . children . length > 0 ) {
228
+ // 将包含 figcaption 值的容器元素添加到 notion-article 的第一个子元素插入
229
+ videoWrapper . appendChild ( carouselWrapper )
230
+ // 显示分集按钮 大于1集才显示 ;或者用户 要求强制显示
231
+ if ( figCaptionWrapper . children . length > 1 || siteConfig ( 'MOVIE_VIDEO_COMBINE_SHOW_PAGE_FORCE' , false , CONFIG ) ) {
232
+ videoWrapper . appendChild ( figCaptionWrapper )
233
+ }
234
+ // 放入页面
235
+ notionArticle . insertBefore ( videoWrapper , notionArticle . firstChild )
232
236
}
233
-
234
- notionArticle . insertBefore ( videoWrapper , notionArticle . firstChild )
235
237
}
236
238
237
239
setTimeout ( ( ) => {
@@ -268,7 +270,7 @@ const LayoutSlug = props => {
268
270
return (
269
271
< >
270
272
{ ! lock ? (
271
- < div id = 'article-wrapper' className = 'px-2 max-w-6xl mx-auto' >
273
+ < div id = 'article-wrapper' className = 'px-2 max-w-5xl 2xl:max-w-[70%] mx-auto' >
272
274
{ /* 标题 */ }
273
275
< ArticleInfo post = { post } />
274
276
{ /* 页面元素 */ }
0 commit comments