Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c0317dc

Browse files
add else tag
1 parent 698dc5c commit c0317dc

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed

‎templates/blog_list/blog_list.html‎

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@
44
Latest Blogs
55
{% endblock %}
66

7-
{% block content %}
8-
9-
<div class="container mt-5 mb-5">
10-
{% if blog_list %}
117

12-
<!-- Main Layout -->
13-
<main class="row">
14-
15-
<!-- First Col -->
16-
<!-- the end tag for this div won't show because we have an extra div tag in condition -->
17-
<div class="col-md-9 container">
8+
9+
10+
{% block content %}
11+
{% if blog_list %}
1812

1913
<div class="row">
2014
{% for blog in blog_list %}
@@ -58,25 +52,7 @@ <h4 class="card-title">{{ blog.title|title }}</h4>
5852
{% endfor %}
5953
</div>
6054

61-
</div>
62-
63-
64-
<!-- /First Col -->
65-
66-
<!-- Second Col -->
67-
<div class="col-md-3 container">
68-
69-
<h1>SIDEBAR OPTIONS WILL COME HERE</h1>
70-
71-
</div>
72-
<!-- /Second Col -->
73-
74-
</main>
75-
<!-- /Main Layout -->
76-
77-
{% else %}
78-
79-
{% endif %}
80-
</div>
81-
82-
{% endblock content %}
55+
{% else %}
56+
<h1>No Blogs are available.</h1>
57+
{% endif %}
58+
{% endblock content %}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /