Skip to content

Commit af28a13

Browse files
committed
Add some fixes
Closes #112 Closes #116
1 parent c173818 commit af28a13

File tree

7 files changed

+41
-43
lines changed

7 files changed

+41
-43
lines changed

docs/.vitepress/theme/components/landing/3. frameworks-section/FrameworkCard.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const props = withDefaults(defineProps<Props>(), {
5656
v-if="props.framework.logo"
5757
:src="props.framework.logo"
5858
:alt="props.framework.name"
59+
loading="lazy"
5960
/>
6061
</component>
6162
</template>

docs/.vitepress/theme/components/landing/4. community-section/CommunityCard.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ defineProps<{
3636
:src="testimonial.avatar"
3737
:alt="testimonial.name"
3838
class="card__avatar"
39+
loading="lazy"
3940
/>
4041
<div class="card__meta">
4142
<span class="card__name">

docs/.vitepress/theme/components/landing/4. community-section/CommunitySection.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup lang="ts">
22
import CommunityCard, { Testimonial } from './CommunityCard.vue'
3-
import placeholderAvatar from '/images/community/placeholder.jpg'
43
54
const testimonials: Testimonial[] = [
65
{
@@ -52,7 +51,7 @@ const testimonials: Testimonial[] = [
5251
name: 'Дэвид Кремер',
5352
handle: '@zeeg',
5453
avatar:
55-
'https://pbs.twimg.com/profile_images/1706891973553168384/zdAPOznc_400x400.jpg',
54+
'https://pbs.twimg.com/profile_images/1911613315765133312/HVkULegC_400x400.jpg',
5655
comment: ['Vite стал настоящей революцией для индустрии.'],
5756
},
5857
{
@@ -68,7 +67,7 @@ const testimonials: Testimonial[] = [
6867
name: 'Кристоф Наказава',
6968
handle: '@cpojer',
7069
avatar:
71-
'https://pbs.twimg.com/profile_images/1854151427595407360/4GyUCgEH_400x400.jpg',
70+
'https://pbs.twimg.com/profile_images/1910252462126313472/gXgT-jxL_400x400.jpg',
7271
comment: ['Vite собирается покорить (JavaScript) мир.'],
7372
},
7473
{

docs/.vitepress/theme/components/landing/5. sponsor-section/SponsorSection.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const { data } = useSponsor()
4545
alt="Vite is made possible by our contributors, partner companies, and sponsors"
4646
width="58"
4747
height="55"
48+
loading="lazy"
4849
/>
4950
<h2>Бесплатно и с открытым исходным кодом</h2>
5051
<h4>
@@ -54,7 +55,7 @@ const { data } = useSponsor()
5455
<h4>Представлено вам</h4>
5556
<div class="voidzero">
5657
<a :href="voidZero.url" target="_blank">
57-
<img :src="voidZero.img" />
58+
<img :src="voidZero.img" alt="Логотип VoidZero" loading="lazy" />
5859
</a>
5960
</div>
6061

docs/.vitepress/theme/styles/landing.css

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@
44

55
html:has(.landing) {
66
--vp-c-bg: #101010;
7-
87
background-color: #101010;
9-
10-
body {
11-
background-color: #101010;
12-
}
138
}
149

1510
.landing {
1611
overflow-x: hidden;
17-
background-color: #101010;
1812

1913
* {
2014
-webkit-font-smoothing: antialiased !important;
@@ -64,7 +58,7 @@ html:has(.landing) {
6458
display: none;
6559
}
6660

67-
.VPMenu .translations + .group {
61+
.VPMenu .translations+.group {
6862
display: none;
6963
}
7064

@@ -85,11 +79,9 @@ html:has(.landing) {
8579
font-family: 'Manrope', sans-serif;
8680
font-style: normal;
8781
font-weight: 600;
88-
background: linear-gradient(
89-
180deg,
90-
#fff 0%,
91-
rgba(255, 255, 255, 0.31) 100%
92-
);
82+
background: linear-gradient(180deg,
83+
#fff 0%,
84+
rgba(255, 255, 255, 0.31) 100%);
9385
background-clip: text;
9486
-webkit-background-clip: text;
9587
-webkit-text-fill-color: transparent;
@@ -110,7 +102,8 @@ html:has(.landing) {
110102
@media (min-width: 1025px) {
111103
font-size: 72px;
112104
letter-spacing: -1.44px;
113-
padding-bottom: 8px; /* Fix for hanging descender on "g" in "tooling" */
105+
padding-bottom: 8px;
106+
/* Fix for hanging descender on "g" in "tooling" */
114107
}
115108
}
116109

@@ -176,39 +169,27 @@ html:has(.landing) {
176169

177170
&.btn--primary {
178171
position: relative;
179-
background: radial-gradient(
180-
141.42% 141.42% at 100% 0%,
172+
background: radial-gradient(141.42% 141.42% at 100% 0%,
181173
rgba(255, 255, 255, 0.4) 0%,
182-
rgba(255, 255, 255, 0) 100%
183-
),
184-
radial-gradient(
185-
140.35% 140.35% at 100% 94.74%,
174+
rgba(255, 255, 255, 0) 100%),
175+
radial-gradient(140.35% 140.35% at 100% 94.74%,
186176
#bd34fe 0%,
187-
rgba(189, 52, 254, 0) 100%
188-
),
189-
radial-gradient(
190-
89.94% 89.94% at 18.42% 15.79%,
177+
rgba(189, 52, 254, 0) 100%),
178+
radial-gradient(89.94% 89.94% at 18.42% 15.79%,
191179
#41d1ff 0%,
192-
rgba(65, 209, 255, 0) 100%
193-
);
180+
rgba(65, 209, 255, 0) 100%);
194181
box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.75) inset;
195182

196183
&:hover {
197-
background: radial-gradient(
198-
141.42% 141.42% at 100% 0%,
184+
background: radial-gradient(141.42% 141.42% at 100% 0%,
199185
rgba(255, 255, 255, 0.5) 0%,
200-
rgba(255, 255, 255, 0) 100%
201-
),
202-
radial-gradient(
203-
140.35% 140.35% at 100% 94.74%,
186+
rgba(255, 255, 255, 0) 100%),
187+
radial-gradient(140.35% 140.35% at 100% 94.74%,
204188
#bd34fe 0%,
205-
rgba(189, 52, 254, 0) 100%
206-
),
207-
radial-gradient(
208-
89.94% 89.94% at 18.42% 15.79%,
189+
rgba(189, 52, 254, 0) 100%),
190+
radial-gradient(89.94% 89.94% at 18.42% 15.79%,
209191
#41d1ff 0%,
210-
rgba(65, 209, 255, 0) 100%
211-
);
192+
rgba(65, 209, 255, 0) 100%);
212193
box-shadow: 0 1.5px 0 0 rgba(255, 255, 255, 0.8) inset;
213194
}
214195
}
@@ -225,4 +206,4 @@ html:has(.landing) {
225206
border-radius: 100px;
226207
}
227208
}
228-
}
209+
}

docs/guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Введение {#overview}
88

9-
Vite (французское слово, означающее «быстрый», произносится `/vit/`<button style="border:none;padding:3px;border-radius:4px;vertical-align:bottom" id="play-vite-audio" onclick="document.getElementById('vite-audio').play();"><svg style="height:2em;width:2em"><use href="/voice.svg?no-inline#voice" /></svg ></button>, как «вит») — это инструмент сборки, цель которого — обеспечить более быструю и удобную разработку современных веб-проектов. Он состоит из двух основных частей:
9+
Vite (французское слово, означающее «быстрый», произносится `/vit/`<button style="border:none;padding:3px;border-radius:4px;vertical-align:bottom" id="play-vite-audio" aria-label="pronounce" onclick="document.getElementById('vite-audio').play();"><svg style="height:2em;width:2em"><use href="/voice.svg?no-inline#voice" /></svg ></button>, как «вит») — это инструмент сборки, цель которого — обеспечить более быструю и удобную разработку современных веб-проектов. Он состоит из двух основных частей:
1010

1111
- Сервер разработки, обеспечивающий [расширенные возможности](./features) по сравнению со [встроенными ES-модулями](https://developer.mozilla.org/ru/docs/Web/JavaScript/Guide/Modules), например, чрезвычайно быструю [горячую замену модулей (HMR)](./features#hot-module-replacement).
1212

docs/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Vite
33
titleTemplate: Инструментарий для фронтенда нового поколения
4+
# add `dark` here to apply dark mode on initial load,
5+
# since `onMounted` doesn't run during SSR
46
pageClass: landing dark
57

68
layout: home
@@ -10,6 +12,9 @@ markdownStyles: false
1012
---
1113

1214
<script setup>
15+
import { useData } from 'vitepress'
16+
import { onBeforeUnmount, onMounted, ref } from 'vue'
17+
1318
import Hero from '.vitepress/theme/components/landing/1. hero-section/HeroSection.vue'
1419
import FeatureSection from './.vitepress/theme/components/landing/2. feature-section/FeatureSection.vue'
1520
import FrameworksSection from './.vitepress/theme/components/landing/3. frameworks-section/FrameworksSection.vue'
@@ -24,6 +29,16 @@ import FeatureFlexiblePlugins from './.vitepress/theme/components/landing/2. fea
2429
import FeatureTypedAPI from './.vitepress/theme/components/landing/2. feature-section/FeatureTypedAPI.vue'
2530
import FeatureSSRSupport from './.vitepress/theme/components/landing/2. feature-section/FeatureSSRSupport.vue'
2631
import FeatureCI from './.vitepress/theme/components/landing/2. feature-section/FeatureCI.vue'
32+
33+
const { isDark } = useData()
34+
35+
onMounted(() => {
36+
document.documentElement.classList.add('dark')
37+
})
38+
39+
onBeforeUnmount(() => {
40+
document.documentElement.classList.toggle('dark', isDark.value)
41+
})
2742
</script>
2843

2944
<div class="VPHome">

0 commit comments

Comments
 (0)