Skip to content

Commit 6227f16

Browse files
committed
Restructured featured speakers code
1 parent 2dba335 commit 6227f16

File tree

2 files changed

+27
-50
lines changed

2 files changed

+27
-50
lines changed

Diff for: css/style.css

+22-40
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,13 @@ nav a.flagNav{
596596

597597
.featuredSpeakers ul li{
598598
position: relative;
599+
margin-left: 0;
600+
margin-right: 4.4%;
601+
margin-bottom: 20px;
602+
}
603+
604+
.featuredSpeakers ul li:nth-child(3n){
605+
margin-right: 0;
599606
}
600607

601608
a.speakerLink{
@@ -1139,22 +1146,10 @@ body.speakers a.speakerLink{
11391146
margin: 0;
11401147
}
11411148

1142-
.featuredSpeakers ul li + li + li{
1143-
display: none;
1144-
}
1145-
1146-
.recentNews article + article + article{
1147-
display: none;
1148-
}
1149-
11501149
.videoPicks a{
11511150
text-align: center;
11521151
}
11531152

1154-
.videoPicks a + a{
1155-
display: none;
1156-
}
1157-
11581153
ul.row{
11591154
display: inline;
11601155
}
@@ -1373,45 +1368,32 @@ body.speakers a.speakerLink{
13731368
width: 31px;
13741369
}
13751370

1376-
.featuredSpeakers{
1377-
text-align: center;
1378-
}
1379-
13801371
.videoPicks a.videoPick{
13811372
width: 100% !important;
13821373
margin: 0 auto;
13831374
}
13841375

1385-
.featuredSpeakers div.columns {
1386-
min-width: 100%;
1387-
max-width: 100%;
1388-
width: 100%;
1389-
margin: 0;
1390-
}
1391-
1392-
.featuredSpeakers ul li + li + li{
1393-
display: none;
1394-
}
1395-
1396-
.featuredSpeakers ul li + li{
1397-
margin-top: 20px;
1398-
}
1399-
1400-
a.speakerLink{
1401-
width: 300px;
1402-
margin: 0 auto;
1376+
.featuredSpeakers .four{
1377+
min-width: 47.8%;
1378+
max-width: 47.8%;
1379+
width: 47.8%;
1380+
float: left;
14031381
}
14041382

1405-
.recentNews article + article + article{
1406-
display: none;
1383+
.featuredSpeakers ul li:nth-child(3n){
1384+
margin-right: 4.4%;
14071385
}
14081386

1409-
.videoPicks a + a{
1410-
display: none;
1387+
.featuredSpeakers ul li:nth-child(2n+2){
1388+
margin-right: 0;
14111389
}
14121390

1413-
.speakers ul.row{
1414-
text-align: center;
1391+
.featuredSpeakers ul li a h3{
1392+
position: relative;
1393+
left: 0;
1394+
top: 0;
1395+
color: #fff;
1396+
line-height: 40px;
14151397
}
14161398

14171399
.video_wrapper{

Diff for: front-page.php

+5-10
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,27 @@
2323
'post_type' => 'speakers',
2424
'taxonomy' => 'tedxyycYear',
2525
'term' => '2012',
26-
'posts_per_page' => 9,
26+
'posts_per_page' => -1,
2727
'orderby' => 'title',
2828
'order' => 'ASC'
2929
);
3030
query_posts($args);
3131
?>
3232

3333
<?php /* Start loop */ ?>
34-
<?php $i = 0; ?>
34+
<ul class="row clearfix">
3535
<?php while (have_posts()) : the_post(); ?>
36-
<?php if ($i%3 == 0 && $i != 0) { echo '</ul>'; } ?>
37-
<?php if ($i%3 == 0) { echo '<ul class="row clearfix">'; } ?>
3836
<li class="four columns">
3937
<a href="<?php the_permalink(); ?>" class="speakerLink">
40-
<h3><?php the_title(); ?></h3>
4138
<?php the_post_thumbnail('wide_thumb', array(
4239
'alt' => ''.get_the_title().'',
4340
'title' => ''.get_the_title().''
4441
)); ?>
42+
<h3><?php the_title(); ?></h3>
4543
</a>
4644
</li>
47-
<?php
48-
$i++;
49-
endwhile; // End the loop
50-
echo '</ul>';
51-
?>
45+
<?php endwhile; // End the loop ?>
46+
</ul>
5247
<?php wp_reset_query(); ?>
5348

5449
<a href="/speakers" class="sectionCTA row">view all the <span class="tedx">TEDx</span><span class="yyc">YYC</span> speakers</a>

0 commit comments

Comments
 (0)