Skip to content

[Feature] Blog Category #121

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

Merged
merged 8 commits into from
Apr 11, 2025
Merged

[Feature] Blog Category #121

merged 8 commits into from
Apr 11, 2025

Conversation

sunzhongkai588
Copy link
Contributor

@sunzhongkai588 sunzhongkai588 commented Mar 21, 2025

#118 博客分类功能的基础上

  • 正确展示每个类别下的 page url(其中分类为all时,url不加参数)
  • 回到首页时自动刷新页面
  • if (typeof window !== 'undefined') 使得构建成功

@sunzhongkai588 sunzhongkai588 requested a review from SigureMo March 21, 2025 05:43
Copy link

netlify bot commented Mar 21, 2025

Deploy Preview for pfccblog ready!

Name Link
🔨 Latest commit d6984b0
🔍 Latest deploy log https://app.netlify.com/sites/pfccblog/deploys/67f9557af9f46f0008ffe71d
😎 Deploy Preview https://deploy-preview-121--pfccblog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@SigureMo
Copy link
Collaborator

哪个 LLM 写的?得调整成符合项目规范的写法

@sunzhongkai588
Copy link
Contributor Author

哪个 LLM 写的?得调整成符合项目规范的写法

Claude + StackOverflow搜的,一师傅你帮我改下吧🥹

Copy link
Collaborator

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

写的很好 下次不要写了

</script>

<template>
<div class="antialiased dark:bg-neutral-900 min-h-screen">
<div class="max-w-3xl mx-auto px-4 sm:px-6 xl:max-w-5xl xl:px-0">
<nav class="flex justify-between items-center py-10 font-bold">
<a class="text-xl" href="/" :aria-label="site.title">
<!-- 修改首页链接,添加 @click 事件处理器 -->
<a class="text-xl" href="/" @click="resetCategory" :aria-label="site.title">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有什么用吗?删掉也没什么影响

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有什么用吗?删掉也没什么影响

那删了

const basePath = pageNum === 1 ? '/' : `/pages/${pageNum}`

// 如果在服务器端渲染,无法获取查询参数,直接返回基础链接
if (typeof window === 'undefined') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那这段逻辑的意义是什么呢?给自己开发时候看的?上线之后还是没有效果

所有 if (typeof window === 'undefined') { 都有这个问题,写了和没写一样

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那这段逻辑的意义是什么呢?给自己开发时候看的?上线之后还是没有效果

所有 if (typeof window === 'undefined') { 都有这个问题,写了和没写一样

解决 node.js build 报错的

@SigureMo SigureMo added this pull request to the merge queue Apr 11, 2025
Merged via the queue into PFCCLab:main with commit d0aa783 Apr 11, 2025
6 checks passed
@sunzhongkai588
Copy link
Contributor Author

再次申明,博客由 @SigureMo 共同维护

@SigureMo
Copy link
Collaborator

再次申明,博客由 @SigureMo 共同维护

放弃维护,后续维护由 @sunzhongkai588 一力承担

@sunzhongkai588
Copy link
Contributor Author

再次申明,博客由 @SigureMo 共同维护

放弃维护,后续维护由 @sunzhongkai588 一力承担

だめ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants