-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinks.php
83 lines (62 loc) · 3.02 KB
/
links.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
<?php /* Template Name: Links */
echo '<!DOCTYPE html>';
echo '<html lang="pt-BR" dir="ltr">';
echo '<head>';
echo '<title class="notranslate">';
echo wp_title( '|', true, 'right' ); echo get_bloginfo('name');
echo '</title>';
get_template_part('inc/metatags');
echo '</head>';
echo '<body class="'.join(' ',get_body_class()).'">';
echo '<main>';
$urlHome = esc_url(home_url('/'));
echo '<header id="cabecalho" style="box-shadow: none">';
echo '<nav class="menu-site" aria-label="Navegação principal do site">';
echo '<ul id="navegacao" role="navigation">';
echo '<li id="menu-item-2706" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-2706">';
echo '<a href="'.$urlHome.'" style="transform: none !important; -webkit-transform: none !important;"><span class="descricao" aria-hidden="true" style="transform:none"><span class="slogan">';
echo 'Linhas de código em poesia</span> por Ana Flávia Cador</span>';
echo '<span class="nome" style="background-image: url(\''.get_template_directory_uri().'/img/marca-afcwebdesign-splash.svg\')">AFC Web Design</span>';
echo '</a>';
echo '</li>';
echo '</ul>';
echo '</nav>';
echo '</header>';
if (have_posts()) {
echo '<article class="container mini-page-insta" style="min-height: calc(100vh - 283px);">';
while (have_posts()) : the_post();
the_content();
if( have_rows('links') ) { $i = 0;
while ( have_rows('links') ) : $i++; the_row();
$link = get_sub_field('link'); $cor = get_sub_field('cor');
echo '<p style="margin-top: 15px;">';
echo '<a style="'.($cor ? 'background-color:'.$cor.' !important' : '').'" class="button link-bio" href="'.$link['url'].'" target="'.$link['target'].'">'.$link['title'].'</a>';
echo '</p>';
if ($i == 3) {
echo '<div class="area-news">';
$urlTema = get_template_directory_uri();
$webp = strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' );
$extensao = 'jpg';
if( $webp !== false ) $extensao = 'webp';
echo '<div class="foto" style="background-image: url('.$urlTema.'/img/foto-oficial.'.$extensao.');"></div>';
echo '<h2 class="cursivo has-text-align-center">fique por dentro</h2>';
echo '<p class="has-text-align-center">receba promoções da loja e novidades do studio!</p>';
get_template_part('inc/news');
echo '</div>';
}
endwhile;
}
endwhile;
echo '</article>';
}
echo '<footer id="rodape" style="margin-top:5em">';
echo '<div class="copyright">';
echo '<div class="container">';
echo '<div style="width:100%; text-align:center">'.date('Y').' © <strong>AFC Web Design</strong> <img width="16px" src="'.get_template_directory_uri().'/img/flag-brasil.svg" alt="AFC Web Design is a brazilian business" title="AFC Web Design is a brazilian business" style="vertical-align: middle;margin-right: 7px;position: relative;top: -1px;" /> CNPJ 24.014.911/0001-36</div>';
echo '</div>';
echo '</div>';
echo '</footer>';
echo '</main>';
wp_footer(); // scripts e tudo mais
echo '</body>';
echo '</html>';