ACC SHELL

Path : /srv/www/vhosts/laboserv/wp-content/themes/laboserv2020/
File Upload :
Current File : //srv/www/vhosts/laboserv/wp-content/themes/laboserv2020/header.php

<?php
/** 
 * @package WordPress
 * @subpackage Laboserv2020
 * @since Laboserv2020 1.0
 */

?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
	<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
	<?php endif; ?>
	<title><?php wp_title( '|', true, 'right' ); ?></title>
	<link href="<?php echo get_template_directory_uri(); ?>/images/favicon.png" rel="icon" type="image/png" />
	<?php wp_head(); ?>
	<style>
	@font-face {
		font-family: "Raleway";
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Raleway-SemiBold.eot");
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Raleway-SemiBold.eot?#iefix") format("embedded-opentype"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Raleway-SemiBold.woff") format("woff"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Raleway-SemiBold.ttf") format("truetype");
		font-weight: 600;
		font-style: normal;
	}
	@font-face {
		font-family: "Raleway";
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Raleway-ExtraBold.eot");
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Raleway-ExtraBold.eot?#iefix") format("embedded-opentype"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Raleway-ExtraBold.woff") format("woff"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Raleway-ExtraBold.ttf") format("truetype");
		font-weight: 800;
		font-style: normal;
	}
	@font-face {
		font-family: "Roboto Condensed";
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/RobotoCondensed-Regular.eot");
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/RobotoCondensed-Regular.eot?#iefix") format("embedded-opentype"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/RobotoCondensed-Regular.woff") format("woff"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/RobotoCondensed-Regular.ttf") format("truetype");
		font-weight: 400;
		font-style: normal;
	}
	@font-face {
		font-family: "Roboto Condensed";
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/RobotoCondensed-Bold.eot");
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/RobotoCondensed-Bold.eot?#iefix") format("embedded-opentype"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/RobotoCondensed-Bold.woff") format("woff"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/RobotoCondensed-Bold.ttf") format("truetype");
		font-weight: 700;
		font-style: normal;
	}
	@font-face {
		font-family: "Roboto";
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Regular.eot");
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Regular.eot?#iefix") format("embedded-opentype"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Regular.woff") format("woff"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Regular.ttf") format("truetype");
		font-weight: 400;
		font-style: normal;
	}
	@font-face {
		font-family: "Roboto";
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Italic.eot");
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Italic.eot?#iefix") format("embedded-opentype"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Italic.woff") format("woff"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Italic.ttf") format("truetype");
		font-weight: 400;
		font-style: italic;
	}
	@font-face {
		font-family: "Roboto";
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Bold.eot");
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Bold.eot?#iefix") format("embedded-opentype"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Bold.woff") format("woff"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-Bold.ttf") format("truetype");
		font-weight: 700;
		font-style: normal;
	}
	@font-face {
		font-family: "Roboto";
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-BoldItalic.eot");
		src: url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-BoldItalic.eot?#iefix") format("embedded-opentype"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-BoldItalic.woff") format("woff"),
				 url("<?php echo esc_url( get_template_directory_uri() ); ?>/fonts/Roboto-BoldItalic.ttf") format("truetype");
		font-weight: 700;
		font-style: italic;
	}
	</style>
