Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

game 主题,页面加上通用的底部列表 #2910

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 27 additions & 21 deletions themes/game/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ export const useGameGlobal = () => useContext(ThemeGlobalGame)
* @constructor
*/
const LayoutBase = props => {
const { allNavPages, children, siteInfo } = props
const {
allNavPages,
children,
siteInfo,
tagOptions,
currentTag,
categoryOptions,
currentCategory
} = props
const searchModal = useRef(null)
// 在列表中进行实时过滤
const [filterKey, setFilterKey] = useState('')
Expand Down Expand Up @@ -107,6 +115,23 @@ const LayoutBase = props => {
{/* 右侧 */}
<main className='flex-grow w-full h-full flex flex-col min-h-screen overflow-x-auto md:p-2'>
<div className='flex-grow h-full'>{children}</div>
{/* 广告 */}
<div className='w-full py-4'>
<AdSlot type='in-article' />
</div>

{/* 主区域下方 导览 */}
<div className='w-full bg-white dark:bg-hexo-black-gray rounded-lg p-2'>
{/* 标签汇总 */}
<GroupCategory
categoryOptions={categoryOptions}
currentCategory={currentCategory}
/>
<hr />
<GroupTag tagOptions={tagOptions} currentTag={currentTag} />
{/* 站点公告信息 */}
<Announcement {...props} className='p-2' />
</div>
<Footer />
</main>
</div>
Expand All @@ -130,8 +155,7 @@ const LayoutBase = props => {
* @returns
*/
const LayoutIndex = props => {
const { tagOptions, currentTag, categoryOptions, currentCategory, siteInfo } =
props
const { siteInfo } = props
return (
<>
{/* 首页移动端顶部导航 */}
Expand All @@ -142,24 +166,6 @@ const LayoutIndex = props => {
<GameListRecent />
{/* 游戏列表 */}
<LayoutPostList {...props} />

{/* 广告 */}
<div className='w-full'>
<AdSlot type='in-article' />
</div>

{/* 主区域下方 导览 */}
<div className='w-full bg-white dark:bg-hexo-black-gray rounded-lg p-2'>
{/* 标签汇总 */}
<GroupCategory
categoryOptions={categoryOptions}
currentCategory={currentCategory}
/>
<hr />
<GroupTag tagOptions={tagOptions} currentTag={currentTag} />
{/* 站点公告信息 */}
<Announcement {...props} className='p-2' />
</div>
</>
)
}
Expand Down