-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patharticles.php
85 lines (59 loc) · 1.91 KB
/
articles.php
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
<?php
/// This must come first when we need access to the current session
session_start();;
require("classes/components.php");
require("classes/article.php");
Components::pageHeader("Home Page", ["style"], ["mobile-nav"]);
?>
<div class="article-list-container articles-section">
<div class="article-heading">
<h2>Latest Articles</h2>
</div>
<div class="articles-buttons-container">
<span class="material-symbols-outlined article-arrow-left">
chevron_left
</span>
<span class="material-symbols-outlined article-arror-right">
chevron_right
</span>
</div>
<div class="book-list">
<?php
/**
* Retrieves all articles from the database
*/
$articles = Article::getAllArticles();
Components::latestArticles($articles);
?>
</div>
<div class="trending-articles articles-section">
<div class="article-heading">
<h2>Trending Articles</h2>
</div>
<div class="book-list ">
<?php
$articles = Article::getAllArticles();
Components::latestArticles($articles);
?>
</div>
</div>
<div class="all-articles articles-section">
<div class="article-heading">
<h2>All Articles</h2>
</div>
<div class="book-list ">
<!-- <div class="articles-buttons-container">
<span class="material-symbols-outlined">
chevron_left
</span>
<span class="material-symbols-outlined">
chevron_right
</span>
</div> -->
<?php
$articles = Article::getAllArticles();
Components::allBooks($articles);
?>
</div>
</div>
</div>