Skip to content

Commit 95b2b5a

Browse files
authored
Merge branch 'main' into patch-9
2 parents ed37df5 + 96ec3f9 commit 95b2b5a

39 files changed

+1111
-527
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ dist/
9898
# vitepress build output
9999
.vitepress/dist
100100
.vitepress/cache
101+
.vitepress/.temp
101102

102103
# Serverless directories
103104
.serverless/

Diff for: .vitepress/config.ts

+49-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import fs from 'fs'
22
import path from 'path'
3-
import { defineConfigWithTheme } from 'vitepress'
3+
import { defineConfigWithTheme, type HeadConfig, type Plugin } from 'vitepress'
44
import type { Config as ThemeConfig } from '@vue/theme'
5+
import llmstxt from 'vitepress-plugin-llms'
56
import baseConfig from '@vue/theme/config'
67
import { headerPlugin } from './headerMdPlugin'
78
// import { textAdPlugin } from './textAdMdPlugin'
@@ -570,6 +571,17 @@ export const sidebar: ThemeConfig['sidebar'] = {
570571
// const i18n: ThemeConfig['i18n'] = {
571572
// }
572573

574+
function inlineScript(file: string): HeadConfig {
575+
return [
576+
'script',
577+
{},
578+
fs.readFileSync(
579+
path.resolve(__dirname, `./inlined-scripts/${file}`),
580+
'utf-8'
581+
)
582+
]
583+
}
584+
573585
export default defineConfigWithTheme<ThemeConfig>({
574586
extends: baseConfig,
575587

@@ -608,25 +620,11 @@ export default defineConfigWithTheme<ThemeConfig>({
608620
'link',
609621
{
610622
rel: 'preconnect',
611-
href: 'https://sponsors.vuejs.org'
623+
href: 'https://automation.vuejs.org'
612624
}
613625
],
614-
[
615-
'script',
616-
{},
617-
fs.readFileSync(
618-
path.resolve(__dirname, './inlined-scripts/restorePreference.js'),
619-
'utf-8'
620-
)
621-
],
622-
[
623-
'script',
624-
{},
625-
fs.readFileSync(
626-
path.resolve(__dirname, './inlined-scripts/uwu.js'),
627-
'utf-8'
628-
)
629-
],
626+
inlineScript('restorePreference.js'),
627+
inlineScript('uwu.js'),
630628
[
631629
'script',
632630
{
@@ -642,7 +640,8 @@ export default defineConfigWithTheme<ThemeConfig>({
642640
src: 'https://vueschool.io/banner.js?affiliate=vuejs&type=top',
643641
async: 'true'
644642
}
645-
]
643+
],
644+
inlineScript('perfops.js')
646645
],
647646

648647
themeConfig: {
@@ -700,7 +699,7 @@ export default defineConfigWithTheme<ThemeConfig>({
700699
{
701700
link: 'https://ru.vuejs.org',
702701
text: 'Русский',
703-
repo: 'https://github.com/translation-gang/docs-ru'
702+
repo: 'https://github.com/vuejs-translations/docs-ru'
704703
},
705704
{
706705
link: 'https://cs.vuejs.org',
@@ -712,6 +711,11 @@ export default defineConfigWithTheme<ThemeConfig>({
712711
text: '繁體中文',
713712
repo: 'https://github.com/vuejs-translations/docs-zh-hk'
714713
},
714+
{
715+
link: 'https://pl.vuejs.org',
716+
text: 'Polski',
717+
repo: 'https://github.com/vuejs-translations/docs-pl',
718+
},
715719
{
716720
link: '/translations/',
717721
text: 'Help Us Translate!',
@@ -785,6 +789,30 @@ export default defineConfigWithTheme<ThemeConfig>({
785789
},
786790
json: {
787791
stringify: true
788-
}
792+
},
793+
plugins: [
794+
llmstxt({
795+
ignoreFiles: [
796+
'about/team/**/*',
797+
'about/team.md',
798+
'about/privacy.md',
799+
'about/coc.md',
800+
'developers/**/*',
801+
'ecosystem/themes.md',
802+
'examples/**/*',
803+
'partners/**/*',
804+
'sponsor/**/*',
805+
'index.md'
806+
],
807+
customLLMsTxtTemplate: `\
808+
# Vue.js
809+
810+
Vue.js - The Progressive JavaScript Framework
811+
812+
## Table of Contents
813+
814+
{toc}`
815+
}) as Plugin
816+
]
789817
}
790818
})

Diff for: .vitepress/inlined-scripts/perfops.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
;((d) => {
2+
window.rum = { key: 'a9efvfeu' }
3+
var script = d.createElement('script')
4+
script.src = '/rom3.min.js'
5+
script.type = 'text/javascript'
6+
script.defer = true
7+
script.async = true
8+
d.getElementsByTagName('head')[0].appendChild(script)
9+
})(document)

Diff for: .vitepress/inlined-scripts/restorePreference.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
restore('vue-docs-prefer-composition', 'prefer-composition', true)
99
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)
1010

11-
// window.__VUE_BANNER_ID__ = ''
12-
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
11+
window.__VUE_BANNER_ID__ = 'vueconf2025'
12+
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
1313
})()

Diff for: .vitepress/theme/components/Banner.vue

+79-13
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,31 @@ function dismiss() {
2222

2323
<template>
2424
<div class="banner" v-if="open">
25-
<a target="_blank"></a>
25+
<p class="vt-banner-text">
26+
<span class="vt-text-primary">
27+
Vueconf.US
28+
</span>
29+
<span class="vt-tagline"> · The official Vue.js conf</span>
30+
<span class="vt-place"> · Tampa, USA</span>
31+
<span class="vt-date"> · 19-21 May 2025</span>
32+
<a target="_blank" class="vt-primary-action"
33+
href="https://vueconf.us/?utm_source=vuejs&utm_content=top_banner">
34+
Register
35+
</a>
36+
</p>
2637
<button @click="dismiss">
2738
<VTIconPlus class="close" />
2839
</button>
40+
<p class="vt-banner-text vt-coupon">
41+
<span class="vt-text-primary">Use</span> VUEJSDOCS
42+
<span class="vt-text-primary"> $200 off</span>
43+
</p>
2944
</div>
3045
</template>
3146

3247
<style>
3348
html:not(.banner-dismissed) {
34-
--vt-banner-height: 30px;
49+
--vt-banner-height: 60px;
3550
}
3651
</style>
3752

@@ -50,12 +65,12 @@ html:not(.banner-dismissed) {
5065
font-weight: 600;
5166
color: #fff;
5267
background-color: var(--vt-c-green);
53-
background: linear-gradient(
54-
90deg,
55-
rgba(66, 184, 131, 1) 0%,
56-
rgba(39, 179, 137, 1) 19%,
57-
rgba(100, 126, 255, 1) 100%
58-
);
68+
background: #0f172a;
69+
display: flex;
70+
justify-content: center;
71+
align-items: center;
72+
73+
5974
}
6075
6176
.banner-dismissed .banner {
@@ -70,7 +85,7 @@ button {
7085
position: absolute;
7186
right: 0;
7287
top: 0;
73-
padding: 5px;
88+
padding: 10px 10px;
7489
}
7590
7691
.close {
@@ -79,10 +94,61 @@ button {
7994
fill: #fff;
8095
transform: rotate(45deg);
8196
}
82-
/*
83-
@media (max-width: 720px) {
84-
a > span {
97+
98+
.vt-banner-text {
99+
color: #fff;
100+
font-size: 16px;
101+
}
102+
103+
.vt-text-primary {
104+
color: #75c05e;
105+
}
106+
107+
.vt-primary-action {
108+
background: #75c05e;
109+
color: #121c1a;
110+
padding: 8px 15px;
111+
border-radius: 5px;
112+
font-size: 14px;
113+
text-decoration: none;
114+
margin: 0 10px;
115+
font-weight: bold;
116+
}
117+
118+
.vt-primary-action:hover {
119+
text-decoration: none;
120+
background: #c4d141;
121+
}
122+
123+
@media (max-width: 1280px) {
124+
.banner .vt-banner-text {
125+
font-size: 14px;
126+
}
127+
128+
129+
}
130+
131+
@media (max-width: 780px) {
132+
.vt-tagline {
133+
display: none;
134+
}
135+
.vt-primary-action {
136+
margin: 0 10px;
137+
padding: 5px 5px;
138+
}
139+
140+
.vt-time-now {
141+
display: none;
142+
}
143+
}
144+
145+
@media (max-width: 560px) {
146+
147+
.vt-place {
85148
display: none;
86149
}
87-
} */
150+
.vt-date {
151+
display: none;
152+
}
153+
}
88154
</style>

Diff for: .vitepress/theme/components/Home.vue

+15-15
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ onMounted(load)
5353
</p>
5454
</section>
5555

56-
<section v-if="data && data.special" id="special-sponsor">
56+
<section v-if="data && data.special" id="special-spsr">
5757
<span class="lead">Special Sponsor</span>
5858
<template v-for="{ url, img, name, description } of data.special">
5959
<a :href="url" target="_blank" rel="sponsored noopener">
@@ -75,7 +75,7 @@ onMounted(load)
7575
<span>{{ description }}</span>
7676
</template>
7777
</section>
78-
<section v-else id="special-sponsor">
78+
<section v-else id="special-spsr">
7979
<span>
8080
<a href="/sponsor/#tier-benefits">
8181
Special Sponsor slot is now vacant - Inquire now
@@ -107,7 +107,7 @@ onMounted(load)
107107
</div>
108108
</section>
109109

110-
<section id="sponsors">
110+
<section id="spsrs">
111111
<h2>Platinum Sponsors</h2>
112112
<SponsorsGroup tier="platinum" placement="landing" />
113113
<h2>Gold Sponsors</h2>
@@ -227,38 +227,38 @@ html:not(.dark) .accent,
227227
background-color: var(--vt-c-gray-dark-3);
228228
}
229229
230-
#special-sponsor {
230+
#special-spsr {
231231
border-top: 1px solid var(--vt-c-divider-light);
232232
border-bottom: 1px solid var(--vt-c-divider-light);
233233
padding: 12px 24px;
234234
display: flex;
235235
align-items: center;
236236
}
237237
238-
#special-sponsor span {
238+
#special-spsr span {
239239
color: var(--vt-c-text-2);
240240
font-weight: 500;
241241
font-size: 13px;
242242
vertical-align: middle;
243243
flex: 1;
244244
}
245245
246-
#special-sponsor span:first-child {
246+
#special-spsr span:first-child {
247247
text-align: right;
248248
}
249249
250-
#special-sponsor a {
250+
#special-spsr a {
251251
display: flex;
252252
justify-content: center;
253253
padding: 0 24px;
254254
}
255255
256-
#special-sponsor img {
256+
#special-spsr img {
257257
height: 42px;
258258
margin: -6px 0;
259259
}
260260
261-
.dark #special-sponsor img {
261+
.dark #special-spsr img {
262262
filter: grayscale(1) invert(1);
263263
}
264264
@@ -290,18 +290,18 @@ html:not(.dark) .accent,
290290
color: var(--vt-c-green);
291291
}
292292
293-
#sponsors {
293+
#spsrs {
294294
max-width: 900px;
295295
margin: 0px auto;
296296
}
297297
298-
#sponsors h2 {
298+
#spsrs h2 {
299299
font-size: 20px;
300300
font-weight: 600;
301301
margin-bottom: 1em;
302302
}
303303
304-
#sponsors .sponsor-container {
304+
#spsrs .spsr-container {
305305
margin-bottom: 3em;
306306
}
307307
@@ -334,14 +334,14 @@ html:not(.dark) .accent,
334334
font-size: 16px;
335335
margin: 18px 0 30px;
336336
}
337-
#special-sponsor {
337+
#special-spsr {
338338
flex-direction: column;
339339
}
340-
#special-sponsor img {
340+
#special-spsr img {
341341
height: 36px;
342342
margin: 8px 0;
343343
}
344-
#special-sponsor span {
344+
#special-spsr span {
345345
text-align: center !important;
346346
}
347347
#highlights h3 {

0 commit comments

Comments
 (0)