Skip to content
This repository has been archived by the owner on Aug 8, 2022. It is now read-only.

Commit

Permalink
chore: format theme-provider.vue and search/index.vue code
Browse files Browse the repository at this point in the history
  • Loading branch information
veaba committed Aug 30, 2020
1 parent e09347c commit 1e7f123
Show file tree
Hide file tree
Showing 2 changed files with 260 additions and 251 deletions.
62 changes: 30 additions & 32 deletions src/.vuepress/components/community/themes/theme-provider.vue
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>
Loading

0 comments on commit 1e7f123

Please sign in to comment.