Skip to content

Commit

Permalink
refine event archive
Browse files Browse the repository at this point in the history
  • Loading branch information
alanchow01 committed Sep 26, 2016
1 parent 9e5dec7 commit e479ef8
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function events_post_type() {
'label' => 'Event',
'description' => 'Big Sisters Events',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', ),
'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt',),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
Expand Down
241 changes: 145 additions & 96 deletions wp-content/themes/bigsisters/archive-events.php
Original file line number Diff line number Diff line change
@@ -1,99 +1,148 @@
<?php
/**
* The template for displaying archive pages.
*
* @package Big_Sisters_Theme
/**
* The template for displaying archive pages.
*
* @package Big_Sisters_Theme
*/
get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<div class="events">
<section class="premier-events container">
<?php if ( have_posts() ) : ?>

<header class="page-header-style">
<h1>Premier Events</h1>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php query_posts( array( 'events_tax' => 'premier', 'showposts' => 3 ) ); ?>
<ul>
<?php while ( have_posts() ) : the_post(); ?>

<li>
<?php if (has_post_thumbnail() ) : ?>
<div class="event-thumbnail">
<div class="thumb-img-div">
<?php the_post_thumbnail('large'); ?>
</div>
</div> <!-- .event-thumbnail -->
<?php endif; ?>
<div class="event-content">
<h3> <?php the_title(); ?></h3>
<?php the_excerpt(); ?>
<a class="learn-more button-white" href="<?php the_permalink(); ?>">Learn More</a>
</div> <!-- .event-content -->
</li>
<?php endwhile; ?>
</ul>

<?php else : ?>

<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; ?>
</section> <!-- .premier-events -->

<section class="partner-events container">
<?php if ( have_posts() ) : ?>

<h2>Partner Events</h2>

<?php /* Start the Loop */ ?>
<?php query_posts( array( 'events_tax' => 'partner', 'showposts' => 2 ) ); ?>
<ul>
<?php while ( have_posts() ) : the_post(); ?>
<li>
<?php if (has_post_thumbnail() ) : ?>
<div class="event-thumbnail">
<div class="thumb-img-div">
<?php the_post_thumbnail('large'); ?>
</div>
</div> <!-- .event-thumbnail -->
<?php endif; ?>
<div class="event-content">
<h3> <?php the_title(); ?></h3>
<?php the_excerpt(); ?>
<a class="learn-more button-white" href="<?php the_permalink(); ?>">Learn More</a>
</div> <!-- .event-content -->
</li>

<?php endwhile; ?>
</ul>

<?php else : ?>

<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; ?>
</section> <!-- .partner-events -->

<section class="host-fundraiser-event">
<div class="container">
<h2>Want to host a fundraiser or event?</h2>
<a class="learn-more button-white"href="/bigsisters/host-a-fundraising-event/">Learn More</a>
</div>
</section>
<?php
$id = 608;
$post = get_post( $id );
?>
<?php get_template_part('template-pages/events-contact'); ?>
<hr>

</div> <!-- .events -->

