-
Notifications
You must be signed in to change notification settings - Fork 0
/
store.php
101 lines (96 loc) · 5.27 KB
/
store.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
<?
// Local config
$localMetaTitle = 'Store Reopening Soon - Chris Watterston';
$localMetaDesc = 'The official home of the original \'There Is No Cloud\' sticker, clothing and merchandise';
$localMetaKeywords = 'There is no Cloud, There is no Cloud Sticker, There is no Cloud Merchandise, Chris Watterston Store';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<? include_once($_SERVER['DOCUMENT_ROOT'] . '/inc/header.global.php'); ?>
<? include_once($_SERVER['DOCUMENT_ROOT'] . '/config/analytics.global.php'); ?>
</head>
<body>
<div class="<?= $globalPrefix; ?>-body-container">
<? include_once($_SERVER['DOCUMENT_ROOT'] . '/inc/nav.global.php'); ?>
<section class="<?= $globalPrefix; ?>-stream-container _listing _max-width__1280 ">
<section class="<?= $globalPrefix; ?>-intro-container _intro _text-align__center">
<h1 class="_green _stacked">Store</h1>
<h2 class="_yellow _stacked">Reopening</h2>
<h2 class="_purple _stacked">Soon</h2>
</section>
<div class="<?= $globalPrefix; ?>-grid-container _work-latest _listing _work">
<?php
//
// ------------------------------------------------------------
// ------------------------------------------------------------
// ------------------------------------------------------------
// ---------- OUTPUT ALL WORK ----------
// ----------
// ----------
//
$jsonWorkOutput = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/data/contentful.work.json'), true);
$a = 0;
foreach ($jsonWorkOutput as $k => $v) {
$a++;
if ($a >= 3) break;
echo '
<article class="' . $globalPrefix . '-card-container _listing _work">
<div class="__type">
<div class="__thumb" style="background-image:url(' . $v['workHeroImage']['fields']['file']['url'] . ');" data-image-title="' . $v['workHeroImage']['fields']['title'] . '"></div>
</div>
<div class="__client" style="background-image:url(' . $v['workClientLogo']['fields']['file']['url'] . ');" data-image-title="' . $v['workClientLogo']['fields']['title'] . '"></div>
<div class="__group _text-align__right">
<h3>' . $v['workTitle'] . '</h3>
<h4>' . date('Y', strtotime($v['workLiveDate'])) . '</h4>
<p class="_post-date">
';
// foreach ($v['workRoleTags'] as $t) {
// echo '<span class="__role-tag">' . $t . '</span>';
// }
echo '
</p>
</div>
<a href="/work/case-study/' . $v['workUrlSlug'] . '" data-cabin-event="Embed / Store to Work" class="_hidden" title="' . $v['workTitle'] . '"> </a>
</article>
';
}
?>
</div>
<section class="<?= $globalPrefix; ?>-intro-container _title _text-align__center"></section>
<div class="<?= $globalPrefix; ?>-grid-container _column-3 _listing">
<?php
//
// ------------------------------------------------------------
// ------------------------------------------------------------
// ------------------------------------------------------------
// ---------- OUTPUT ALL POSTS ----------
// ----------
// ----------
//
$jsonBlogOutput = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/data/contentful.blog.json'), true);
$b = 0;
foreach ($jsonBlogOutput as $k => $v) {
$b++;
if ($b > 3) break;
echo '
<article class="' . $globalPrefix . '-card-container _listing">
<div class="__type">
<div class="__thumb" style="background-image:url(' . $v['articleHeroImage']['fields']['file']['url'] . ');" data-image-title="' . $v['articleHeroImage']['fields']['title'] . '"></div>
</div>
<div class="__title _text-align__right">
<h3>' . $v['articleTitle'] . '</h3>
<h6>' . $v['articleDescription'] . '</h6>
</div>
<div class="__posted _text-align__right"><p class="_post-date">' . date('jS M Y', strtotime($v['articleLiveDate'])) . '</p></div>
<a href="/article/' . $v['articleUrlSlug'] . '" data-cabin-event="Embed / Store to Article" class="_hidden" title="' . $v['articleTitle'] . '"> </a>
</article>
';
}
?>
</div>
</section>
<? include_once($_SERVER['DOCUMENT_ROOT'] . '/inc/footer.global.php'); ?>
</div>
</body>
</html>