Skip to content

Commit c0d838b

Browse files
kiakingbrc-ddLehoczky
authored
feat(theme)!: final re-brand (#2727)
Co-authored-by: Divyansh Singh <[email protected]> Co-authored-by: Lehoczky Zoltán <[email protected]>
1 parent 1d6254b commit c0d838b

13 files changed

+234
-123
lines changed

Diff for: docs/.vitepress/config.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,22 @@ export default defineConfig({
2020
},
2121

2222
head: [
23-
['meta', { name: 'theme-color', content: '#3c8772' }],
23+
['link', { rel: 'icon', href: '/vitepress-logo-mini.svg' }],
24+
['meta', { name: 'theme-color', content: '#5f67ee' }],
25+
['meta', { name: 'og:type', content: 'website' }],
26+
['meta', { name: 'og:locale', content: 'en' }],
27+
['meta', { name: 'og:site_name', content: 'VitePress' }],
28+
[
29+
'meta',
30+
{ name: 'og:image', content: 'https://vitepress.dev/vitepress-og.jpg' }
31+
],
32+
[
33+
'meta',
34+
{
35+
name: 'twitter:image',
36+
content: 'https://vitepress.dev/vitepress-og.jpg'
37+
}
38+
],
2439
[
2540
'script',
2641
{
@@ -33,6 +48,8 @@ export default defineConfig({
3348
],
3449

3550
themeConfig: {
51+
logo: { src: '/vitepress-logo-mini.svg', width: 24, height: 24 },
52+
3653
nav: nav(),
3754

3855
sidebar: {

Diff for: docs/index.md

+24
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ hero:
1515
- theme: alt
1616
text: View on GitHub
1717
link: https://github.com/vuejs/vitepress
18+
image:
19+
src: /vitepress-logo-large.webp
20+
alt: VitePress
1821

1922
features:
2023
- icon: 📝
@@ -30,3 +33,24 @@ features:
3033
title: Ship Fast Sites
3134
details: Fast initial load with static HTML, fast post-load navigation with client-side routing.
3235
---
36+
<style>
37+
:root {
38+
--vp-home-hero-name-color: transparent;
39+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);
40+
41+
--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
42+
--vp-home-hero-image-filter: blur(40px);
43+
}
44+
45+
@media (min-width: 640px) {
46+
:root {
47+
--vp-home-hero-image-filter: blur(56px);
48+
}
49+
}
50+
51+
@media (min-width: 960px) {
52+
:root {
53+
--vp-home-hero-image-filter: blur(72px);
54+
}
55+
}
56+
</style>

Diff for: docs/public/vitepress-logo-large.webp

33.2 KB
Binary file not shown.

Diff for: docs/public/vitepress-logo-mini.svg

+1
Loading

Diff for: docs/public/vitepress-og.jpg

250 KB
Loading

Diff for: src/client/theme-default/components/VPBadge.vue

+22-12
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,36 @@ defineProps<{
1616
display: inline-block;
1717
margin-left: 2px;
1818
border: 1px solid transparent;
19-
border-radius: 10px;
20-
padding: 0 8px;
21-
line-height: 18px;
19+
border-radius: 12px;
20+
padding: 0 10px;
21+
line-height: 22px;
2222
font-size: 12px;
2323
font-weight: 600;
2424
transform: translateY(-2px);
2525
}
2626
27-
h1 .VPBadge,
28-
h2 .VPBadge,
29-
h3 .VPBadge,
30-
h4 .VPBadge,
31-
h5 .VPBadge,
32-
h6 .VPBadge {
33-
vertical-align: text-top;
27+
.vp-doc h1 > .VPBadge {
28+
margin-top: 4px;
29+
vertical-align: top;
3430
}
3531
36-
h2 .VPBadge {
37-
border-radius: 11px;
32+
.vp-doc h2 > .VPBadge {
33+
margin-top: 3px;
3834
line-height: 20px;
35+
padding: 0 8px;
36+
vertical-align: top;
37+
}
38+
39+
.vp-doc h3 > .VPBadge {
40+
line-height: 20px;
41+
vertical-align: middle;
42+
}
43+
44+
.vp-doc h4 > .VPBadge,
45+
.vp-doc h5 > .VPBadge,
46+
.vp-doc h6 > .VPBadge {
47+
vertical-align: middle;
48+
line-height: 18px;
3949
}
4050
4151
.VPBadge.info {

Diff for: src/client/theme-default/components/VPDocOutlineDropdown.vue

+9-8
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,20 @@ onContentUpdated(() => {
3636

3737
<style scoped>
3838
.VPDocOutlineDropdown {
39-
margin-bottom: 42px;
39+
margin-bottom: 48px;
4040
}
4141
4242
.VPDocOutlineDropdown button {
4343
display: block;
4444
font-size: 14px;
4545
font-weight: 500;
4646
line-height: 24px;
47-
color: var(--vp-c-text-2);
48-
transition: color 0.5s;
4947
border: 1px solid var(--vp-c-border);
5048
padding: 4px 12px;
49+
color: var(--vp-c-text-2);
50+
background-color: var(--vp-c-mute);
5151
border-radius: 8px;
52+
transition: color 0.5s;
5253
}
5354
5455
.VPDocOutlineDropdown button:hover {
@@ -63,22 +64,22 @@ onContentUpdated(() => {
6364
.icon {
6465
display: inline-block;
6566
vertical-align: middle;
66-
margin-left: 2px;
67-
width: 14px;
68-
height: 14px;
67+
width: 16px;
68+
height: 16px;
6969
fill: currentColor;
7070
}
7171
7272
:deep(.outline-link) {
73-
font-size: 13px;
73+
font-size: 14px;
74+
font-weight: 400;
7475
}
7576
7677
.open > .icon {
7778
transform: rotate(90deg);
7879
}
7980
8081
.items {
81-
margin-top: 10px;
82+
margin-top: 12px;
8283
border-left: 1px solid var(--vp-c-divider);
8384
}
8485
</style>

Diff for: src/client/theme-default/components/VPDocOutlineItem.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function onClick({ target: el }: Event) {
3131
}
3232
3333
.nested {
34-
padding-left: 13px;
34+
padding-left: 16px;
3535
}
3636
3737
.outline-link {
@@ -42,7 +42,7 @@ function onClick({ target: el }: Event) {
4242
overflow: hidden;
4343
text-overflow: ellipsis;
4444
transition: color 0.5s;
45-
font-weight: 500;
45+
font-weight: 400;
4646
}
4747
4848
.outline-link:hover,

Diff for: src/client/theme-default/components/VPLocalNavOutlineDropdown.vue

+28-14
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@ function scrollToTop() {
5858
class="items"
5959
@click="onItemClick"
6060
>
61-
<a class="top-link" href="#" @click="scrollToTop">
62-
{{ theme.returnToTopLabel || 'Return to top' }}
63-
</a>
64-
<VPDocOutlineItem :headers="headers" />
61+
<div class="header">
62+
<a class="top-link" href="#" @click="scrollToTop">
63+
{{ theme.returnToTopLabel || 'Return to top' }}
64+
</a>
65+
</div>
66+
<div class="outline">
67+
<VPDocOutlineItem :headers="headers" />
68+
</div>
6569
</div>
6670
</Transition>
6771
</div>
@@ -71,6 +75,7 @@ function scrollToTop() {
7175
.VPLocalNavOutlineDropdown {
7276
padding: 12px 20px 11px;
7377
}
78+
7479
.VPLocalNavOutlineDropdown button {
7580
display: block;
7681
font-size: 12px;
@@ -110,26 +115,35 @@ function scrollToTop() {
110115
111116
.items {
112117
position: absolute;
113-
left: 20px;
114-
right: 20px;
115118
top: 64px;
116-
background-color: var(--vp-local-nav-bg-color);
117-
padding: 4px 10px 16px;
118-
border: 1px solid var(--vp-c-divider);
119+
right: 16px;
120+
left: 16px;
121+
display: grid;
122+
gap: 1px;
123+
border: 1px solid var(--vp-c-border);
119124
border-radius: 8px;
125+
background-color: var(--vp-c-gutter);
120126
max-height: calc(var(--vp-vh, 100vh) - 86px);
121127
overflow: hidden auto;
122128
box-shadow: var(--vp-shadow-3);
123129
}
124130
131+
.header {
132+
background-color: var(--vp-c-bg-soft);
133+
}
134+
125135
.top-link {
126136
display: block;
127-
color: var(--vp-c-brand);
128-
font-size: 13px;
137+
padding: 0 16px;
138+
line-height: 48px;
139+
font-size: 14px;
129140
font-weight: 500;
130-
padding: 6px 0;
131-
margin: 0 13px 10px;
132-
border-bottom: 1px solid var(--vp-c-divider);
141+
color: var(--vp-c-brand);
142+
}
143+
144+
.outline {
145+
padding: 8px 0;
146+
background-color: var(--vp-c-bg-soft);
133147
}
134148
135149
.flyout-enter-active {

Diff for: src/client/theme-default/styles/components/custom-block.css

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,13 @@
8484
.custom-block a {
8585
color: inherit;
8686
font-weight: 600;
87+
text-decoration: underline dotted;
88+
text-underline-offset: 2px;
89+
transition: opacity 0.25s;
8790
}
8891

8992
.custom-block a:hover {
90-
text-decoration: underline;
93+
opacity: 0.75;
9194
}
9295

9396
.custom-block code {

Diff for: src/client/theme-default/styles/components/vp-doc.css

+2-13
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,11 @@
109109
.vp-doc a {
110110
font-weight: 500;
111111
color: var(--vp-c-brand);
112-
text-decoration-style: dotted;
113-
transition: color 0.25s;
114112
}
115113

116114
.vp-doc a:hover {
117-
/* color: var(--vp-c-brand-dark); */
118-
text-decoration: underline;
115+
text-decoration: underline dotted;
116+
text-underline-offset: 2px;
119117
}
120118

121119
.vp-doc strong {
@@ -219,10 +217,6 @@
219217
font-weight: 600;
220218
}
221219

222-
.vp-doc .custom-block a:hover {
223-
text-decoration: underline;
224-
}
225-
226220
.vp-doc .custom-block code {
227221
font-size: var(--vp-custom-block-code-font-size);
228222
font-weight: 700;
@@ -271,11 +265,6 @@
271265

272266
.vp-doc a > code {
273267
color: var(--vp-c-brand);
274-
transition: color 0.25s;
275-
}
276-
277-
.vp-doc a:hover > code {
278-
color: var(--vp-c-brand-dark);
279268
}
280269

281270
.vp-doc div[class*='language-'],

0 commit comments

Comments
 (0)