</main><!-- #main -->
</div><!-- #primary -->
get_header(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<div class="events">
<section class="premier-events container">
<?php if ( have_posts() ) : ?>
<header class="page-header-style">
<h1>Signature Events</h1>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php query_posts( array( 'events_tax' => 'signature', 'showposts' => 3 ) ); ?>
<ul>
<?php while ( have_posts() ) : the_post(); ?>
<li>
<?php if (has_post_thumbnail() ) : ?>
<div class="event-thumbnail">
<div class="thumb-img-div">
<?php the_post_thumbnail('large'); ?>
</div>
</div> <!-- .event-thumbnail -->
<?php endif; ?>
<div class="event-content">
<h3> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
<a class="learn-more button-white" href="<?php the_permalink(); ?>">Learn More</a>
</div> <!-- .event-content -->
</li>
<?php endwhile; wp_reset_query(); ?>
</ul>
<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php endif; ?>
</section> <!-- .premier-events -->

<section class="premier-events container">
<header class="page-header-style">
<h1>Partnership Events</h1>
</header>
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php query_posts( array( 'events_tax' => 'partnership', 'showposts' => 3 ) ); ?>
<ul>
<?php while ( have_posts() ) : the_post(); ?>
<li>
<?php if (has_post_thumbnail() ) : ?>
<div class="event-thumbnail">
<div class="thumb-img-div">
<?php the_post_thumbnail('large'); ?>
</div>
</div> <!-- .event-thumbnail -->
<?php endif; ?>
<div class="event-content">
<h3> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
<a class="learn-more button-white" href="<?php the_permalink(); ?>">Learn More</a>
</div> <!-- .event-content -->
</li>
<?php endwhile; wp_reset_query(); ?>
</ul>
<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php endif; ?>
</section> <!-- .partner-events -->

<section class="premier-events container">
<header class="page-header-style">
<h1>Third Party Events</h1>
</header><!-- .page-header -->
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<ul>
<?php query_posts( array( 'events_tax' => 'third-party', 'showposts' => 3 ) ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<li>
<?php if (has_post_thumbnail() ) : ?>
<div class="event-thumbnail">
<div class="thumb-img-div">
<?php the_post_thumbnail('large'); ?>
</div>
</div> <!-- .event-thumbnail -->
<?php endif; ?>
<div class="event-content">
<h3> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
<a class="learn-more button-white" href="<?php the_permalink(); ?>">Learn More</a>
</div> <!-- .event-content -->
</li>
<?php endwhile; wp_reset_query(); ?>
</ul>
<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php endif; ?>
</section> <!-- .premier-events -->


<section class="premier-events container">
<header class="page-header-style">
<h1>Past Events</h1>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php if ( have_posts() ) : ?>
<ul>
<?php $i = 1; while (have_posts() && $i < 7) : the_post(); ?>
<li>
<?php if (has_post_thumbnail() ) : ?>
<div class="event-thumbnail">
<div class="thumb-img-div">
<?php the_post_thumbnail('large'); ?>
</div>
</div> <!-- .event-thumbnail -->
<?php endif; ?>
<div class="event-content">
<h3> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
<a class="learn-more button-white" href="<?php the_permalink(); ?>">Learn More</a>
</div> <!-- .event-content -->
</li>
<?php $i++; endwhile; wp_reset_query(); ?>
</ul>
<?php endif; ?>
</section> <!-- .partner-events -->

<section class="host-fundraiser-event">
<div class="container">
<h2>Want to host a fundraiser or event?</h2>
<a class="learn-more button-white"href="/bigsisters/host-a-fundraising-event/">Learn More</a>
</div>
</section>
<?php
$id = 608;
$post = get_post( $id );
?>
<?php get_template_part('template-pages/events-contact'); ?>
<hr>

</div> <!-- .events -->

</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer(); ?>
Binary file modified wp-content/themes/bigsisters/assets/images/bigsisters-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions wp-content/themes/bigsisters/build/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1193,12 +1193,7 @@ object {

.hero-carousel .hero-carousel-cell {
position: relative;
width: 100vw;
height: 14.5rem;
padding: 1rem 0; }
@media (min-width: 900px) {
.hero-carousel .hero-carousel-cell {
height: 70vh; } }
width: 100vw; }

.hero-carousel .flickity-page-dots {
position: absolute;
Expand Down Expand Up @@ -1729,13 +1724,18 @@ form {
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center; }
.sponsor-grid li img, .sponsor-grid ul li img {
width: 75%; }
@media (min-width: 900px) {
.sponsor-grid li, .sponsor-grid ul li {
padding: 0rem 1rem;
-webkit-flex: 0 1 20%;
-ms-flex: 0 1 20%;
flex: 0 1 20%; } }
.sponsor-grid li img, .sponsor-grid ul li img {
width: 75%; }
@media (min-width: 900px) {
.sponsor-grid li img, .sponsor-grid ul li img {
width: 100%;
max-width: 100%; } }
.sponsor-grid ul, .sponsor-grid ul ul {
list-style: none;
padding: 0;
Expand Down
2 changes: 1 addition & 1 deletion wp-content/themes/bigsisters/build/css/style.min.css

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions wp-content/themes/bigsisters/front-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
foreach ( $fields as $field ) : ?>
<li class="hero-carousel-cell page-hero">
<?php if ( $field['hero_image_link'] ) : ?>
<a href="<?php echo $field['hero_image_link']; ?>"><img src="<?php echo $field['hero_image']; ?>" alt="Big Sisters Feature Story" /></a>
<?php else: ?>
<img src="<?php echo $field['hero_image']; ?>" alt="Big Sisters Feature Story" />
<?php endif; ?>
<a href="<?php echo $field['hero_image_link']; ?>"><img src="<?php echo $field['hero_image']; ?>" alt="Big Sisters Feature Story" /></a>
<?php else: ?>
<img src="<?php echo $field['hero_image']; ?>" alt="Big Sisters Feature Story" />
<?php endif; ?>

<div class="container">
<div class="hero-quote">
<?php echo $field['hero_quote']; ?>
<div class="hero-quote">
<?php echo $field['hero_quote']; ?>
</div>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
Expand Down Expand Up @@ -99,27 +99,27 @@
</ul>
</section>
<section class="program-sponsors">
<h1>Special Thanks To Our Programming Sponsors</h1>
<ul>
<li class="sponsor-logo-wrap">
<a href="http://vancouver.ca/" target="_blank">
<img src="<?php echo $directory; ?>/assets/images/sponsors/cityofvancouver-logo.png"
alt="City of Vancouver Logo" />
</a>
</li>
<li class="sponsor-logo-wrap">
<a href="http://www.uwlm.ca/" target="_blank">
<img src="<?php echo $directory; ?>/assets/images/sponsors/unitedway-logo.png"
alt="United Way Vancouver Logo" />
</a>
</li>
<li class="sponsor-logo-wrap">
<a href="http://www2.gov.bc.ca/" target="_blank">
<img src="<?php echo $directory; ?>/assets/images/sponsors/britishcolumbia-logo.png"
alt="British Columbia Logo" />
</a>
</li>
</ul>
<?php
$upload_path = content_url() . '/uploads/';
$loop = CFS()->get('new_sponsor_section');
foreach($loop as $row) : ?>
<h1><?php echo $row['section_title']; ?></h1>
<ul>

<?php foreach($row['new_logos'] as $logos) : ?>
<?php $logo_image_ID = $logos['company_logo']; ?>
<?php $logo_image_ALT = get_post_meta($logo_image_ID, '_wp_attachment_image_alt', true); ?>
<?php $logo_image_URL_data = wp_get_attachment_metadata($logo_image_ID, true); ?>
<?php $logo_image_URL = $logo_image_URL_data['file']; ?>
<li class="sponsor-logo-wrap">
<a href="<?php echo $logos['company_website']; ?>" target="_blank" >
<img src="<?php echo $upload_path . $logo_image_URL; ?>" alt="<?php echo get_post_meta($logos['sponsor_logo'], '_wp_attachment_image_alt', true)?>" />
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>

</section>
</main><!-- #main -->
</div><!-- #primary -->
Expand Down
17 changes: 11 additions & 6 deletions wp-content/themes/bigsisters/sass/_page-templates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
.hero-carousel-cell {
position: relative;
width: 100vw;
height: 14.5rem;
padding: 1rem 0;
//height: 14.5rem;
//padding: 1rem 0;
@include desktop {
height: 70vh;
//height: 70vh;
}
}
.flickity-page-dots {
Expand Down Expand Up @@ -529,12 +529,17 @@ form {
display: flex;
justify-content: center;
align-items: center;
img {
width: 75%;
}
@include desktop {
padding: 0rem 1rem;
flex: 0 1 20%;
}
img {
width: 75%;
@include desktop {
width:100%;
max-width: 100%;
}
}
}
ul {
list-style: none;
Expand Down
Loading

0 comments on commit e479ef8

Please sign in to comment.