@@ -44,7 +44,15 @@ export const useGameGlobal = () => useContext(ThemeGlobalGame)
44
44
* @constructor
45
45
*/
46
46
const LayoutBase = props => {
47
- const { allNavPages, children, siteInfo } = props
47
+ const {
48
+ allNavPages,
49
+ children,
50
+ siteInfo,
51
+ tagOptions,
52
+ currentTag,
53
+ categoryOptions,
54
+ currentCategory
55
+ } = props
48
56
const searchModal = useRef ( null )
49
57
// 在列表中进行实时过滤
50
58
const [ filterKey , setFilterKey ] = useState ( '' )
@@ -107,6 +115,23 @@ const LayoutBase = props => {
107
115
{ /* 右侧 */ }
108
116
< main className = 'flex-grow w-full h-full flex flex-col min-h-screen overflow-x-auto md:p-2' >
109
117
< div className = 'flex-grow h-full' > { children } </ div >
118
+ { /* 广告 */ }
119
+ < div className = 'w-full py-4' >
120
+ < AdSlot type = 'in-article' />
121
+ </ div >
122
+
123
+ { /* 主区域下方 导览 */ }
124
+ < div className = 'w-full bg-white dark:bg-hexo-black-gray rounded-lg p-2' >
125
+ { /* 标签汇总 */ }
126
+ < GroupCategory
127
+ categoryOptions = { categoryOptions }
128
+ currentCategory = { currentCategory }
129
+ />
130
+ < hr />
131
+ < GroupTag tagOptions = { tagOptions } currentTag = { currentTag } />
132
+ { /* 站点公告信息 */ }
133
+ < Announcement { ...props } className = 'p-2' />
134
+ </ div >
110
135
< Footer />
111
136
</ main >
112
137
</ div >
@@ -130,8 +155,7 @@ const LayoutBase = props => {
130
155
* @returns
131
156
*/
132
157
const LayoutIndex = props => {
133
- const { tagOptions, currentTag, categoryOptions, currentCategory, siteInfo } =
134
- props
158
+ const { siteInfo } = props
135
159
return (
136
160
< >
137
161
{ /* 首页移动端顶部导航 */ }
@@ -142,24 +166,6 @@ const LayoutIndex = props => {
142
166
< GameListRecent />
143
167
{ /* 游戏列表 */ }
144
168
< LayoutPostList { ...props } />
145
-
146
- { /* 广告 */ }
147
- < div className = 'w-full' >
148
- < AdSlot type = 'in-article' />
149
- </ div >
150
-
151
- { /* 主区域下方 导览 */ }
152
- < div className = 'w-full bg-white dark:bg-hexo-black-gray rounded-lg p-2' >
153
- { /* 标签汇总 */ }
154
- < GroupCategory
155
- categoryOptions = { categoryOptions }
156
- currentCategory = { currentCategory }
157
- />
158
- < hr />
159
- < GroupTag tagOptions = { tagOptions } currentTag = { currentTag } />
160
- { /* 站点公告信息 */ }
161
- < Announcement { ...props } className = 'p-2' />
162
- </ div >
163
169
</ >
164
170
)
165
171
}
0 commit comments