Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Interior Page Header Slider, Loading gif home
- Adding the ability to use metaslider as a page header
- Creating a loading gif for the home page slider so that it doesn’t
jump when the page loads
- Enhancing default template so that it’s now similar in functionality
to the full width page
  • Loading branch information
briandunnigan authored and briandunnigan committed Jul 20, 2015
1 parent 79c18f7 commit 19423cd
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 55 deletions.
Binary file added img/loading-gif.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions js/custom.js
Expand Up @@ -542,4 +542,18 @@ a.version:{419:"2.0.4",417:"2.0.3",416:"2.0.2",412:"2.0",312:"1.3",125:"1.2",85:
format:function(c){var a="",b;for(b in c)if(b&&c.hasOwnProperty(b)){var g=b,e=c[b],g=g.split(".").join("-"),f=" ua-"+g;if("string"===typeof e){for(var e=e.split(" ").join("_").split(".").join("-"),d=e.indexOf("-");0<d;)f+=" ua-"+g+"-"+e.substring(0,d),d=e.indexOf("-",d+1);f+=" ua-"+g+"-"+e}a+=f}return a},encode:function(c){var a="",b;for(b in c)b&&c.hasOwnProperty(b)&&(a&&(a+="&"),a+=encodeURIComponent(b)+"="+encodeURIComponent(c[b]));return a}};d.userAgent=d.ua=d.parse(l);var k=d.format(d.ua)+" js";
i.className=i.className?i.className.replace(/\bno-js\b/g,"")+k:k.substr(1);return d}(document.documentElement,navigator.userAgent);

});

jQuery(document).ready(function($){

$('div.home-loading').addClass('slide-unready');
$(window).load(function() {
$('div.home-loading').removeClass('slide-unready').addClass('slide-ready');
});

$('div#home1').addClass('slide-waiting');
$(window).load(function() {
$('div#home1').removeClass('slide-waiting').addClass('slide-go');
});

});
21 changes: 6 additions & 15 deletions page-full-width.php
Expand Up @@ -13,31 +13,22 @@ get_header(); ?>

<div class="interior-hero">
<?php the_post_thumbnail(); ?>
</div>

<?php echo do_shortcode("[metaslider id=".get_post_meta($post->ID, "metaslider-id", true)."]"); ?>
</div>



<div class="span12 follow-hero">
<div class="span12 follow-hero">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post content clearfix" id="post-<?php the_ID(); ?>">



<div class="entry">
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>

</div>
</div>
<?php endwhile; endif; ?>
</div>




</div>

</div>
</div>



<?php get_footer(); ?>
1 change: 1 addition & 0 deletions page-home.php
Expand Up @@ -12,6 +12,7 @@ if($homepageLayout == '1-3') {
?>
<div id="home">
<div class="row" id="row1">
<div class="span12 home-loading" role="complementary"></div>
<div id="home1" class="span12" role="complementary">

<?php if ( is_active_sidebar( 'home1' ) ) { ?>
Expand Down
61 changes: 28 additions & 33 deletions page.php
@@ -1,36 +1,31 @@
<?php
/**
* The template for displaying all pages.
*/
get_header(); ?>
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
get_header(); ?>

<div class="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<?php endif; ?>
<div class="holdit">
<section class="container single-page content">
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title">
<?php the_title(); ?>
</h1>
</header>
<!-- .entry-header -->

<div class="entry-content">
<?php the_content(); ?>
<div id="home-interior">
<div class="row" id="row1">

<div class="page-title clear">
<h1><?php the_title(); ?></h1>
</div>

<div class="interior-hero">
<?php the_post_thumbnail(); ?>

<?php echo do_shortcode("[metaslider id=".get_post_meta($post->ID, "metaslider-id", true)."]"); ?>
</div>
<!-- .entry-content -->

</article>
<!-- #post -->

<?php endwhile; ?>
</section>
</div>
<!-- #container -->
<?php get_footer(); ?>

<div class="span12 follow-hero">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post content clearfix" id="post-<?php the_ID(); ?>">

<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>

</div>
</div>
<?php endwhile; endif; ?>
</div>

</div>
</div>
<?php get_footer(); ?>
47 changes: 40 additions & 7 deletions style.css
Expand Up @@ -658,6 +658,39 @@ padding-left:10px;
}



.home-loading.slide-ready {
visibility:hidden;
display:none;
}
.home-loading.slide-unready {
height:463px;
}

@media (max-width:1200px){
.home-loading.slide-unready {
height:371px;
}
}

@media (max-width:991px){
.home-loading.slide-unready {
height:286px;
}
}
.home-loading.slide-unready {
background-image:url('img/loading-gif.gif');
background-color:white !important;
background-repeat:no-repeat;
background-position: center center;
}

#home1.slide-waiting {
visibility:hidden;
display:none;
height:0;
}



/* =============================== Footer =============================== */
Expand Down Expand Up @@ -1026,22 +1059,22 @@ a:hover.yellow-link {
}
}

.interior-hero img {
.interior-hero img, .interior-hero .metaslider {
margin-top:-10px;
z-index:1;
position:relative;
margin-bottom: -50px;
}

.ie8 .interior-hero img {
.ie8 .interior-hero img, .ie8 .interior-hero .metaslider {
margin-left:-10px;
margin-top:-10px;
width:940px;
padding-right:20px;
max-width:none;
}

.ie7 .interior-hero img {
.ie7 .interior-hero img, .ie7 .interior-hero .metaslider {
margin-left:-10px;
margin-top:-10px;
width:940px;
Expand All @@ -1060,7 +1093,7 @@ margin-top:-10px;
margin-bottom:-50px

}
.interior-hero img {
.interior-hero img, .interior-hero .metaslider {
margin-top:-10px;
z-index:1;
position:relative;
Expand All @@ -1081,11 +1114,11 @@ margin-top:-10px;
margin-left:0px;
width:100%;
}
.interior-hero img {
.interior-hero img, .interior-hero .metaslider {
margin-bottom:-30px;
}
}
}}


/* =============================== BOOTSTRAP OVERRIDES =============================== */

#home-interior .span12 {
Expand Down

0 comments on commit 19423cd

Please sign in to comment.