This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-about.php
128 lines (118 loc) · 3.66 KB
/
template-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
<?php
/**
* Template Name: About me
*/
get_header();
?>
<section class="section">
<div class="columns">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
$profile_meta = get_post_meta(get_the_ID(), 'sundown_profile', true);
?>
<div class="column">
<h1 class="title"><?php _e('Profile', 'sundown'); ?></h1>
<p>
<?php
echo $profile_meta['summary'];
?>
</p>
<div class="section">
<ul class="about-list">
<li>
<h2 class="title is-5"><?php _e('Name', 'sundown'); ?></h2>
<h3 class="has-text-grey subtitle is-6">
<?php
echo $profile_meta['name'];
?>
</h3>
</li>
<li>
<h2 class="title is-5"><?php _e('Current location', 'sundown'); ?></h2>
<h3 class="has-text-grey subtitle is-6">
<?php
echo $profile_meta['location'];
?>
</h3>
</li>
<li>
<h2 class="title is-5"><?php _e('Date of birth', 'sundown'); ?></h2>
<h3 class="has-text-grey subtitle is-6">
<?php
echo $profile_meta['dob'];
?>
</h3>
</li>
<li>
<h2 class="title is-5"><?php _e('Current job', 'sundown'); ?></h2>
<h3 class="has-text-grey subtitle is-6">
<?php
echo $profile_meta['job'];
?>
</h3>
</li>
<li>
<h2 class="title is-5"><?php _e('E-mail', 'sundown'); ?></h2>
<h3 class="has-text-grey subtitle is-6">
<?php
echo $profile_meta['email'];
?>
</h3>
</li>
</ul>
</div>
</div>
<div class="column">
<h1 class="title"><?php _e('Skills', 'sundown'); ?></h1>
<p>
<?php
echo $profile_meta['skill_summary'];
?>
</p>
<div class="section">
<ul class="about-list">
<?php
$skills = new WP_query([
'post_type' => 'skill',
'posts_per_page' => -1,
'orderby' => 'name',
'order' => 'ASC'
]);
if ($skills->have_posts()) {
while ($skills->have_posts()) {
$skills->the_post();
$skill_meta = get_post_meta(get_the_ID(), 'sundown_skill', true);
$status = $skill_meta['progress'] > 50
? 'is-success'
: 'is-warning';
?>
<li>
<h2 class="title is-5">
<span class="icon is-medium">
<i class="mdi mdi-36px <?php echo $skill_meta['icon']; ?>"></i>
</span>
<?php echo $skill_meta['title']; ?>
</h2>
<progress
class="progress subtitle <?php echo $status; ?>"
value="<?php echo $skill_meta['progress']; ?>"
max="100"
></progress>
</li>
<?php
}
}
?>
</ul>
</div>
</div>
<?php
}
}
?>
</div>
</section>
<?php
get_footer();