惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MongoDB | Blog
MongoDB | Blog
罗磊的独立博客
美团技术团队
B
Blog
量子位
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
P
Proofpoint News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题

Mr. Will

Teaching AI When to Stay Silent 不会翻译的话,其实可以不翻译的 Announcing The Vernal Fortnightly 2025 年终总结 Tailwind as a Headwind Kickstarting a New Mac Refining My Domain Email 2024:浏览器从 A 到 Z 数模转换:微喷打印影像输出! “严谨”的混乱——数学 2023 年度总结 这不过是个开场 Hello, Tags, Categories, LaTeX and Rainbow! Encrypt it on Your Own! About Comments GitHub's Own Dark Mode! Theme Cupertino is Updated From Now on, I Can't Respond on Weekdays Apple Newsroom's UI is Updated
My Home Page, Reimagined
Mr. Will · 2025-09-28 · via Mr. Will

My home page is at mrwillcom.com. Last time I refactor my home page is over 3 years ago. That version was based on Markdown, written in Nunjucks and built by Eleventy. Information used to live in tables, which wasn’t eye-catching enough. All layouts were similar and boring. This prompts me to begin refactoring my home page again.

Designing

My idea is inspired by Vercel’s home page. Square and light borders can make the main area stand out and attract the visitors to focus the main area. I used pure white for the main area, but a brighter black for it in dark mode, so the main area is always brighter than the underlying background.

For typography, I chose Inter for all sans-serif fonts and Geist Mono for monospaced fonts. These fonts behaves well even when they are small. Bigger font size ratio makes it more expressive.

A screenshot of the top part of my new home page.

Colors are chosen carefully in mind. The default text colors are subtler than normal, making space for the emphasized text. Font sizes everywhere are adjusted by hand, allowing them to fit the whole context. Many other details are also well-considered, including italics, cases, weights and more.

Technologies

This time, I selected Next.js as the framework. Next.js handles more at server side, so it performs better in client-side performance and SEO.

Tailwind CSS sucks. In order to boost my home page, I chose SCSS as usual, elegant and enhanced CSS that does not pollute your codebase.

In this project, I decided to use state-of-the-art web technologies. I believe these features will be available to more and more visitors.

sibling-index()

With sibling-index(), you will no longer need JavaScript for alternating delays of the sibling elements.

1
2
3
4
5
6
7
8
<div class="container si-demo">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@keyframes si-demo-animation {
0% {
opacity: 0;
translate: 0 16px;
}
50% {
opacity: 1;
translate: 0;
}
100% {
opacity: 0;
translate: 0 -16px;
}
}

.si-demo > .item {
animation: si-demo-animation 2s infinite;
animation-delay: calc(sibling-index() * 0.1s);
}

If your browser doesn’t support this feature, you won’t see the demo correctly. Current support status:

animation-timeline: view()

Yet another un-Javascript-ify feature. With this, you no longer have to use JavaScript for tracking the position in the viewport of an element.

1
2
3
<div class="container view-animation-demo">
<div class="dot"></div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@keyframes view-animation-demo-animation {
0% {
opacity: 0.6;
width: 0%;
}
50% {
opacity: 1;
}
100% {
opacity: 0.6;
width: 100%;
}
}

.view-animation-demo > .dot {
animation: view-animation-demo-animation linear both;
animation-timeline: view(block);
}

Looks like this:

If your browser doesn’t support this feature, you won’t see the demo correctly. Current support status:

Optimizing

During the refactoring of my home page, I wished that my new home page can have a more excellent performance. So I improved my home page’s score according to the Lighthouse scores. The final result is stunning:

My home page's Lighthouse scores are 95 for Performance, and 100 for Accessibility, Best Practices, and SEO.
Tested on MacBook Air M4, the result of "Performance" may vary on different devices.

You can also view the full report with the report viewer.

Easter Eggs

I’ve set an easter egg in my new home page. Until now, only 3.73% of the visitors have discovered it. Have fun! 🥳