-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-about.php
147 lines (127 loc) · 5.45 KB
/
page-about.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
<?php /* Template Name: About */
get_header();
while (have_posts()) {
the_post(); ?>
<!-- Page Header -->
<header class="page-header">
<div class="container">
<h1 class="animate"><?php the_title(); ?></h1>
</div>
</header>
<!-- Bio Section -->
<section class="bio-content animate">
<div class="container">
<div class="flex">
<?php $headshot = get_field('about_headshot');
$resume_button = get_field('about_resume');
if ($headshot) { ?>
<!-- Headshot -->
<div class="headshot">
<picture>
<source media="(min-width: 425px)" srcset="<?php echo $headshot['sizes']['572w']; ?>">
<img src="<?php echo $headshot['sizes']['730w']; ?>" width="<?php echo $headshot['width']; ?>" height="<?php echo $headshot['height']; ?>" alt="Photo of Ashe Abbott DiBlasi">
</picture>
</div>
<?php }?>
<!-- Bio -->
<div class="bio">
<?php the_content();
if ($resume_button) {
$button_text = $resume_button['title'];
$button_url = $resume_button['url'];
$button_target = $resume_button['target'];
if ($button_text && $button_url) { ?>
<!-- Resume Button -->
<a class="button" href="<?php echo $button_url; ?>" <?php if ($button_target) { echo 'target=" ' . $button_target . '"'; if ($button_target === '_blank') { echo ' rel="noreferrer"'; }} ?>><?php echo $button_text; ?></a>
<?php }
} ?>
</div>
</div>
</div>
</section>
<?php $skill_set = get_field('about_skill_set');
if ($skill_set) { ?>
<!-- Skills Section -->
<section class="skill-set">
<div class="container">
<!-- Heading -->
<h2>Skill Set</h2>
<!-- Skills -->
<div class="skills">
<?php if ($skill_set['skill_level']) { ?>
<!-- Skill Level Headers -->
<div class="skill-headers flex">
<?php foreach ($skill_set['skill_level'] as $skill_level) {
$skill_level_heading = $skill_level['skill_level_heading'];
$skill_level_description = $skill_level['skill_level_description'];
$skill_groups = $skill_level['skill_group']; ?>
<div class="skill-level">
<?php if ($skill_level_heading || $skill_level_description) { ?>
<header class="skill-level-header">
<?php if ($skill_level_heading) { ?>
<h3><?php echo $skill_level_heading; ?></h3>
<?php }
if ($skill_level_description) { ?>
<p class="description"><?php echo $skill_level_description; ?></p>
<?php } ?>
</header>
<?php } ?>
</div>
<?php } ?>
</div>
<!-- Skill Levels -->
<div class="skill-levels flex">
<?php foreach ($skill_set['skill_level'] as $skill_level) {
$skill_level_heading = $skill_level['skill_level_heading'];
$skill_level_description = $skill_level['skill_level_description'];
$skill_groups = $skill_level['skill_group']; ?>
<!-- Skill Level -->
<div class="skill-level">
<?php if ($skill_level_heading || $skill_level_description) { ?>
<!-- Skill Level Header -->
<header class="skill-level-header">
<?php if ($skill_level_heading) { ?>
<h3><?php echo $skill_level_heading; ?></h3>
<?php }
if ($skill_level_description) { ?>
<!-- Skill Level Description -->
<p class="description"><?php echo $skill_level_description; ?></p>
<?php } ?>
</header>
<?php }
if ($skill_groups) { ?>
<!-- Skill Groups -->
<div class="skill-groups">
<?php foreach ($skill_groups as $skill_group) {
$skill_group_heading = $skill_group['skill_group_heading'];
$skills_array = $skill_group['skills']; ?>
<!-- Skill Group -->
<div class="skill-group">
<?php if ($skill_group_heading) { ?>
<!-- Skill Group Heading -->
<h4><?php echo $skill_group_heading; ?></h4>
<?php }
if ($skills_array) { ?>
<!-- Skills -->
<ul>
<?php foreach ($skills_array as $skills) {
foreach ($skills as $skill) { ?>
<li><?php echo $skill; ?></li>
<?php }
} ?>
</ul>
<?php } ?>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
</section>
<?php } ?>
<?php }
get_footer(); ?>