-
Notifications
You must be signed in to change notification settings - Fork 0
/
work.php
104 lines (99 loc) · 5.56 KB
/
work.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
<?
// Local config
$localMetaTitle = 'Digital Product Designer Case Studies & Portfolio of Work - Chris Watterston';
$localMetaDesc = 'Work and case studies from throughout the years. From digital product design and development, to agile management and architecture';
$localMetaKeywords = 'Digital Designer Work, Digital Designer Portfolio, Digital Product Design Work, Digital Product Design Portfolio, London UK Designer Work, London UK Designer Portfolio, London UK UX Designer Work, London UK UX Designer Portfolio, Chris Watterston Work Portfolio';
?>
<!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 _title _text-align__center">
<h1 class="_black _stacked">Work</h1>
</section>
<div class="<?= $globalPrefix; ?>-grid-container _work-latest _listing _work">
<?php
//
// ------------------------------------------------------------
// ------------------------------------------------------------
// ------------------------------------------------------------
// ---------- OUTPUT ALL WORK ----------
// ----------
// ----------
//
$jsonContentOutput = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/data/contentful.work.json'), true);
$a = 0;
foreach ($jsonContentOutput 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="Listing / Work Main" class="_hidden" title="' . $v['workTitle'] . '"> </a>
</article>
';
}
?>
</div>
<div class="<?= $globalPrefix; ?>-grid-container _column-3 _listing _work">
<?php
//
// ------------------------------------------------------------
// ------------------------------------------------------------
// ------------------------------------------------------------
// ---------- OUTPUT ALL WORK ----------
// ----------
// ----------
//
$b = 0;
foreach ($jsonContentOutput as $k => $v) {
$b++;
if ($b <= 2) continue;
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>' . $t . '</span>';
// }
echo '
</p>
</div>
<a href="/work/case-study/' . $v['workUrlSlug'] . '" data-cabin-event="Listing / Work Sec" class="_hidden" title="' . $v['workTitle'] . '"> </a>
</article>
';
}
?>
</div>
</section>
<? include_once($_SERVER['DOCUMENT_ROOT'] . '/inc/footer.global.php'); ?>
</div>
</body>
</html>