-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
archives.php
57 lines (45 loc) · 2.25 KB
/
archives.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php require 'func/header.php'; ?>
<div class="archive-banner">
<h2><?php echo $_GET['cate'] ?></h2>
<p class="archive-banner-badge"># 文章分类</p>
<em class="archive-banner-count">{{ cate_info.posts_count }} 篇内容</em>
</div>
<div class="blog-container" v-loading="!loaded" style="width:50%;margin-top:5vh">
<template v-for="(post,index) in posts" v-if="post.info.Cate !== '<?php echo $site->index_exclude ?>'">
<el-card shadow="hover" v-if="index <= display_count" class="stream-card-archive">
<div class="archive-post-div">
<div v-if="post.info.Img !== ':'" :style="'background-image: url('+post.info.Img+')'" class="archive-img">
</div>
<div :style="post.info.Img !== ':' ? 'width:65%' : 'width:100%'">
<p class="stream-info">
<em>{{ post.info.Author ? post.info.Author : 'Whoever'}}</em>
<em>{{ post.info.Date ? post.info.Date : 'Whenever'}}</em>
<em>{{ post.info.Cate ? post.info.Cate : 'Wherever' }}</em>
<em style="color: rgb(136, 142, 148);background: rgb(231, 236, 240);" v-for="tag in post.info.Tags.split(',')">{{ tag }}</em>
</p>
<a :href="'posts.php?view=' + post.filename">
<h1 v-html="post.info.Title"></h1>
<div v-html="md.render(post.content.replace(/\n*/g,'') + '...')" class="stream-content"></div>
</a>
</div>
</div>
</el-card>
</template>
<template v-else>
<el-card shadow="hover" class="stream-card-archive-friend">
<div class="archive-post-div">
<img :src="post.info.Img" class="archive-f-img">
<a :href="post.filename">
<h1 v-html="post.info.Title" class="archive-f-h1"></h1>
</a>
<p v-html="post.content" class="archive-f-p"></p>
</el-card>
</template>
<el-card shadow="hover" class="stream-card" v-loading="loading" v-show="loading">
</el-card>
<?php require 'func/footer.php'; ?>
</div>
</transition>
<script src="js/archive.js" type="text/javascript"></script>
</body>
</html>