/
page-quem-somos-na-usp.php
153 lines (146 loc) · 7.65 KB
/
page-quem-somos-na-usp.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
<?php
/**** Comissão template file ****/
get_header(); ?>
<div class="breadcrumb">
<div class="container">
<?php wp_custom_breadcrumbs(); ?>
</div>
</div>
<section class="page <?php echo get_post_field( 'post_name', get_post() );?>">
<?php get_sidebar(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="venn">
<h2><?php the_title(); ?> </h2>
<div class="venn-content">
<img class="pesquisador-image" src="<?php echo customBlogUrl(); ?>/images/venn.png" alt="" class="image" />
<span class="area-externa"><?php the_field('area_externa'); ?></span>
<span class="sistema"><?php the_field('sistema'); ?></span>
<div class="area_esquerda" onmouseover="showContent('area_esquerda', 'over');" onmouseleave="showContent('area_esquerda', 'leave');">
<?php
$esquerda_id = get_field('pagina_area_esquerda');
$post_esquerda = get_post($esquerda_id);
$slug = $post_esquerda->post_name;
?>
<a href="<?php bloginfo('url'); ?>/<?php echo $slug;?>"><?php the_field('area_esquerda'); ?></a>
<span ><?php the_field('subtitulo_area_esquerda'); ?></span>
<div class="nomes" id="area_esquerda">
<?php
$term = get_field('area_esquerda');
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'venn',
'field' => 'name',
'terms' => $term
)
)
);
$query = new WP_Query($args);
if ( $query -> have_posts() ) : while ( $query -> have_posts() ) : $query -> the_post(); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endwhile; endif; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<div class="area_superior" onmouseover="showContent('area_superior', 'over');" onmouseleave="showContent('area_superior', 'leave');">
<?php
$superior_id = get_field('pagina_area_superior');
$post_superior = get_post($superior_id);
$slug = $post_superior->post_name;
?>
<a href="<?php bloginfo('url'); ?>/<?php echo $slug;?>"> <?php the_field('area_superior'); ?></a>
<span ><?php the_field('subtitulo_area_superior'); ?></span>
<div class="nomes" id="area_superior">
<?php
$term = get_field('area_superior');
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'venn',
'field' => 'name',
'terms' => $term
)
)
);
$query = new WP_Query($args);
if ( $query -> have_posts() ) : while ( $query -> have_posts() ) : $query -> the_post(); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endwhile; endif; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<div class="area_central" onmouseover="showContent('area_central', 'over');" onmouseleave="showContent('area_central', 'leave');">
<?php
$central_id = get_field('pagina_area_central');
$post_central = get_post($central_id);
$slug = $post_central->post_name;
?>
<a href="<?php bloginfo('url'); ?>/<?php echo $slug;?>"><?php the_field('area_central'); ?></a>
<div class="nomes" id="area_central">
<?php
$term = get_field('area_central');
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'venn',
'field' => 'name',
'terms' => $term
)
)
);
$query = new WP_Query($args);
if ( $query -> have_posts() ) : while ( $query -> have_posts() ) : $query -> the_post(); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endwhile; endif; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<div class="area_inferior" onmouseover="showContent('area_inferior', 'over');" onmouseleave="showContent('area_inferior', 'leave');">
<?php
$inferior_id = get_field('pagina_area_inferior');
$post_inferior = get_post($inferior_id);
$slug = $post_inferior->post_name;
?>
<a href="<?php bloginfo('url'); ?>/<?php echo $slug;?>"><?php the_field('area_inferior'); ?></a>
<span ><?php the_field('subtitulo_area_inferior'); ?></span>
<div class="nomes" id="area_inferior">
<?php
$term = get_field('area_inferior');
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'venn',
'field' => 'name',
'terms' => $term
)
)
);
$query = new WP_Query($args);
if ( $query -> have_posts() ) : while ( $query -> have_posts() ) : $query -> the_post(); ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endwhile; endif; ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</section>
<?php get_footer(); ?>
<script>
showContent = function (area, action) {
var target = document.getElementById(area);
if (action === 'over') {
target.classList.add('active');
var element = document.getElementsByClassName(area);
var elementRef = element[0].getBoundingClientRect();
elementTop = elementRef.top - target.getBoundingClientRect().height - 10;
elementLeft = (elementRef.left - (target.getBoundingClientRect().width / 2)) + (elementRef.width / 2);
target.style.top = elementTop + 'px';
target.style.left = elementLeft + 'px';
}
if (action === 'leave') {
target.classList.remove('active');
}
};
</script>