-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.php
73 lines (70 loc) · 2.69 KB
/
models.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
<!DOCTYPE html>
<html>
<head>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/logo.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/cards-container.css" media="screen,projection"/>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<?php
include 'navbar.php';
?>
<div class="container">
<div class="row">
<h2>Models</h2>
<p>
Here are some of the models I have done that you can download. They don't have a fixed price, so feel free to donate the amount you think I deserve.
</p>
<div class="col s12 cards-container">
<!--Grid with all the models loaded from json-->
<?php
$file_json = file_get_contents("./json/modelsdb.json");
$parsed_json = json_decode($file_json, TRUE);
foreach($parsed_json as $elem) {
$img = $elem['src'];
$tags = $elem['tags'];
$title = $elem['title'];
?>
<div class="card hoverable">
<div class="card-image">
<?php
echo "<a href='model-detail.php?model=" . $title . "'>"
?>
<img src="<?php echo $img?>">
<span class="card-title"><?php echo "$title" ?></span>
<a class="btn-floating halfway-fab waves-effect waves-light red"><i class="material-icons">file_download</i></a>
</div>
<div class="card-content">
<?php
foreach($tags as $tag) {
?>
<div class="chip">
<?php echo "$tag" ?>
</div>
<?php
}
?>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php
include 'footer.php';
?>
<!--JavaScript at end of body for optimized loading-->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<script type="text/javascript" src="js/navbar.js"></script>
<script type="text/javascript" src="js/parallax.js"></script>
</body>
</html>
<!-- vim: set filetype=eruby.html : -->