-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
33 lines (28 loc) · 1.07 KB
/
index.html
File metadata and controls
33 lines (28 loc) · 1.07 KB
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
{% extends "base.html" %}
{% block title %}Home - Blog{% endblock %}
{% block content %}
<div class="header">
<h1>Welcome to Blog</h1>
<p>Share your thoughts and ideas with the world </p>
<p> Pitch yourself to this platform</p>
</div>
<div class="filters">
<button id="all-posts" class="filter-btn active" onclick="filterPosts('all')">All Posts</button>
{% if current_user %}
<button id="my-posts" class="filter-btn" onclick="filterPosts('my')">My Posts</button>
{% endif %}
</div>
<div id="loading" class="loading">Loading posts...</div>
<div id="posts-container" class="posts-container"></div>
<div id="no-posts" class="no-posts" style="display: none;">
<p>No posts found. {% if current_user %}<a href="{{ url_for('create_post_view') }}">Create the first one!</a>{% endif %}</p>
</div>
{% endblock %}
{% block scripts %}
<script src="{{ url_for('static', filename='js/posts.js') }}"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
loadPosts();
});
</script>
{% endblock %}