Skip to content

Commit

Permalink
docs: preview docs image
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax committed Mar 15, 2024
1 parent 4520240 commit 1f5a27b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useData, withBase } from 'vitepress'
const props = defineProps<{ name: string }>()
const { isDark } = useData()
const image = computed(() => withBase(`/services/${props.name}${isDark.value ? '-dark' : ''}.png`))
const image = computed(() => withBase(`/${props.name}${isDark.value ? '-dark' : ''}.png`))
</script>

<style scoped>
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { yandexMetrika } from '@hywax/vitepress-yandex-metrika'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './custom.css'
import PreviewService from '../components/preview-service.vue'
import PreviewImage from '../components/preview-image.vue'
import InVersion from '../components/in-version.vue'

export default {
extends: DefaultTheme,
enhanceApp(ctx) {
ctx.app.component('PreviewService', PreviewService)
ctx.app.component('PreviewImage', PreviewImage)
ctx.app.component('InVersion', InVersion)

yandexMetrika(ctx, {
Expand Down
2 changes: 1 addition & 1 deletion docs/ru/services/base.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Базовый сервис

<preview-service name="base" />
<preview-image name="services/base" />

Основная карточка сервиса.
На основе этого сервиса создаются другие.
Expand Down
2 changes: 1 addition & 1 deletion docs/ru/services/ip-api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IP API <in-version value="0.8.0" />

<preview-service name="ip-api" />
<preview-image name="services/ip-api" />

Показывает информацию о вашем IP адресе.

Expand Down
2 changes: 1 addition & 1 deletion docs/ru/services/openweathermap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Open Weather Map <in-version value="0.9.0" />

<preview-service name="openweathermap" />
<preview-image name="services/openweathermap" />

Получает данные о погоде с сервиса [Open Weather Map](https://openweathermap.org/).

Expand Down
2 changes: 1 addition & 1 deletion docs/services/base.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Base service

<preview-service name="base" />
<preview-image name="services/base" />

The main card of the service.
Other services are created on the basis of this service.
Expand Down
2 changes: 1 addition & 1 deletion docs/services/ip-api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IP API <in-version value="0.8.0" />

<preview-service name="ip-api" />
<preview-image name="services/ip-api" />

Shows information about your IP address.

Expand Down
2 changes: 1 addition & 1 deletion docs/services/openweathermap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Open Weather Map <in-version value="0.9.0" />

<preview-service name="openweathermap" />
<preview-image name="services/openweathermap" />

Weather data is received from [Open Weather Map](https://openweathermap.org/).

Expand Down

0 comments on commit 1f5a27b

Please sign in to comment.