-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.php
More file actions
56 lines (52 loc) · 2.36 KB
/
Copy pathblog.php
File metadata and controls
56 lines (52 loc) · 2.36 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
<?php
//title, class, h1, etc for the current page
include 'includes/current-page.php';
//contact form submission handling
include 'includes/form-handler.php';
//header, nav, main opener etc
include 'includes/header.php';
//TODO: Connect to database and fetch tags and posts for display
include 'includes/get-blog-tags-and-posts.php';
?>
<div id="hero">
<picture>
<!--2000px, 1600px, 1200px, 800px, 480px-->
<source media="(min-width:1601px)" srcset="assets/blog-hero-largest.jpg">
<source media="(min-width:1201px)" srcset="assets/blog-hero-larger.jpg">
<source media="(min-width:801px)" srcset="assets/blog-hero-large.jpg">
<source media="(min-width:481px)" srcset="assets/blog-hero-medium.jpg">
<img src="assets/blog-hero-small.jpg" alt="Diagrams of a stack, tree, and cloud over a purple and blue gradient.">
</picture>
<div id="hero-text">
<p>Blog</p>
<p>Tutorials, articles, and other useful content from project learnings and interview prep.</p>
</div>
</div>
<section>
<h1 id="h1">Blog</h1>
<section id="tags">
<h2>Tags</h2>
<ul>
<li><a href="#posts">All posts</a></li>
<?php
foreach($tags as $tag) {
echo "<li><a href=\"blog.php?tag=$tag#posts\">$tag</a></li>";
} ?>
</ul>
</section>
<section id="posts">
<h2>Recent Posts</h2>
<?php
foreach($html as $post) {
echo $post;
}
?>
</section>
<div class="buttons-row">
<a href="hire-me.php" target="_blank" class="button">Hire Me</a>
<a href="<?= $linkedin ?>" target="_blank" class="button">LinkedIn</a>
</div>
<p>Thanks for checking out my blog! <a href="#h1">Back to top</a></p>
</section>
<?php
include 'includes/footer.php';