-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-home.php
117 lines (103 loc) · 4.01 KB
/
page-home.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
<?php
/**
* Template Name: Page Home
*
* @author Julian Dawson <[email protected]>
* @license MIT License
* @link https://github.com/carlislephoto/carlislephoto-org-uk-theme
*
* @package WordPress
* @subpackage CarlislePhoto
*/
get_header();
while ( have_posts() ) : the_post(); ?>
<div class="c-hero [ c-masthead c-masthead--cover ] js-masthead-cover">
<figure class="c-masthead__media">
<!--
<video autoplay="" loop="" muted="" preload="auto">
<source src="<?php echo get_template_directory_uri() . '/videos/hero.mp4' ?>" type="video/mp4">
<img src="<?php echo get_template_directory_uri() . '/images/hero.jpg' ?>" title="Your browser does not support the <video> element">
</video>
-->
<?php the_post_thumbnail(); ?>
</figure>
<div class="c-masthead__content">
<div class="o-wrapper">
<h1 class="c-masthead__headline"><?php echo get_post( get_post_thumbnail_id() )->post_excerpt; ?></h1>
<p class="c-masthead__text"><?php echo get_post( get_post_thumbnail_id() )->post_content; ?></p>
<a class="c-button" href="http://carlislephoto.org.uk/open-call-visualising-the-home">
<span class="c-button__text">More Info</span>
<span class="c-button__icon">
<svg class="c-button__arrow">
<use xlink:href="#icon-arrow" xmlns:xlink="http://www.w3.org/1999/xlink"></use>
</svg>
</span>
</a>
</div>
</div>
</div>
<!--
<section class="c-news c-band" data-section="News">
<div class="o-wrapper">
<div class="o-layout-flex">
<div class="o-layout-flex__item u-flex-1/2">
<?php $carlislephoto_posts = get_posts( array( 'posts_per_page' => 1 ) );
foreach( $carlislephoto_posts as $post ) : setup_postdata($post);
?>
<article class="o-teaser o-teaser--featured">
<a class="o-teaser__link" href="<?php the_permalink() ?>">
<div class="o-teaser__media">
<?php the_post_thumbnail( 'carlislephoto-flex-thumbnail' ); ?>
</div>
<div class="o-teaser__content">
<div class="o-teaser__meta">
<div class="o-teaser__badge [ c-badge c-badge--blog-post ]">Blog</div>
<time class="o-teaser__date"><?php the_time('j F Y'); ?></time>
</div>
<h2 class="o-teaser__headline"><?php the_title(); ?></h2>
<?php the_excerpt(); ?>
</div>
</a>
</article>
<?php endforeach; wp_reset_postdata(); ?>
</div>
<div class="o-layout-flex__item u-flex-1/2">
<?php $carlislephoto_posts = get_posts( array( 'posts_per_page' => 2, 'offset' => 1 ) );
foreach( $carlislephoto_posts as $post ) : setup_postdata($post);
?>
<article class="o-teaser">
<a class="o-teaser__link" href="<?php the_permalink() ?>">
<div class="o-teaser__media">
<?php the_post_thumbnail( 'carlislephoto-flex-thumbnail' ); ?>
</div>
<div class="o-teaser__content">
<div class="o-teaser__meta">
<div class="o-teaser__badge [ c-badge c-badge--blog-post ]">Blog</div>
<time class="o-teaser__date"><?php the_time('j F Y'); ?></time>
</div>
<h2 class="o-teaser__headline"><?php the_title(); ?></h2>
<?php the_excerpt(); ?>
</div>
</a>
</article>
<?php endforeach; wp_reset_postdata(); ?>
</div>
</div>
<a class="c-button c-button--wide" href="/blog/">
<span class="c-button__text">More News</span>
<span class="c-button__icon">
<svg class="c-button__arrow">
<use xlink:href="#icon-arrow" xmlns:xlink="http://www.w3.org/1999/xlink"></use>
</svg>
</span>
</a>
</div>
</section>
-->
<section aria-labelledby="about-headline" class="c-about c-band" data-section="About">
<div class="o-wrapper">
<?php the_content(__('(more...)')); ?>
</div>
</section>
<?php endwhile;
get_footer(); ?>