-
Notifications
You must be signed in to change notification settings - Fork 0
/
html-builder.php
153 lines (129 loc) · 6.37 KB
/
html-builder.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
<?php
/* Function: adds header information
Parameter1: Optionally title name insert
Parameter2: Optionally add a page description */
function insertHeader($title = NULL, $descrip = NULL){
echo '<meta charset="utf-8">';
echo '<link rel="tempbox_icon" href="./images/logo.ico" />';
echo '<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">';
echo '<link href="./css/html-builder.css" rel="stylesheet" type="text/css">';
if($title != NULL){
echo "<title>$title</title>";
}
if($descrip != NULL){
echo '<meta name="description" content="' . $descrip . '">';
}
}
/* Function: add Nav bar
Parameter1: Optionally indicate which nav link is active*/
function insertNav(){
echo '<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="index.php" id="dashboardLogo">
<img src="./images/logo.ico" width="25" height="25" alt="DocDash logo"> Doc -> Dash
</a>
<button class="navbar-toggler d-lg-none" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto" id="links1">
<li class="nav-item">
<a class="nav-link" href="./index.php"><i class="fa fa-home" aria-hidden="true"></i> Home </a>
</li>
<li class="nav-item">
<a class="nav-link" href="./ur-user.php" target="_blank"><i class="fa fa-paper-plane-o" aria-hidden="true"></i> Quick Send</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./download.php" target="_blank"><i class="fa fa-download" aria-hidden="true"></i> Download</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" id="links2">
<li class="nav-item">
<a class="nav-link" href="./login.php"><i class="fa fa-sign-in" aria-hidden="true"></i> Login/Sign Up</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./about.php"><i class="fa fa-info-circle" aria-hidden="true"></i> About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./contact.php"><i class="fa fa-address-book" aria-hidden="true"></i> Contact Us</a>
</li>
</ul>
</div>
</nav>';
}
/* Function: Add team member Cards */
function insertTeam(){
$members = teamBuilder();
$center = 0;
echo '<div class="row">'; // Start Row
foreach ($members as $worker) {
if($center == 2){
// End previous row and start new row (Centered)
echo '</div><br>';
echo '<div class="row">
<div class="col-md-6" style="margin-left: auto; margin-right:auto;">';
}
else{
echo '<div class="col-md-6">';
}
echo ' <div class="team-info">
<div class="img-sec">
<img src="' . $worker["img"] . '" width="254" height="254" alt="' . $worker["name"] . '" class="img-responsive">
</div>
<div class="fig-caption">
<h3>' . $worker["name"] . '</h3>
<p class="marb-20">' . $worker["title"] . '</p>
<p>Follow me:</p>
<ul class="team-social">
<li class="bgblue-dark"><a href="' . $worker["links"]["fb"] . '"><i class="fa fa-facebook"></i></a></li>
<li class="bgred"><a href="' . $worker["links"]["gp"] . '"><i class="fa fa-google-plus"></i></a></li>
<li class="bgblue-light"><a href="' . $worker["links"]["tw"] . '"><i class="fa fa-twitter"></i></a></li>
<li class="bgblue-dark"><a href="' . $worker["links"]["li"] . '"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>';
if($center == 2){
// Close the new row
echo '</div>';
}
$center++;
}
}
/* This should probably be pulled from the database */
function teamBuilder(){
$team = [];
$member = [ "img" => './images/profilePic_AneeshRaman.png',
"name" => 'Aneesh Raman',
"title" => 'Developer',
"links" => array(
"fb" => 'https://www.facebook.com/aneeshraman97',
"tw" => '#',
"gp" => '#',
"li" => 'https://www.linkedin.com/in/aneesh-raman/'
)
];
array_push($team, $member);
$member = [ "img" => './images/profilePic_JoelStauffer.jpg',
"name" => 'Joel Stauffer',
"title" => 'Developer',
"links" => array(
"fb" => 'https://www.facebook.com/joel.stauffer.54',
"tw" => '#',
"gp" => '#',
"li" => '#'
)
];
array_push($team, $member);
$member = ["img" => './images/profilePic_MatthewHunt.jpg',
"name" => 'Matthew Hunt',
"title" => 'Developer',
"links" => array(
"fb" => '#',
"tw" => '#',
"gp" => '#',
"li" => '#'
)];
array_push($team, $member);
return $team;
}
?>