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

Responsive goplus.org #29

Merged
merged 11 commits into from
Nov 10, 2021
Merged

Responsive goplus.org #29

merged 11 commits into from
Nov 10, 2021

Conversation

nighca
Copy link
Collaborator

@nighca nighca commented Nov 9, 2021

  • Responsive for both Pc & Mobile device
  • Upgrade next.js to 12.x

@vercel
Copy link

vercel bot commented Nov 9, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/goplus/www/AXz87aqqTfhdo9eDzG83YvLyEmys
✅ Preview: https://www-git-fork-nighca-mobile-goplus.vercel.app


export default function Footer() {
return (
<div className={styles.footer}>
<div className={styles.qiniuDoll}>
<img width={100} height={82} src="/qiniu_doll.png" alt="Qiniu Doll Logo" />
<Image width={100} height={82} src="/qiniu_doll.png" alt="Qiniu Doll Logo" />
Copy link
Contributor

Choose a reason for hiding this comment

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

NIP:用懒加载,拉到底下,延迟一下感觉怪怪的

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

哦我看别的地方大部分都用了 Image,我以为你这里是忘了改;我来感受下延迟

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

说起来懒加载倒是预期的优化,我感觉这个延迟还好,就先保持 Image 不变了

@2788
Copy link
Contributor

2788 commented Nov 9, 2021

这个好像可以解决从 getStaticProps 拿 markdown 往下传的问题,我简单的试了一下,貌似有作用。

@2788
Copy link
Contributor

2788 commented Nov 9, 2021

如果可用的话,应该也可以解决潘潘的问题?

@nighca
Copy link
Collaborator Author

nighca commented Nov 10, 2021

这个好像可以解决从 getStaticProps 拿 markdown 往下传的问题,我简单的试了一下,貌似有作用。

嗯,在这边应该是可以的;不过我有点想通过加一个 markdown 的 loader 来解决类似的问题,那样预期会比用这个 plugin 的复杂度低一点,坑应该也会少一点

如果可用的话,应该也可以解决潘潘的问题?

嗯这个攀攀也调研了,但是它有一些限制,比如 README 里提到的

Because this plugin runs code directly in Node.js, code is not executed in the typical Next.js server context. This means certain injections Next.js does at the bundler level will not be available. We try our best to mock this context via require('next'). For most data queries this should be sufficient, however please open an issue if something seems off.

所以在里边去依赖其他的普通代码很容易出问题,也不好读通过 .env 提供的环境变量等(这些也是我们遇到的相对麻烦的问题)

另外考虑它帮我们做了的事情自己做也很简单,就通过提前执行自己写的脚本来实现了;你可以回头看下攀攀的 PR

@nighca
Copy link
Collaborator Author

nighca commented Nov 10, 2021

不过我有点想通过加一个 markdown 的 loader 来解决类似的问题

用 preval 或者 markdown loader,这个我回头拿单独的 PR 来做吧,这个 PR 先不处理

// offset for element matches anchor
// https://stackoverflow.com/questions/4086107/fixed-page-header-overlaps-in-page-anchors#answer-56467997
html {
scroll-padding-top: $mobile-header-height;
Copy link
Contributor

Choose a reason for hiding this comment

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

高级

@qiukeren qiukeren merged commit 631dbe1 into goplus:master Nov 10, 2021
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.

3 participants