-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fa1ae5
commit 7e71e6b
Showing
6 changed files
with
200 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
<script setup lang="ts"> | ||
import { type Ref, computed } from 'vue' | ||
import { DefaultTheme, useData } from 'vitepress' | ||
const {theme, frontmatter} = useData(); | ||
const dataAppsMetaWidgets = frontmatter.value.appsMetaWidgets ?? theme.value.appsMetaWidgets ?? []; | ||
import VPLink from 'vitepress/dist/client/theme-default/components/VPLink.vue' | ||
import VPImage from 'vitepress/dist/client/theme-default/components/VPImage.vue'; | ||
const appsMetaWidgets = computed(() => dataAppsMetaWidgets); | ||
</script> | ||
|
||
<template> | ||
<article v-if="appsMetaWidgets.active" class="AppsWidget"> | ||
<figure class="figure" v-if="appsMetaWidgets.thumb.src"> | ||
<VPImage | ||
:image="appsMetaWidgets.thumb.src" | ||
:alt="appsMetaWidgets.thumb.title" | ||
class="image" | ||
/> | ||
<img src=""> | ||
</figure> | ||
<div class="card-body"> | ||
<div class="card-title">{{ appsMetaWidgets.introtext }}</div> | ||
<Badge v-if="appsMetaWidgets.adaptive" type="info">Адаптивный</Badge> | ||
</div> | ||
<dl> | ||
<dt>Лицензия</dt> | ||
<dd> | ||
<VPLink :href="appsMetaWidgets.licence.url" class="title"> | ||
{{ appsMetaWidgets.licence.anchor }} | ||
</VPLink> | ||
</dd> | ||
<dt v-if="appsMetaWidgets.site.url">Сайт проекта</dt> | ||
<dd v-if="appsMetaWidgets.site.url"> | ||
<VPLink :href="appsMetaWidgets.site.url" class="title"> | ||
{{ appsMetaWidgets.site.anchor }} | ||
</VPLink> | ||
</dd> | ||
<dt v-if="appsMetaWidgets.translate.url">Помочь с переводами</dt> | ||
<dd v-if="appsMetaWidgets.translate.url"> | ||
<VPLink :href="appsMetaWidgets.translate.url" class="title"> | ||
{{ appsMetaWidgets.translate.anchor }} | ||
</VPLink> | ||
</dd> | ||
<dt>Сообщить о проблеме</dt> | ||
<dd> | ||
<VPLink :href="appsMetaWidgets.issue.url" class="title"> | ||
{{ appsMetaWidgets.issue.anchor }} | ||
</VPLink> | ||
</dd> | ||
</dl> | ||
<div class="footet"> | ||
<a v-if="appsMetaWidgets.gnomeCircle" :href="'https://circle.gnome.org'" class="link-gnome-circle">GNOME Circle</a> | ||
<a v-if="appsMetaWidgets.sisyphus.url" :href="appsMetaWidgets.sisyphus.url" class="link-gnome-sisyphus">Сизиф</a> | ||
</div> | ||
</article> | ||
</template> | ||
|
||
<style scoped> | ||
.AppsWidget { | ||
overflow: hidden; | ||
background-color: var(--vp-c-bg-soft); | ||
border-radius: 12px; | ||
margin-top: 24px; | ||
} | ||
.card-title { | ||
font-size: 14px; | ||
font-weight: bold; | ||
margin-bottom: 8px; | ||
} | ||
.card-body { | ||
padding: 16px; | ||
} | ||
.title { | ||
line-height: 1.2; | ||
} | ||
.figure { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.image { | ||
width: 100%; | ||
} | ||
dl { | ||
margin-top: 0; | ||
margin-bottom: 0; | ||
} | ||
dt { | ||
font-size: 12px; | ||
color: var(--vp-c-text-2); | ||
font-weight: 500; | ||
} | ||
dd { | ||
margin-left: 0; | ||
font-size: 14px; | ||
padding-bottom: 8px; | ||
margin-bottom: 8px; | ||
} | ||
dd:not(:last-child) { | ||
border-bottom: 1px solid var(--vp-c-divider); | ||
} | ||
dt, | ||
dd { | ||
padding-left: 16px; | ||
padding-right: 16px; | ||
} | ||
.link-gnome-circle { | ||
padding: 8px 24px; | ||
text-align: center; | ||
transition: all .5s ease-in-out; | ||
display: grid; | ||
color: var(--vp-c-green-darker); | ||
background-color: var(--vp-c-green-dimm-1); | ||
font-weight: bold; | ||
} | ||
.link-gnome-sisyphus { | ||
padding: 8px 24px; | ||
text-align: center; | ||
transition: all .5s ease-in-out; | ||
display: grid; | ||
color: var(--vp-c-yellow-darker); | ||
background-color: var(--vp-c-yellow-dimm-1); | ||
font-weight: bold; | ||
} | ||
.link-gnome-circle:hover { | ||
background-color: var(--vp-c-green-darker); | ||
color: #edfdf0; | ||
} | ||
.link-gnome-sisyphus:hover { | ||
background-color: var(--vp-c-yellow-darker); | ||
color: #fff; | ||
}</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.