forked from pytorch/pytorch.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.html
65 lines (52 loc) · 2.03 KB
/
blog.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
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
<body class="{{ page.body-class }}">
{% include header.html %}
<div class="main-background blog-background"></div>
{% assign posts = paginator.posts %}
{% assign display_post_categories = site.posts | map: 'categories' | join: ',' | replace: '-', ' ' | split: ',' | uniq | sort %}
{% assign current_page = page.url | downcase | remove: ".html" | split: '/' %}
{% assign post_categories = site.posts | map: 'categories' | join: ',' | split: ',' | uniq | sort %}
<div class="jumbotron jumbotron-fluid">
<div class="container">
{% for post in posts limit:1 %}
<p class="featured-post">Featured Post</p>
<h1 class="blog-index-title">
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h1>
<p class="featured-blog-preview">{{ post.excerpt | remove: '<p>' | remove: '</p>' | truncate: 100 }}</p>
<a href="{{ site.baseurl }}{{ post.url }}" class="btn btn-lg with-right-arrow">
Read More
</a>
{% endfor %}
</div>
</div>
<div class="main-content-wrapper">
<div class="main-content">
<div class="container">
<div class="row blog-vertical">
{% for post in posts %}
<div class="vertical-blog-container">
<div class="col-md-4">
<p class="blog-date">{{ post.date | date: '%B %d, %Y' }}</p>
<h4>
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h4>
<p>{{ post.excerpt | remove: '<p>' | remove: '</p>' | truncate: 500}}</p>
<img src="{{ post.image }}" class="img-fluid">
</div>
<a href="{{ site.baseurl }}{{ post.url }}" class="btn btn-lg with-right-arrow">
Read More
</a>
</div>
{% endfor %}
</div>
{% include pagination_buttons.html %}
</div>
</div>
</div>
{% include quick_start_module.html %}
{% include footer.html %}
</body>
</html>