-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
111 lines (93 loc) · 3.26 KB
/
front-page.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
<?php
/**
* The Front Page
* Hard coded. ...because nobody else is going to be editing this are they!
*
* @package kanec
*/
get_header(); ?>
<div id="primary" class="content-area">
<div class="video-bg">
<video autoplay loop poster="<?= get_template_directory_uri() ?>/assets/images/splash.jpg" id="splash-video-bg">
<source src="<?= get_template_directory_uri() ?>/assets/images/splash.webm" type="video/webm">
<source src="<?= get_template_directory_uri() ?>/assets/images/splash.mp4" type="video/mp4">
</video>
</div>
<section class="splash">
<div class="inner">
<div class="container">
<h1><span>Kane Clover</span> / Manchester, UK</h1>
<h2><?= get_bloginfo( 'description', 'display' ); ?></h2>
<a href="<?= get_permalink( get_option( 'page_for_posts' ) ); ?>" class="enter">
<i class="icon icon-arrow-right"></i>
</a>
</div>
</div>
</section>
<main id="main" class="site-main" role="main">
<section class="intro">
<div class="container">
<div class="slogan">
<img src="<?= get_template_directory_uri() ?>/assets/images/beauty.svg" alt="Beauty comes from the inside!">
</div>
<div class="statement">
<h3>I have a background in Graphic Design and art, along with many years experience building the web.</h3>
<p>I've worked on projects encompassing everything from logo and print design, through video post production, all the way to React JS, Wordpress plugin development, Linux server admin, Ruby on Rails and Node.</p>
<p>Skills not mastered: Copywriting and personal statements ;-)</p>
</div>
</div>
</section>
<?php
// Get first 3 portfolio items ----------------------------------------
$query = [
'no_found_rows' => true,
'post_status' => 'publish',
'post_type' => 'portfolio',
'posts_per_page' => 3,
];
$portfolio = new WP_Query( $query );
if( $portfolio->have_posts() ) : ?>
<section class="post-thumbs">
<header>
<h2><i class="icon icon-briefcase"></i> Portfolio</h2>
</header>
<?php
while ( $portfolio->have_posts() ) : $portfolio->the_post();
get_template_part( 'template-parts/content', 'portfolio-excerpt' );
endwhile;
?>
</section>
<hr>
<?php endif; // have_posts
wp_reset_postdata();
// Get first 3 blog posts ---------------------------------------------
$query = [
'no_found_rows' => true,
'post_status' => 'publish',
'post_type' => 'post',
'ignore_sticky_posts' => true,
'posts_per_page' => 3,
];
$blog = new WP_Query( $query );
if( $blog->have_posts() ) : ?>
<section class="post-thumbs">
<header>
<h2><i class="icon icon-paper-plane"></i> Blog</h2>
<a href="<?= get_permalink( get_option('page_for_posts') ); ?>" class="see-all">
See all posts
<!-- <i class="icon icon-arrow-right"></i> -->
</a>
</header>
<?php
while ( $blog->have_posts() ) : $blog->the_post();
get_template_part( 'template-parts/content', 'blog-excerpt' );
endwhile;
?>
</section>
<?php endif; // have_posts
wp_reset_postdata(); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_sidebar();
get_footer();