Skip to content

Commit d3c0099

Browse files
Merge remote-tracking branch 'origin/upstream'
2 parents 2dd3559 + 72587eb commit d3c0099

File tree

18 files changed

+146
-188
lines changed

18 files changed

+146
-188
lines changed

.vitepress/config.ts

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from 'fs'
22
import path from 'path'
3-
import { defineConfigWithTheme } from 'vitepress'
3+
import { defineConfigWithTheme, type HeadConfig } from 'vitepress'
44
import type { Config as ThemeConfig } from '@vue/theme'
55
import baseConfig from '@vue/theme/config'
66
import { headerPlugin } from './headerMdPlugin'
@@ -594,6 +594,17 @@ const i18n: ThemeConfig['i18n'] = {
594594
appearance: 'ظاهر'
595595
}
596596

597+
function inlineScript(file: string): HeadConfig {
598+
return [
599+
'script',
600+
{},
601+
fs.readFileSync(
602+
path.resolve(__dirname, `./inlined-scripts/${file}`),
603+
'utf-8'
604+
)
605+
]
606+
}
607+
597608
export default defineConfigWithTheme<ThemeConfig>({
598609
extends: baseConfig,
599610

@@ -633,25 +644,11 @@ export default defineConfigWithTheme<ThemeConfig>({
633644
'link',
634645
{
635646
rel: 'preconnect',
636-
href: 'https://sponsors.vuejs.org'
647+
href: 'https://automation.vuejs.org'
637648
}
638649
],
639-
[
640-
'script',
641-
{},
642-
fs.readFileSync(
643-
path.resolve(__dirname, './inlined-scripts/restorePreference.js'),
644-
'utf-8'
645-
)
646-
],
647-
[
648-
'script',
649-
{},
650-
fs.readFileSync(
651-
path.resolve(__dirname, './inlined-scripts/uwu.js'),
652-
'utf-8'
653-
)
654-
],
650+
inlineScript('restorePreference.js'),
651+
inlineScript('uwu.js'),
655652
[
656653
'script',
657654
{
@@ -667,7 +664,8 @@ export default defineConfigWithTheme<ThemeConfig>({
667664
src: 'https://vueschool.io/banner.js?affiliate=vuejs&type=top',
668665
async: 'true'
669666
}
670-
]
667+
],
668+
inlineScript('perfops.js')
671669
],
672670

673671
themeConfig: {

.vitepress/inlined-scripts/perfops.js

Lines changed: 9 additions & 0 deletions
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)

.vitepress/inlined-scripts/restorePreference.js

Lines changed: 2 additions & 2 deletions
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__ = 'madvue2025_1'
12-
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
11+
// window.__VUE_BANNER_ID__ = ''
12+
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
1313
})()

.vitepress/theme/components/Banner.vue

Lines changed: 14 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,16 @@ function dismiss() {
2222

2323
<template>
2424
<div class="banner" v-if="open">
25-
<p class="vt-banner-text">
26-
<span class="vt-text-primary">
27-
<span style="color:#f97844">Mad</span>
28-
<span>Vue</span>
29-
</span>
30-
<span class="vt-tagline"> · The Vue.js Event in Madrid</span>
31-
<span class="vt-place"> · Spain</span>
32-
<span class="vt-date"> · 29 May 2025</span>
33-
<a target="_blank" class="vt-primary-action"
34-
href="https://madvue.es/?utm_source=vuejs&utm_content=top_banner">
35-
Register
36-
</a>
37-
</p>
25+
<a target="_blank"></a>
3826
<button @click="dismiss">
3927
<VTIconPlus class="close" />
4028
</button>
41-
<p class="vt-banner-text vt-coupon">
42-
<span class="vt-text-primary">Early bird</span> tickets available
43-
<span class="vt-text-primary">Get 30% off</span>
44-
</p>
4529
</div>
4630
</template>
4731

4832
<style>
4933
html:not(.banner-dismissed) {
50-
--vt-banner-height: 60px;
34+
--vt-banner-height: 30px;
5135
}
5236
</style>
5337

@@ -66,10 +50,12 @@ html:not(.banner-dismissed) {
6650
font-weight: 600;
6751
color: #fff;
6852
background-color: var(--vt-c-green);
69-
background: #0f172a;
70-
display: flex;
71-
justify-content: center;
72-
align-items: center;
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+
);
7359
}
7460
7561
.banner-dismissed .banner {
@@ -84,7 +70,7 @@ button {
8470
position: absolute;
8571
right: 0;
8672
top: 0;
87-
padding: 20px 10px;
73+
padding: 5px;
8874
}
8975
9076
.close {
@@ -93,64 +79,10 @@ button {
9379
fill: #fff;
9480
transform: rotate(45deg);
9581
}
96-
97-
.vt-banner-text {
98-
color: #fff;
99-
font-size: 16px;
100-
}
101-
102-
.vt-text-primary {
103-
color: #c4d141;
104-
}
105-
106-
.vt-primary-action {
107-
background: #f97844;
108-
color: #fff;
109-
padding: 6px 12px;
110-
border-radius: 5px;
111-
font-size: 14px;
112-
text-decoration: none;
113-
margin: 0 20px;
114-
font-weight: bold;
115-
}
116-
117-
.vt-primary-action:hover {
118-
text-decoration: none;
119-
background: #c4d141;
120-
}
121-
122-
@media (max-width: 1280px) {
123-
.banner .vt-banner-text {
124-
font-size: 14px;
125-
}
126-
127-
.vt-tagline {
82+
/*
83+
@media (max-width: 720px) {
84+
a > span {
12885
display: none;
12986
}
130-
}
131-
132-
@media (max-width: 780px) {
133-
.vt-tagline {
134-
display: none;
135-
}
136-
137-
.vt-coupon {
138-
display: none;
139-
}
140-
141-
.vt-primary-action {
142-
margin: 0 10px;
143-
padding: 5px 8px;
144-
}
145-
146-
.vt-time-now {
147-
display: none;
148-
}
149-
}
150-
151-
@media (max-width: 560px) {
152-
.vt-place {
153-
display: none;
154-
}
155-
}
156-
</style>
87+
} */
88+
</style>

.vitepress/theme/components/Home.vue

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ onMounted(load)
5656
</div>
5757
</section>
5858

59-
<section dir="rtl" v-if="data && data.special" id="special-sponsor">
59+
<section dir="rtl" v-if="data && data.special" id="special-spsr">
6060
<span class="lead">حامی ویژه</span>
6161
<template v-for="{ url, img, name, description } of data.special">
6262
<a :href="url" target="_blank" rel="sponsored noopener">
@@ -78,7 +78,7 @@ onMounted(load)
7878
<span dir="ltr">{{ description }}</span>
7979
</template>
8080
</section>
81-
<section v-else id="special-sponsor">
81+
<section v-else id="special-spsr">
8282
<span>
8383
<a href="/sponsor/#tier-benefits">
8484
Special Sponsor slot is now vacant - Inquire now
@@ -110,7 +110,7 @@ onMounted(load)
110110
</div>
111111
</section>
112112

113-
<section id="sponsors">
113+
<section id="spsrs">
114114
<h2>حامیان پلاتینیومی</h2>
115115
<SponsorsGroup tier="platinum" placement="landing" />
116116
<h2>حامیان طلایی</h2>
@@ -231,15 +231,15 @@ html:not(.dark) .accent,
231231
background-color: var(--vt-c-gray-dark-3);
232232
}
233233
234-
#special-sponsor {
234+
#special-spsr {
235235
border-top: 1px solid var(--vt-c-divider-light);
236236
border-bottom: 1px solid var(--vt-c-divider-light);
237237
padding: 12px 24px;
238238
display: flex;
239239
align-items: center;
240240
}
241241
242-
#special-sponsor span {
242+
#special-spsr span {
243243
color: var(--vt-c-text-2);
244244
font-weight: 500;
245245
font-size: 13px;
@@ -248,22 +248,22 @@ html:not(.dark) .accent,
248248
flex: 1;
249249
}
250250
251-
#special-sponsor span:first-child {
251+
#special-spsr span:first-child {
252252
text-align: left;
253253
}
254254
255-
#special-sponsor a {
255+
#special-spsr a {
256256
display: flex;
257257
justify-content: center;
258258
padding: 0 24px;
259259
}
260260
261-
#special-sponsor img {
261+
#special-spsr img {
262262
height: 42px;
263263
margin: -6px 0;
264264
}
265265
266-
.dark #special-sponsor img {
266+
.dark #special-spsr img {
267267
filter: grayscale(1) invert(1);
268268
}
269269
@@ -291,18 +291,18 @@ html:not(.dark) .accent,
291291
background-color: transparent;
292292
}
293293
294-
#sponsors {
294+
#spsrs {
295295
max-width: 900px;
296296
margin: 0px auto;
297297
}
298298
299-
#sponsors h2 {
299+
#spsrs h2 {
300300
font-size: 20px;
301301
font-weight: 600;
302302
margin-bottom: 1em;
303303
}
304304
305-
#sponsors .sponsor-container {
305+
#spsrs .spsr-container {
306306
margin-bottom: 3em;
307307
}
308308
@@ -335,14 +335,14 @@ html:not(.dark) .accent,
335335
font-size: 16px;
336336
margin: 18px 0 30px;
337337
}
338-
#special-sponsor {
338+
#special-spsr {
339339
flex-direction: column;
340340
}
341-
#special-sponsor img {
341+
#special-spsr img {
342342
height: 36px;
343343
margin: 8px 0;
344344
}
345-
#special-sponsor span {
345+
#special-spsr span {
346346
text-align: center !important;
347347
}
348348
#highlights h3 {

0 commit comments

Comments
 (0)