-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathall-posts.html
83 lines (73 loc) · 3.03 KB
/
all-posts.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>all posts</title>
<link rel="icon" href="/images/all-posts.png">
<link rel="stylesheet" href="css/post-style.css">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<h2 class="navbar">
<u class="quicklink" id="back-to-home">marcel marusiak</u><u class="quicklink">/all posts</u>
</h2>
<div class="cover"></div>
<div class='main'>
<div class='filter-content'>
<h1>filter options</h1>
<div class="sort-holder">
<label for="sort">sort posts by
<select name="sort-select" id="sort">
<optgroup label="Date">
<option value="1">newest to oldest</option>
<option value="2">oldest to newest</option>
</optgroup>
<optgroup label="Alphabetical">
<option value="3">a to z</option>
<option value="4">z to a</option>
</optgroup>
</select>
</label>
</div>
<h2>
filter by hashtag
</h2>
<div class='hashtags' id='hashtag-holder'></div>
</div>
<div class="all-posts-content">
<h1>posts</h1>
<div class='posts' id='posts'>
<div class="post">
<div class="title-content">
<img src="/Posts/posts-materials/macbook-it-guy.png" alt="">
<h2>post title</h2>
<p>23 sep. 2024</p>
</div>
<p>Lorem ipsum dolor sit amet, consectetur</p>
</div>
</div>
<h2 class="post-pages">
<c id="previous">←</c>
<c id="pages-holder">1 2 3</c>
<c id="next">→</c>
</h2>
</div>
</div>
<script src="./js/postCreator.js"></script>
<script src="./js/posts.js"></script>
<script src="./js/postsPage.js"></script>
<script>
// Get a reference to the select element and manage dropdown options
const selectElement = document.getElementById('sort');
selectElement.addEventListener('change', function () { sortBy(selectElement.value) });
const previousPage = document.getElementById('previous');
previousPage.addEventListener('click', function () { moveToPreviousPage() });
const nextPage = document.getElementById('next');
nextPage.addEventListener('click', function () { moveToNextPage() });
// Get a reference to back to home element and make button from it
const backToHomeElement = document.getElementById('back-to-home');
backToHomeElement.addEventListener('click', function () { document.location.href = './' });
</script>
</body>
</html>