}
target = $(this).attr('id').split("-")[1];
parent_target = $(this).parents('.parent-container').attr('id').split("-")[1];
- $('#nav-'+parent_target+' .page-nav-container li').removeClass("active");
- $(this).parents('.page-nav-container li').toggleClass("active");
+ if ( !$(this).parents('.page-nav-container li').hasClass("active") ) {
+ $('#nav-'+parent_target+' .page-nav-container li').removeClass("active");
+ $(this).parents('.page-nav-container li').toggleClass("active");
+ //alert("test");
+ // alert(parent_target);
+ $('#content-'+parent_target+' .page-content-container article:not(#page-'+target+')').addClass('inactive').removeClass('active');
+ $('#content-'+parent_target+' .page-content-container #page-'+target).toggleClass('inactive').toggleClass('active');
- //alert("test");
-// alert(parent_target);
- $('#content-'+parent_target+' .page-content-container article:not(#page-'+target+')').addClass('inactive').removeClass('active');
- $('#content-'+parent_target+' .page-content-container #page-'+target).toggleClass('inactive').toggleClass('active');
+ }
});
// If navigation menu is present on page, setNavProps and adjustScrollClass.
// if ( $navigation.length ) {
function setActiveNavItem() {
console.log("here");
$(".nav-parent").each(function() {
- if(myTopPosition > $(this).offset().top && ( $(this).offset().top + $(this).next().outerHeight() > myTopPosition-90) ) {
-
- $('.top-nav-right-list a[href="#' + $(this).attr("id") +'"]').addClass("active");
- } else {
- //console.log("no");
- $('.top-nav-right-list a[href="#' + $(this).attr("id") +'"]').removeClass("active");
+ if ( $('.top-nav-right-list a[href="#' + $(this).attr("id") +'"]').not(".active") ) {
+ if(myTopPosition > $(this).offset().top && ( $(this).offset().top + $(this).next().outerHeight() > myTopPosition-90) ) {
+
+ $('.top-nav-right-list a[href="#' + $(this).attr("id") +'"]').addClass("active");
+ } else {
+ //console.log("no");
+ $('.top-nav-right-list a[href="#' + $(this).attr("id") +'"]').removeClass("active");
+ }
}
});
}
$parent_args = array(
'posts_per_page' => 0,
'offset' => 0,
- 'orderby' => 'order',
+ 'orderby' => 'menu_order',
'order' => 'ASC',
'post_type' => 'page',
'post_parent' => '0',
$child_args = array(
'posts_per_page' => 0,
'offset' => 0,
- 'orderby' => 'order',
+ 'orderby' => 'menu_order',
'order' => 'ASC',
'post_type' => 'page',
'post_parent' => $a_parent->ID,
return esc_url_raw( $fonts_url );
}
+/**
+ * Function for getting the header.
+ */
+function glm_get_header() {
+ if (has_post_thumbnail()) {
+ $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+
+ echo ' <img src="' . $image_data[0] .'">';
+
+ } else {
+ echo ' <img src="' . get_template_directory_uri() . '/assets/images/cropped-header.jpg">';
+ }
+}
+
/**
* Add preconnect for Google Fonts.
*
</div>
<div id="page" class="site">
- <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>
-
+ <div class="feature-img">
+ <?php echo glm_get_header(); ?>
+ </div>
<header id="masthead" class="site-header" role="banner">
- <?php get_template_part( 'template-parts/header/header', 'image' ); ?>
+ <?php // get_template_part( 'template-parts/header/header', 'image' ); ?>
<?php // if ( has_nav_menu( 'top' ) ) : ?>
<!--
<?php // endif; ?>
</header><!-- #masthead -->
-
- <?php
- // If a regular post or page, and not the front page, show the featured image.
- if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) :
- echo '<div class="single-featured-image-header">';
- the_post_thumbnail( 'twentyseventeen-featured-image' );
- echo '</div><!-- .single-featured-image-header -->';
- endif;
- ?>
-
<div class="site-content-contain">
<div id="content" class="site-content">
<?php
if ( have_posts() ) :
-
-
$locations = get_nav_menu_locations();
$menuSlug = "top";
$menu = wp_get_nav_menu_object( $locations[ $menuSlug ] );
}
@media screen and (max-width: 1280px) {
-
.home .site-navigation-fixed.navigation-top {
bottom: auto;
position: relative;
.nf-form-cont {
margin: 0 auto;
max-width: 600px;
+}
+.feature-img {
+ max-height: 500px;
+ overflow: hidden;
+}
+.feature-img img {
+ margin-top: 79px;
+ width: 100%;
+}
+@media (max-width: 1280px) {
+ .feature-img img {
+ margin-top: 128px;
+ }
}
\ No newline at end of file
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> >
- <?php if ( has_post_thumbnail() ) :
- $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
-
- $post_thumbnail_id = get_post_thumbnail_id( $post->ID );
-
- $thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
-
- // Calculate aspect ratio: h / w * 100%.
- $ratio = $thumbnail_attributes[2] / $thumbnail_attributes[1] * 100;
- ?>
-
- <div class="panel-image" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>);">
- <div class="panel-image-prop" style="padding-top: <?php echo esc_attr( $ratio ); ?>%"></div>
- </div><!-- .panel-image -->
-
- <?php endif; ?>
-
<div id="frontpage-content" class="panel-content">
<div class="wrap">