+ id='top-group'
+ className='w-full flex space-x-3 xl:space-x-0 xl:grid xl:grid-cols-3 xl:gap-3 xl:h-[342px]'>
{topPosts?.map((p, index) => {
return (
+
-
+
{p?.title}
{/* hover 悬浮的 ‘荐’ 字 */}
-
@@ -256,7 +245,7 @@ function TopGroup(props) {
)
})}
-
+
)
}
@@ -277,7 +266,11 @@ function getTopPosts({ latestPosts, allNavPages }) {
let sortPosts = []
// 排序方式
- if (JSON.parse(siteConfig('HEO_HERO_RECOMMEND_POST_SORT_BY_UPDATE_TIME', null, CONFIG))) {
+ if (
+ JSON.parse(
+ siteConfig('HEO_HERO_RECOMMEND_POST_SORT_BY_UPDATE_TIME', null, CONFIG)
+ )
+ ) {
sortPosts = Object.create(allNavPages).sort((a, b) => {
const dateA = new Date(a?.lastEditedDate)
const dateB = new Date(b?.lastEditedDate)
@@ -293,7 +286,11 @@ function getTopPosts({ latestPosts, allNavPages }) {
break
}
// 查找标签
- if (post?.tags?.indexOf(siteConfig('HEO_HERO_RECOMMEND_POST_TAG', null, CONFIG)) >= 0) {
+ if (
+ post?.tags?.indexOf(
+ siteConfig('HEO_HERO_RECOMMEND_POST_TAG', null, CONFIG)
+ ) >= 0
+ ) {
topPosts.push(post)
}
}
@@ -306,6 +303,7 @@ function getTopPosts({ latestPosts, allNavPages }) {
*/
function TodayCard({ cRef, siteInfo }) {
const router = useRouter()
+ const link = siteConfig('HEO_HERO_TITLE_LINK', null, CONFIG)
// 卡牌是否盖住下层
const [isCoverUp, setIsCoverUp] = useState(true)
@@ -334,56 +332,55 @@ function TodayCard({ cRef, siteInfo }) {
* @param {*} e
*/
function handleCardClick(e) {
- router.push(siteConfig('HEO_HERO_TITLE_LINK', null, CONFIG))
+ router.push(link)
}
return (
+ } overflow-hidden absolute hidden xl:flex flex-1 flex-col h-full top-0 w-full`}>
+ } shadow transition-all duration-200 today-card h-full bg-[#0E57D5] rounded-xl relative overflow-hidden flex items-end`}>
-
-
{siteConfig('HEO_HERO_TITLE_4', null, CONFIG)}
-
{siteConfig('HEO_HERO_TITLE_5', null, CONFIG)}
+ id='today-card-info'
+ className='z-10 flex justify-between w-full relative text-white p-10 items-end'>
+
+
+ {siteConfig('HEO_HERO_TITLE_4', null, CONFIG)}
+
+
+ {siteConfig('HEO_HERO_TITLE_5', null, CONFIG)}
+
+ } flex items-center px-3 h-10 justify-center bg-[#425aef] hover:bg-[#4259efcb] transition-colors duration-100 rounded-3xl`}>
-
+ }}>
)