</head>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page">
	<div class="big-arrow-up"></div>
	<?php 
		//$postID = get_the_ID();
		//echo $postID;
	?>
	
	<div class="grey-panel-area">
	<div class="newsletter-panel">
		<div class="close">&Cross;</div>
		<h1>Přihlášení k odběru novinek</h1>
		<?php 
		if ( is_active_sidebar( 'newsletter-panel' ) )
		{
			dynamic_sidebar( 'newsletter-panel' );
		}	
		?>
	</div><!-- .newsletter-panel END -->
	</div><!-- .grey-panel-area END -->
	
	<div class="grey-panel-area">
	<div class="catalogue-panel">
		<div class="close">&Cross;</div>
		<h1>Katalogy produktů</h1>
		<?php 
			$args = array(
				'post_type'		=> 'page',
				'meta_key'   	=> 'main_page',
				'meta_value' 	=> true
				);	
		
		// Create the new query
		$loop = new WP_Query( $args );
		
		$loop->the_post();
		
		$mPageID = $loop->post->ID;
		
		$catalogues = array(
			array(
				'title' => get_field( 'catalogue1_title', $mPageID ),
				'picture' => get_field( 'catalogue1_picture', $mPageID ),
				'link' => get_field( 'catalogue1_link', $mPageID ),
				'size' => get_field( 'catalogue1_size', $mPageID )
				),
			array(
				'title' => get_field( 'catalogue2_title', $mPageID ),
				'picture' => get_field( 'catalogue2_picture', $mPageID ),
				'link' => get_field( 'catalogue2_link', $mPageID ),
				'size' => get_field( 'catalogue2_size', $mPageID )
				),
			array(
				'title' => get_field( 'catalogue3_title', $mPageID ),
				'picture' => get_field( 'catalogue3_picture', $mPageID ),
				'link' => get_field( 'catalogue3_link', $mPageID ),
				'size' => get_field( 'catalogue3_size', $mPageID )
				)			
		);
		
		foreach( $catalogues as $catalogue )
		{
			
				if ( empty( $catalogue[ 'picture' ] ) )
				{
					$picture = get_template_directory_uri().'/images/catalogue-empty.png';	
				}
				else
				{
					$picture = $catalogue[ 'picture' ][ 'sizes' ][ 'catalogue' ];
				}
				//print_r($catalogue[ 'picture' ]);
				echo '<div class="catalogue"><a href="'.$catalogue[ 'link' ].'" title="Stáhnout katalog '.$catalogue[ 'title' ].'"><img src="'.$picture.'" alt="'.$catalogue[ 'title' ].'" /></a><a href="'.$catalogue[ 'link' ].'" class="button"><span class="title">'.$catalogue[ 'title' ].'</span><span class="size">'.number_format( $catalogue[ 'size' ], 0, 0, ' ' ).' kB</span></a></div>';
				
		}			
		?>
	</div><!-- .newsletter-panel END -->
	</div><!-- .grey-panel-area END -->
	

	<header class="supheader">
		<div class="content">
		<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="Zpět na hlavní stránku">
			<img src="<?php echo get_template_directory_uri(); ?>/images/laboserv-logo.png" class="logo" alt="Laboserv logo" />	
		</a>
		
		<?php
		if ( has_nav_menu( 'supheader-menu' ) )
		{
			wp_nav_menu( array( 'theme_location' => 'supheader-menu' ) );
		} ?>
		<div class="show-hide-menu">Menu</div>
		<a href="http://www.lshop.cz" class="shop" target="_blank">E-shop</a>
		</div><!-- .content END -->
	</header><!-- .supheader END -->
	<section class="month_offer<?php 
	if ( ! is_home() ) 
	{
		echo ' minimal full-minimal';
	} ?>">
		<div class="content">
			<nav class="prev"><span title="novinka předchozího měsíce"></span></nav>
			<span class="articles-list">
			<span class="scroll-articles">			
			<?php 
				$args = array( 
					'post_type' 	 => 'post', 
					'posts_per_page' => 0, 
					'cat' => 12,
					'order_by' => 'post_date',
					'order' => 'ASC'
				);
	
				// Create the new query
				$loop = new WP_Query( $args );
	
				// Get Offers number
				$offers_count = $loop->post_count;
	
				// If results
				if ( $offers_count > 0 )
				{		
					while ( $loop->have_posts() ) 
					{
						$loop->the_post();
						//global $post;
						$offerID = $loop->post->ID;
						echo '<article class="offer" data-offer-id="'.$offerID.'"><span class="offer-content">';
						
						if ( has_post_thumbnail( $offerID ) )
						{
							echo '<a href="'.get_the_permalink( $offerID ).'">';
							echo get_the_post_thumbnail( $offerID, 'offerthmb');
							echo '</a>';
						}
						
						echo '<h1><a href="'.get_the_permalink( $offerID ).'" title="'.get_the_excerpt( $offerID ).'">'.get_the_title( $offerID ).'</a></h1>';
						
						$subtitle = get_field( 'subtitle', $offerID );
						if ( ! empty( $subtitle ) )
						{
							echo '<h2>'.$subtitle.'</h2>';	
						}
																				
						echo '<p class="excerpt">'.get_the_excerpt( $offerID ).'</p>';
						
						echo '<a href="'.get_the_permalink( $offerID ).'" class="more_info">více informací o nabídce</a>';
		
						echo '</span></article><!-- .offer END -->';						
					}				
				}
				wp_reset_postdata();
			?>
			</span><!-- .scroll-articles END -->
			</span><!-- .articles-list END -->
			<nav class="next"><span title="novinka následujícího měsíce"></span></nav>
			<div class="show-hide-button"></div>
		</div><!-- .content END -->
		<span class="shadow"></span>		
	</section><!-- .month_offer END -->
	
	<?php if ( is_home() ) : ?>
	<header class="main_header">
		<div class="content">
		<h1>laboratorní přístroje, dodávky a&nbsp;servis<br/>
		spotřební materiály pro vaši laboratoř<br/>
		diagnostické soupravy</h1>
		
		<div class="newsletter-button">
			přihlásit se k odběru novinek
		</div>
		
		</div><!-- .content END -->
	</header>
	
	<?php endif; ?>

ACC SHELL 2018