-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog-posts.php
More file actions
77 lines (62 loc) · 2.96 KB
/
blog-posts.php
File metadata and controls
77 lines (62 loc) · 2.96 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
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
<?php
include("config/session.php");
include('config/fetch.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicons -->
<link rel="icon" href="images/favicon-32x32.png" sizes="32x32">
<link rel="icon" href="images/favicon-192x192.png" sizes="192x192">
<link rel="apple-touch-icon" href="images/favicon-180x180.png">
<!-- HEADER & FOOTER CSS -->
<link rel="stylesheet" href="styles/header-and-footer.css?v=<?php echo time(); ?>">
<!-- PAGE CSS -->
<link rel="stylesheet" href="styles/blog-posts.css?v=<?php echo time(); ?>"/>
<!-- SIDEBAR CSS -->
<link rel="stylesheet" href="styles/posts-side-bar.css?v=<?php echo time(); ?>"/>
<!-- FONT AWESOME ICONS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>Blog - Doppell</title>
</head>
<body>
<?php include('includes/header.php'); ?>
<main>
<div class="inner-container">
<div id="posts">
<?php foreach($posts as $post): ?>
<div class="post">
<a href="post-details.php?potitle=<?php echo $post['post_slug']; ?>">
<div class="image-box">
<div class="image-cover">
<img src="images/<?php echo $post['post_image']; ?>" alt="">
</div>
<div class="post-date">
<div>
<!-- PHP HERE -->
<span class="post-day"><?php echo $post['post_day'] ?></span><br>
<span class="post-month"><?php echo $post['post_month'] ?></span>
</div>
</div>
</div>
<div class="post-content">
<h5><?php echo $post['post_title']; ?></h5>
<div class="hor-divider"></div>
<p>
<?php $first_15_words = implode(' ',array_slice(explode(' ', $post['post_content']), 0, 15));
echo "$first_15_words [...]"; ?>
</p>
</div>
</a>
</div>
<?php endforeach; ?>
</div>
<?php include('includes/posts-side-bar.php') ?>
</div>
</main>
<?php include('includes/footer.php'); ?>
</body>
</html>