-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
180 lines (147 loc) · 6.68 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
title: "중앙대 유닉스 & 리눅스 사용자 모임"
layout: default
pagination:
enabled: true
description: "A great Jekyll theme developed by Sal @wowthemesnet."
---
<div class="container">
{% if page.url == "/" %}
<div class="row remove-site-content-margin">
<div class="col-md-12 main-bg">
</div>
</div>
<h4 class="font-weight-bold spanborder"><span>최근 게시물</span></h4>
<div class="row">
<!-- latest post -->
{% assign latest_post = site.posts[0] %}
<div class="col-md-6">
<div class="card border-0 mb-4 box-shadow">
<a href="{{site.baseurl}}{{latest_post.url}}">
{% if latest_post.image %}
<div class="image" style="background-image: url({{ latest_post.image }}); padding-bottom: 40%;"></div>
{% else %}
<div class="image" style="background-image: url(assets/images/default_thumbnail.png); padding-bottom: 40%;"></div>
{% endif %}
</a>
<div class="card-body px-0 pb-0 d-flex flex-column align-items-start">
<h2 class="h4 font-weight-bold">
<a class="text-dark" href="{{site.baseurl}}{{latest_post.url}}">{{ latest_post.title }}</a>
</h2>
<p class="excerpt">
{{ latest_post.content | strip_html | strip_newlines | truncate: 100 }}
</p>
<div>
<small class="text-muted">
{{ latest_post.date | date: '%Y년 %m월 %d일' }}
</small>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<!-- second latest post -->
{%- assign second_post = site.posts[1] -%}
<div class="mb-3 d-flex align-items-center">
<div class="col-md-4">
<a href="{{site.baseurl}}{{second_post.url}}">
{% if second_post.image %}
<div class="image" style="background-image: url('{{ second_post.image }}')"></div>
{% else %}
<div class="image" style="background-image: url('assets/images/default_thumbnail.png')"></div>
{% endif %}
</a>
</div>
<div class="col-md-8">
<h2 class="mb-2 h6 font-weight-bold">
<a class="text-dark" href="{{site.baseurl}}{{second_post.url}}">{{ second_post.title }}</a>
</h2>
<small class="text-muted">
{{ second_post.date | date: '%Y년 %m월 %d일' }}
</small>
</div>
</div>
<!-- third latest post -->
{%- assign third_post = site.posts[2] -%}
<div class="mb-3 d-flex align-items-center">
<div class="col-md-4">
<a href="{{site.baseurl}}{{third_post.url}}">
{% if third_post.image %}
<div class="image" style="background-image: url('{{ third_post.image }}')"></div>
{% else %}
<div class="image" style="background-image: url('assets/images/default_thumbnail.png')"></div>
{% endif %}
</a>
</div>
<div class="col-md-8">
<h2 class="mb-2 h6 font-weight-bold">
<a class="text-dark" href="{{site.baseurl}}{{third_post.url}}">{{ third_post.title }}</a>
</h2>
<small class="text-muted">
{{ third_post.date | date: '%Y년 %m월 %d일' }}
</small>
</div>
</div>
<!-- fourth latest post -->
{%- assign fourth_post = site.posts[3] -%}
<div class="mb-3 d-flex align-items-center">
<div class="col-md-4">
<a href="{{site.baseurl}}{{second_post.url}}">
{% if fourth_post.image %}
<div class="image" style="background-image: url('{{ fourth_post.image }}')"></div>
{% else %}
<div class="image" style="background-image: url('assets/images/default_thumbnail.png')"></div>
{% endif %}
</a>
</div>
<div class="col-md-8">
<h2 class="mb-2 h6 font-weight-bold">
<a class="text-dark" href="{{site.baseurl}}{{fourth_post.url}}">{{ fourth_post.title }}</a>
</h2>
<small class="text-muted">
{{ fourth_post.date | date: '%Y년 %m월 %d일' }}
</small>
</div>
</div>
</div>
</div>
{% endif %} <!--endif page url is / -->
<!-- Now the rest of the posts with the usual loop but with an offset:4 on the first page so we can skeep the first 4 posts displayed above -->
<div class="row mt-3">
<div class="col-md-8 main-loop">
<h4 class="font-weight-bold spanborder"><span>모든 게시물</span></h4>
{% for post in paginator.posts %}
{% include main-loop-card.html %}
{% endfor %}
<div class="mt-5">
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<ul class="pagination">
{% if paginator.previous_page %}
<li class="page-item"><a class="page-link" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« 이전</a></li>
{% else %}
<li class="page-item disabled"><span class="prev page-link">«</span></li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<li class="page-item disabled"><span class="webjeda page-link">{{ page }}</span></li>
{% elsif page == 1 %}
<li class="page-item"><a class="page-link" href="{{site.baseurl}}/">{{ page }}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<li class="page-item"><a class="page-link" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">다음 »</a></li>
{% else %}
<li class="page-item disabled"><span class="next page-link">»</span></li>
{% endif %}
</ul>
{% endif %}
</div>
</div>
<div class="col-md-4">
{% include sidebar-featured.html %}
</div>
</div>
</div>