This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-content-local.php
183 lines (149 loc) · 7.48 KB
/
index-content-local.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?php
/**
* HOME PAGE >> Local environment
*
* This is the template to display information about our course when the website
* is hosted locally.
*
* @author Svyatoslav Polishchuk (year 2018)
* @version 3.0
* @since 2.0
*
**==========================================================================**/
global $pageTitle;
$projectInfo = glob('*/*/*/project-info.php');
/**==========================================================================**/
?>
<main>
<div id="hero-container">
<div class="image-container">
<img src="<?php echo absolutURL . 'assets/img/home-' . environmentType . '-hero.png' ?>" alt="<?php echo environmentType . 'hero image' ?>">
</div>
<div class="hero-container">
<div class="text-wrapper">
<h1 class="text-main">Oh, hello there!</h1>
<p>Thank you for visiting our stand. Feel free to ask one of us to navigate through a variety of ours work.</p>
</div>
<div class="links-wrapper">
<button class="button button-gradient" onclick="showPopup()">
<i class="fas fa-play fa-sm"></i>
our showreel
</button>
</div>
</div>
</div>
<div id="work-container">
<div class="hero-container">
<div class="text-wrapper">
<h3 class="text-main">Some of our work</h3>
<ul>
<?php
echo '<p>show </p>';
// create project types array
$projectTypeArray = array('all');
// find all projects from work folder
foreach ($projectInfo as $file) {
// import the project info
include $file;
// check if this project can be placed on home page
if ($danadReady == true) {
// if project type is not in array yet
if (!in_array( strtolower($projectType), $projectTypeArray)) {
// add this type to array
$projectTypeArray[]=strtolower($projectType);
}
}
};
// sort the array
sort($projectTypeArray);
// now, for each item in the array
foreach ($projectTypeArray as $option) {
if (($option == 'ux/ui') || ($option == 'ar') || ($option == 'vr')) {
// if it's abbreviation than make it uppercase
$optionName = strtoupper($option);
} else {
// else leave it as is
$optionName = $option . '<span class="ending-plural">s</span>';
};
if ($option == 'all') {
$visibilityClass = 'active';
} else {
$visibilityClass = '';
}
// and print a button with a unique id
echo '<li><button class="link link-transparent link-project-type ' . $visibilityClass . '" id="project-type-' . substr($option,0,2) . '">' . $optionName . ' <span class="ending-projects">projects</span></button></li>';
};
?>
</ul>
</div>
</div>
<div class="projects-container">
<div class="projects-wrapper">
<?php
// import all projects from work folder
foreach ($projectInfo as $file) {
// I know that including the same file twice is not
//the best practise, but it works for now
include $file;
// check if this project can be placed on home page
if ($danadReady == true) {
// find project cover image
$cover = dirname($file) . '/assets/cover.jpg';
// check if the file exist, if not replace with default one
if ( file_exists($cover) ) {
$projectCover = $cover;
} else {
$projectCover = absolutURL . 'assets/img/default-cover.jpg';
};
// check project type
if (($projectType == 'ux/ui') || ($projectType == 'ar') || ($projectType == 'vr')) {
// if it's abbreviation than make it uppercase
$projectType = strtoupper($projectType);
} else {
// else leave it as is
$projectType = $projectType;
};
// echo all information
echo '<div class="single-project project-type-' . substr(strtolower($projectType),0,2) . '">';
echo '<a class="link project-link" href="' . dirname($file) . '" target="_self">';
echo '<img src="' . $projectCover . '" alt="' . ucfirst($projectName) . '">';
echo '<div class="single-project-name-wrapper">';
echo '<h4>' . ucfirst($projectName) . '</h4>';
echo '<span>' . ucfirst($projectType) . ' project by ' . ucfirst($firstName) . ' ' . ucfirst($lastName) . '</span>';
echo '</div>';
echo '</a>';
echo '</div>';
}
};
?>
</div>
<div class="links-wrapper">
<a class="link link-bold link-gray" href="<?php relativeURL ?>work/">
view all
<i class="fas fa-angle-right fa-lg"></i>
</a>
</div>
</div>
</div>
<div id="hire-container">
<div class="image-container">
<img src="<?php echo absolutURL ?>assets/img/home-all-hire.png" alt="Hire us">
</div>
<div class="hero-container">
<div class="text-wrapper">
<h2 class="text-main">Why should you hire one of us?</h2>
<p>Alongside top quality experience with top agencies and companies, the standard and creativity of work created by the Interaction Design students is rising year upon year.</p>
<p>You can be sure that you're talking to a brilliant group of well-rounded graduates that can offer design solutions to the highest standards.</p>
</div>
<div class="links-wrapper">
<a class="button button-gradient" href="<?php relativeURL ?>people/">
meet the best
</a>
<a class="link link-bold link-gray" href="<?php relativeURL ?>about/">
about the course
<i class="fas fa-angle-right fa-lg"></i>
</a>
</div>
</div>
</div>
</main>