-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
52 lines (50 loc) · 2.45 KB
/
index.html
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
{% extends 'oierspace/blog/themes/pc/theme_classic/base.html' %}
{% block title %}{{ blog.name }}{% endblock %}
{% block content %}
<main class="container">
{% if configs.index_headline %}
<div class="p-4 p-md-5 mb-4 text-white rounded bg-dark">
<div class="col-md-6 px-0">
<h1 class="display-4 fst-italic title-serif">{{ configs.index_headline.title }}</h1>
<p class="lead my-3">{{ configs.index_headline.intro }}</p>
<p class="lead mb-0"><a href="{% url 'blog_post' configs.index_headline.slug %}" class="text-white fw-bold">查看完整文章</a>
</p>
</div>
</div>
{% endif %}
<div class="row mb-2">
{% for post in configs.index_pinned_posts %}
<div class="col-md-6">
<div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
<div class="col p-4 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-primary">{{ post.category.title }}</strong>
<h3 class="mb-0 title-serif">{{ post.title }}</h3>
<div class="mb-1 text-muted">{{ post.publish_time }}</div>
<p class="card-text mb-auto">{{ post.intro }}</p>
<a href="{% url 'blog_post' post.slug %}" class="stretched-link">查看完整文章</a>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="row g-5">
<div class="col-md-8">
{% for post in posts %}
<a href="{% url 'blog_post' post.slug %}" style="text-decoration: none">
<div class="card mb-3">
<div class="card-body">
<h5 class="card-title"><span class="badge rounded-pill bg-primary">{{ post.category.title }}</span> {{ post.title }}</h5>
<p class="card-text"><small class="text-muted">{{ post.publish_time }} - {{ post.num_visits }} 浏览</small></p>
<p class="card-text" style="color: #000">{{ post.intro }}</p>
</div>
</div>
</a>
{% endfor %}
<div class="d-grid gap-2 col-6 mx-auto">
<a class="btn btn-outline-primary" href="{% url 'blog_posts' %}">查看更多</a>
</div>
</div>
{% include 'oierspace/blog/themes/pc/theme_classic/component/side.html' %}
</div>
</main>
{% endblock %}