Skip to content

Commit

Permalink
docs: fix leaking styles
Browse files Browse the repository at this point in the history
closes #4520
  • Loading branch information
brc-dd committed Jan 25, 2025
1 parent 8062235 commit 8b3e10c
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 207 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Theme from 'vitepress/theme'
import 'virtual:group-icons.css'
import './styles.css'

export default Theme
40 changes: 40 additions & 0 deletions docs/.vitepress/theme/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');

:root:where(:lang(fa)) {
--vp-font-family-base: 'Vazirmatn', 'Inter', ui-sans-serif, system-ui,
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
}

:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#bd34fe 30%,
#41d1ff
);
--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}

/* used in reference/default-theme-search */
img[src='/search.png'] {
width: 100%;
aspect-ratio: 1 / 1;
}
22 changes: 0 additions & 22 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,3 @@ features:
title: Ship Fast Sites
details: Fast initial load with static HTML, fast post-load navigation with client-side routing.
---

<style>
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);

--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
</style>
7 changes: 0 additions & 7 deletions docs/en/reference/default-theme-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,3 @@ new Crawler({
}
})
```

<style>
img[src="/search.png"] {
width: 100%;
aspect-ratio: 1 / 1;
}
</style>
22 changes: 0 additions & 22 deletions docs/es/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,3 @@ features:
title: Entrega rápida de sitios
details: Carga inicial rápida con HTML estático, navegación rápida con enrutamiento del lado del cliente.
---

<style>
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);

--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
</style>
7 changes: 0 additions & 7 deletions docs/es/reference/default-theme-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,3 @@ new Crawler({
}
})
```

<style>
img[src="/search.png"] {
width: 100%;
aspect-ratio: 1 / 1;
}
</style>
27 changes: 0 additions & 27 deletions docs/fa/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,3 @@ features:
title: ارسال سایت های سریع
details: بارگذاری اولیه سریع با HTML ایستا، ناوبری سریع پس از بارگیری با مسیریابی سمت کلاینت
---

<style>
@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap");

:root {
--vp-font-family-base: "Vazirmatn", 'Inter', ui-sans-serif, system-ui, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);

--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
</style>
7 changes: 0 additions & 7 deletions docs/fa/reference/default-theme-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,3 @@ new Crawler({
}
})
```

<style>
img[src="/search.png"] {
width: 100%;
aspect-ratio: 1 / 1;
}
</style>
22 changes: 0 additions & 22 deletions docs/ko/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,3 @@ features:
title: 웹사이트를 빠르게 제공
details: 정적 HTML로 빠른 초기 로딩, 클라이언트 측 라우팅을 통한 빠른 탐색.
---

<style>
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);

--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
</style>
7 changes: 0 additions & 7 deletions docs/ko/reference/default-theme-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,3 @@ new Crawler({
}
})
```

<style>
img[src="/search.png"] {
width: 100%;
aspect-ratio: 1 / 1;
}
</style>
22 changes: 0 additions & 22 deletions docs/pt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,3 @@ features:
title: Entregue Sites Rápidos
details: Carregamento inicial rápido com HTML estático, navegação rápida com roteamento no lado do cliente.
---

<style>
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);

--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
</style>
7 changes: 0 additions & 7 deletions docs/pt/reference/default-theme-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,3 @@ new Crawler({
}
})
```

<style>
img[src="/search.png"] {
width: 100%;
aspect-ratio: 1 / 1;
}
</style>
22 changes: 0 additions & 22 deletions docs/ru/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,3 @@ features:
title: Быстрый запуск веб-сайтов
details: Быстрая начальная загрузка с помощью статического HTML, быстрая навигация после загрузки с помощью маршрутизации на стороне клиента.
---

<style>
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);

--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
</style>
7 changes: 0 additions & 7 deletions docs/ru/reference/default-theme-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,3 @@ new Crawler({
}
})
```

<style>
img[src="/search.png"] {
width: 100%;
aspect-ratio: 1 / 1;
}
</style>
21 changes: 0 additions & 21 deletions docs/zh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,3 @@ features:
title: 速度真的很快!
details: 采用静态 HTML 实现快速的页面初次加载,使用客户端路由实现快速的页面切换导航。
---
<style>
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);

--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
</style>
7 changes: 0 additions & 7 deletions docs/zh/reference/default-theme-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,3 @@ new Crawler({
}
})
```

<style>
img[src="/search.png"] {
width: 100%;
aspect-ratio: 1 / 1;
}
</style>

0 comments on commit 8b3e10c

Please sign in to comment.