This repository has been archived by the owner on Aug 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 846
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: format theme-provider.vue and search/index.vue code
- Loading branch information
Showing
2 changed files
with
260 additions
and
251 deletions.
There are no files selected for viewing
62 changes: 30 additions & 32 deletions
62
src/.vuepress/components/community/themes/theme-provider.vue
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 |
---|---|---|
@@ -1,66 +1,64 @@ | ||
<template> | ||
<section> | ||
<section> | ||
<h2 :id="provider.name">{{ provider.name }}</h2> | ||
|
||
<div class="tip custom-block description" v-html="description" /> | ||
|
||
<div class="themes-grid"> | ||
<ThemeItem v-for="theme in provider.products" :key="theme.url" :theme="theme" /> | ||
<ThemeItem v-for="theme in provider.products" :key="theme.url" :theme="theme" /> | ||
</div> | ||
|
||
<div class="see-more-container"> | ||
<RoundedButton :url="provider.seeMoreUrl"> | ||
查看 {{ provider.name }} 的更多主题 | ||
</RoundedButton> | ||
<RoundedButton :url="provider.seeMoreUrl">查看 {{ provider.name }} 的更多主题</RoundedButton> | ||
</div> | ||
</section> | ||
</section> | ||
</template> | ||
|
||
<script> | ||
import showdown from 'showdown' | ||
export default { | ||
props: { | ||
provider: { | ||
type: Object, | ||
required: true | ||
} | ||
props: { | ||
provider: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
components: { | ||
ThemeItem: () => import('./theme-item.vue'), | ||
RoundedButton: () => import('@theme/components/ui/RoundedButton.vue') | ||
}, | ||
components: { | ||
ThemeItem: () => import('./theme-item.vue'), | ||
RoundedButton: () => import('@theme/components/ui/RoundedButton.vue'), | ||
}, | ||
computed: { | ||
description() { | ||
return (new showdown.Converter()).makeHtml(this.provider.description) | ||
} | ||
} | ||
computed: { | ||
description() { | ||
return new showdown.Converter().makeHtml(this.provider.description) | ||
}, | ||
}, | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import "@theme/styles/_settings.scss"; | ||
@import '@theme/styles/_settings.scss'; | ||
.themes-grid { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
@media screen and (max-width: 1300px) { | ||
justify-content: center; | ||
} | ||
@media screen and (max-width: 1300px) { | ||
justify-content: center; | ||
} | ||
} | ||
.description { | ||
margin: 1.5em 0; | ||
margin: 1.5em 0; | ||
} | ||
.see-more { | ||
&-container { | ||
text-align: center; | ||
width: 100%; | ||
} | ||
&-container { | ||
text-align: center; | ||
width: 100%; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.