-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-jetpack-portfolio.php
188 lines (180 loc) · 6.34 KB
/
single-jetpack-portfolio.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?php
/**
* The template for displaying all single posts.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package coletivo
*/
get_header(); ?>
<div id="content" class="site-content">
<nav class="col-md-2 menu-portfolio" id="menu-portfolio-scroll">
<h3>
<?php _e( 'Menu', 'brasa2018' );?>
</h3>
<ul id="menu-portfolio-container">
<li>
<a href="#slider">
<?php _e( 'Imagens', 'brasa2018' );?>
</a>
</li>
<li>
<a href="#desafio">
<?php _e( 'Desafio', 'brasa2018' );?>
</a>
</li>
<li>
<a href="#solucao">
<?php _e( 'Solução', 'brasa2018' );?>
</a>
</li>
<li>
<a href="#impacto">
<?php _e( 'Impacto', 'brasa2018' );?>
</a>
</li>
<li>
<a href="#video">
<?php _e( 'Vídeo', 'brasa2018' );?>
</a>
</li>
<li>
<a href="#depoimentos">
<?php _e( 'Depoimentos', 'brasa2018' );?>
</a>
</li>
</ul>
</nav><!-- .col-md-4 menu-portfolio -->
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<section class="secao secao-full row" id="slider">
<?php
$slider = get_field( "slider" );
echo do_shortcode(' [brasa_slider id="'.$slider->ID.'"]') ?>
</section>
<section class="secao secao-margin" id="conteudo">
<?php $desafio = get_field( "desafio" );
$solucao = get_field( "solucao_projeto" );
$impacto = get_field( "impacto" );
$impacto = get_field( "impacto" );
$thumbnail_do_video = get_field( "thumbnail_do_video" );
$link_do_video = get_field( "link_do_video" );
if( $desafio ) {
?>
<h3>Desafio</h3>
<div class="conteudo-interno" id="desafio" >
<?php echo $desafio; ?>
</div>
<?php
}
if( $solucao ) {
?>
<h3>Solução</h3>
<div class="conteudo-interno" id="solucao" >
<?php echo $solucao; ?>
</div>
<?php
}
if( $impacto ) {
?>
<h3>Impacto</h3>
<div class="conteudo-interno" id="impacto" >
<?php echo $impacto; ?>
</div>
<?php
}
?>
</section>
<?php
if( $thumbnail_do_video && $link_do_video ) {
?>
<section style="background-image: url(<?php echo $thumbnail_do_video['url']; ?>);"class="secao secao-full section-videolightbox row" id="video">
<div class="videolightbox__icon videolightbox-popup">
<a href="<?php echo $link_do_video; ?>" data-scr="<?php echo $link_do_video; ?>" class="popup-video">
<span class="video_icon"><i class="fa fa-play"></i></span>
</a>
</div>
</section>
<?php
} ?>
<?php /*
<section class="secao secao-margin row" id="depoimentos">
<h3>Depoimentos</h3>
</section>
*/?>
<section class="secao secao-margin row" id="mais">
<h2>Veja mais trabalhos</h2>
<?php
$prev_post = get_previous_post();
// print_r($prev_post);
if (!empty( $prev_post )):?>
<div class="col-md-6" id="anteriores">
<div class="col-md-8">
<a href="<?php echo $prev_post->guid ?>">
<?php
echo "<h4>".$prev_post->post_title.'</h4>';
echo "<p>".wp_strip_all_tags($prev_post->post_content)."</p>";
?>
</a>
</div>
<div class="col-md-4">
<a href="<?php echo $prev_post->guid ?>">
<?php
echo get_the_post_thumbnail($prev_post);
?>
</a>
</div>
</div>
<?php
endif
?>
<?php
$next_post = get_next_post();
// print_r($prev_post);
if (!empty( $next_post )):?>
<div class="col-md-6" id="proximos">
<div class="col-md-4">
<a href="<?php echo $next_post->guid ?>">
<?php
echo get_the_post_thumbnail($next_post);
?>
</a>
</div>
<div class="col-md-8">
<a href="<?php echo $next_post->guid ?>">
<?php
echo "<h4>".$next_post->post_title."</h4>";
echo "<p>".wp_strip_all_tags($next_post->post_content)."</p>";
?>
</a>
</div>
</div>
<?php
endif
?>
</section>
<!-- <div class="secao secao-full section-social row" id="social">
<div class="footer-connect">
<div class="container">
<div class="row">
<div class="col-asm-8">
<div class="footer-social">
<h5 class="follow-heading">Redes Sociais</h5>
<div class="footer-social-icons">
<a target="_blank" href="#" title="Facebook"><i class="fa fa fa-facebook-official"></i></a>
<a target="_blank" href="http://twitter.com/brasadesign" title="Twitter"><i class="fa fa fa-twitter"></i></a>
<a target="_blank" href="http://instagram.com/brasadesign" title="Instagram"><i class="fa fa fa-instagram"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div> -->
<?php
include_once(get_template_directory()."/section-parts/section-social.php");
?>
</article><!-- #post-## -->
<?php endwhile; // End of the loop. ?>
</div><!-- #content -->
<?php get_footer(); ?>