-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
37 lines (29 loc) · 961 Bytes
/
index.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
<?php
$siteData = file_get_contents('database.json');
$data = json_decode($siteData, true);
if( isset($_GET['page']) ) {
$page = $_GET['page'];
} else {
$page = 'home';
}
$randomMeta = $data['meta'][rand(0, count($data['meta'])-1)];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Jose Negrete is a web developer and UX designer based in San Francisco, CA. Give him money.">
<meta property="og:image" content="https://peprojects.dev/alpha-3/jose/images/meta/<?=$randomMeta?>">
<link rel="icon" href="images/icon.svg" type="image/svg+xml">
<title>J. Negrete — Developer / Designer</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php include('modules/header.php'); ?>
<main>
<?php include('pages/' . $page . '.php'); ?>
</main>
<?php include('modules/footer.php'); ?>
</body>
</html>