|
5 | 5 | <div class="ui-post-title"> |
6 | 6 | <NavLink :link="page.path">{{ page.title }}</NavLink> |
7 | 7 | </div> |
| 8 | + |
8 | 9 | <div class="ui-post-summary"> |
9 | 10 | {{ page.frontmatter.summary || page.summary }} |
10 | 11 | <!-- <Content :page-key="page.key" slot-key="intro"/>--> |
11 | 12 | </div> |
| 13 | + |
12 | 14 | <div class="ui-post-author" v-if="page.frontmatter.author"> |
13 | 15 | <NavigationIcon/> |
14 | 16 | <span>{{ page.frontmatter.author }} in {{ page.frontmatter.location }}</span> |
15 | 17 | </div> |
| 18 | + |
16 | 19 | <div class="ui-post-date" v-if="page.frontmatter.date"> |
17 | 20 | <ClockIcon/> |
18 | 21 | <span>{{ new Date(page.frontmatter.date.trim()).toDateString() }}</span> |
19 | 22 | </div> |
20 | 23 | </div> |
21 | 24 | </div> |
22 | | - |
| 25 | + |
23 | 26 | <component v-if="$pagination.length > 1 && paginationComponent" :is="paginationComponent"></component> |
24 | 27 | </div> |
25 | 28 | </template> |
26 | 29 |
|
27 | 30 | <script> |
28 | 31 | /* global THEME_BLOG_PAGINATION_COMPONENT */ |
29 | 32 | |
30 | | - import Toc from '@theme/components/Toc.vue' |
| 33 | + import Vue from 'vue' |
31 | 34 | import { NavigationIcon, ClockIcon } from 'vue-feather-icons' |
32 | 35 | import { Pagination, SimplePagination } from '@vuepress/plugin-blog/lib/client/components' |
33 | | -
|
| 36 | + |
34 | 37 | export default { |
35 | | - components: { Toc, Pagination, NavigationIcon, ClockIcon }, |
36 | | - // props: ['pagination'], |
| 38 | + components: { NavigationIcon, ClockIcon }, |
| 39 | +
|
37 | 40 | data() { |
38 | 41 | return { |
39 | 42 | paginationComponent: null |
|
46 | 49 | |
47 | 50 | computed: { |
48 | 51 | pages() { |
49 | | - console.log(this.$pagination) |
50 | 52 | return this.$pagination.pages |
51 | 53 | }, |
52 | 54 | }, |
|
57 | 59 | if (n === 'Pagination') { |
58 | 60 | return Pagination |
59 | 61 | } |
| 62 | +
|
60 | 63 | if (n === 'SimplePagination') { |
61 | 64 | return SimplePagination |
62 | 65 | } |
| 66 | +
|
63 | 67 | return Vue.component(n) || Pagination |
64 | 68 | } |
65 | 69 | } |
|
75 | 79 | padding-bottom 25px |
76 | 80 | margin-bottom 25px |
77 | 81 | border-bottom 1px solid #f1f1f1 |
| 82 | + |
78 | 83 | &:last-child |
79 | 84 | border-bottom 0px |
80 | 85 | margin-bottom 0px |
81 | | - |
| 86 | + |
82 | 87 | p |
83 | 88 | margin 0 |
84 | 89 | |
|
122 | 127 | font-size 12px |
123 | 128 | color rgba(0, 0, 0, 0.54) |
124 | 129 | font-weight 200 |
125 | | - |
| 130 | + |
126 | 131 | svg |
127 | 132 | margin-right 5px |
128 | 133 | width 14px |
129 | 134 | height 14px |
130 | | -
|
131 | 135 | </style> |
132 | 136 |
|
133 | 137 | <style src="prismjs/themes/prism-okaidia.css"></style> |
|
0 commit comments