-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
145 lines (111 loc) · 4.44 KB
/
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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
/*
* @license http://www.gnu.org/licenses/gpl.txt
* @copyright 2014,2015 Sourcefabric z.u.
* @link http://www.sourcefabric.org
* @author Micz Flor <[email protected]>
*/
// read the JSON file
$storyboard = json_decode(file_get_contents("storyboard.json"), true); // use true to make it an array
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" id="modernizrcom" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?php print $storyboard['meta']['title']; ?></title>
<meta name="author" content="Micz Flor" >
<meta name="description" content="<?php print $storyboard['meta']['description']; ?>">
<meta name="keywords" content="" />
<!-- RSS & Pingback -->
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php print $storyboard['meta']['rsspingback']; ?>">
<meta property="og:title" content="<?php print $storyboard['meta']['title']; ?>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<?php print $storyboard['meta']['src']; ?>" />
<meta property="og:site_name" content="<?php print $storyboard['meta']['site_name']; ?>" />
<meta property="og:description" content="<?php print $storyboard['meta']['description']; ?>" />
<meta property="og:image" content="<?php print $storyboard['meta']['site_img']; ?>" />
<meta content="yes" name="apple-mobile-web-app-capable">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="shortcut icon" href="assets/img/favicon.ico">
<link rel="apple-touch-icon" href="assets/img/touch-icon.png">
<link href="assets/css/style.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!--script src="assets/js/jquery2.1.3.min.js"></script-->
</head>
<body class="longform" name="top">
<?php
if($storyboard['meta']['share']['facebook'] == "true") {
print "
<div id='fb-root'></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = '//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>";
}
?>
<div id="loader-wrapper" >
<div id="loader-image" data-src="<?php print $storyboard['meta']['site_img']; ?>" ></div>
<div class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
</div>
<!-- main audio -->
<audio id="master-audio" preload="none" autoplay="autoplay" loop="loop"></audio>
<a href="#" class="mute">Mute</a>
<?php
// first loop for table of contents, second loop for content itself
// first loop for table of contents
include("php-snippets/navigation.php");
print "
<article>";
// second loop for content itself
foreach($storyboard['items'] as $storycounter => $values) {
//print "<pre>";print key($values);print_r($values);print "</pre>";//???
$story = $values[key($values)]; // get the story into an array without the key
switch(key($values)) {
case ("videobackground"):
include("php-snippets/videobackground.php");
break;
case ("textcentered"):
include("php-snippets/textcentered.php");
break;
case ("imagebackground"):
include("php-snippets/imagebackground.php");
break;
case ("videofullpage"):
include("php-snippets/videofullpage.php");
break;
case ("slideshowhorizontal"):
include("php-snippets/slideshowhorizontal.php");
break;
case ("slideshowvertical"):
include("php-snippets/slideshowvertical.php");
break;
case ("imageparallax"):
include("php-snippets/imageparallax.php");
break;
}
}
?>
</article>
<div class="social-buttons credits">
<?php
include("php-snippets/sub-socialbuttons.php");
?>
</div>
<script src="assets/js/all.js"></script>
</body>
</html>