Skip to content

Commit

Permalink
added pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjorn Zschernack committed Nov 20, 2023
1 parent 44e5432 commit c45a656
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 27 deletions.
42 changes: 42 additions & 0 deletions header-pages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "site-content" div.
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 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="icon" type="image/x-icon" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon.png" type="images/png"/>
<?php wp_head(); ?>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/fontawesome/css/all.css">

<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/bootstrap-5.3.0-alpha3-dist/css/bootstrap.min.css">


<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/js/slick/slick.css">
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/js/slick/slick-theme.css"/>



<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/scss/styles.css">

</head>

<body>


<!-- Pagewrap -->


<?php get_template_part('template-parts/header/pageheader'); ?>


12 changes: 11 additions & 1 deletion includes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@ function getPartnerBanner($atts){
return $content;
}

add_shortcode( 'partnerbanner', 'getPartnerBanner' );
add_shortcode( 'partnerbanner', 'getPartnerBanner' );


function getPostTypeGrid($atts){
ob_start();
$content .= get_template_part('template-parts/shortcodes/grid','',$atts);
$content .= ob_get_clean();
return $content;
}

add_shortcode( 'grid', 'getPostTypeGrid' );
42 changes: 19 additions & 23 deletions page.php
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
<?php get_header(); ?>
<?php
$categories = get_the_terms( $post->ID, 'category' )
?>
<div class="container-fluid p-0 bg-light-blue sub-bg" id="main">

<article class="container-fluid">
<?php get_header('pages'); ?>
<div class="container p-0" id="main">

<div class="row">
<div class="col-12 text-center">
<h2 class="category-headline"><?php echo $post->post_title; ?></h2>
<hr class="yellow-line" />
<div class="col-12">
<?php the_content(); ?>
</div>
</div>


</div>
<div class="row">
<div class="col my-4">
<?php the_content(); ?>
<div class="col-12">
<?php the_content(); ?>
</div>
</div>
<div class="row">
<div class="col-12">

</div>
</div>
</div>


</article>
<div class="row">
<div class="row">
<div class="col-12">
<?php get_template_part('template-parts/posts/postgrid','',array('category' => 'aktuelles', 'title' => 'Aktuelles', 'bg' => '')) ?>
</div>
</div>
</div>
</div>




</div>

<?php get_footer(); ?>
38 changes: 38 additions & 0 deletions scss/includes/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ body {

h1, h2, h3 {
font-family: 'BarlowBold';

&.topline{
&:before {
content: " ";
width: 35px;
height: 5px;
margin: 7.8px 16.3px 30.2px 0;
background-color: #e8a422;
display: block;

}
}

&.white {
color: white;
}

&.fs36{
font-size: 36px;
}
}


Expand Down Expand Up @@ -37,6 +57,8 @@ body {
}
}



.mobile{
display: none;
@media (max-width: 1200px) {
Expand Down Expand Up @@ -79,6 +101,22 @@ body {
}
}
}


#headerbackground {
height: 500px;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
margin-top: -20px;

.headercontent {
width:100%;
height:500px;
background-image: linear-gradient(to left, rgba(0, 0, 0, 0) 68%, #000);
padding-top: 200px;
}
}
}

}
8 changes: 6 additions & 2 deletions scss/includes/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
display: flex;
list-style: none;
padding: 0;

margin-bottom: 20px;;

@media (max-width: 1200px) {
flex-direction: column;
Expand Down Expand Up @@ -68,7 +68,7 @@
}

}
&:hover {
&:hover, &.current-menu-item {

a{
&:before{
Expand Down Expand Up @@ -189,6 +189,10 @@
&:hover{
background-size: 100% 100%;
}

&.current-menu-item {
background-size: 100% 100%;
}


}
Expand Down
33 changes: 32 additions & 1 deletion scss/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ body {
body h1, body h2, body h3 {
font-family: "BarlowBold";
}
body h1.topline:before, body h2.topline:before, body h3.topline:before {
content: " ";
width: 35px;
height: 5px;
margin: 7.8px 16.3px 30.2px 0;
background-color: #e8a422;
display: block;
}
body h1.white, body h2.white, body h3.white {
color: white;
}
body h1.fs36, body h2.fs36, body h3.fs36 {
font-size: 36px;
}
body #page-wrap {
max-width: 1320px;
height: 100%;
Expand Down Expand Up @@ -85,6 +99,19 @@ body header .contact .clock:before {
vertical-align: text-bottom;
margin-right: 5px;
}
body header #headerbackground {
height: 500px;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
margin-top: -20px;
}
body header #headerbackground .headercontent {
width: 100%;
height: 500px;
background-image: linear-gradient(to left, rgba(0, 0, 0, 0) 68%, #000);
padding-top: 200px;
}

#menucontainer {
background-color: #03223e;
Expand All @@ -100,6 +127,7 @@ body header .contact .clock:before {
display: flex;
list-style: none;
padding: 0;
margin-bottom: 20px;
}
@media (max-width: 1200px) {
#menucontainer ul {
Expand Down Expand Up @@ -146,7 +174,7 @@ body header .contact .clock:before {
background-size: 25.8px 14.9px;
transition: all 0.3s ease-in-out;
}
#menucontainer ul li.car:hover a:before {
#menucontainer ul li.car:hover a:before, #menucontainer ul li.car.current-menu-item a:before {
background-image: url("../images/icons/fahrzeuge_icon_white.svg");
transition: all 0.3s ease-in-out;
}
Expand Down Expand Up @@ -204,6 +232,9 @@ body header .contact .clock:before {
#menucontainer ul li.orange:hover {
background-size: 100% 100%;
}
#menucontainer ul li.orange.current-menu-item {
background-size: 100% 100%;
}
#menucontainer ul li.green {
background-size: 100% 1px;
background-image: repeating-linear-gradient(#89b459, #89b459 22px, #89b459 22px, #89b459 44px);
Expand Down
62 changes: 62 additions & 0 deletions template-parts/header/pageheader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<header class="container-fluid w-100 p-0" id="header">

<div class="container py-4 px-4 px-xl-0" id="header-inner-container">
<div class="row">

<div class="col-9 col-xl-3">
<a href="/" class="d-none d-xl-block">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/FZ_Olpe_Logo.webp" alt="Autohaus Löhr, Fahrzeugzentrum Olpe" class="img-fluid" id="top-logo"/>
</a>
<a href="/" class="d-block d-xl-none">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/FZ_Olpe_Logo_mobile.svg" alt="Autohaus Löhr, Fahrzeugzentrum Olpe" class="img-fluid" id="top-logo"/>
</a>
</div>
<div class="col-3 offset-xl-3 col-xl-6">
<?php get_template_part('template-parts/header/contact','',array()) ?>
<?php get_template_part('template-parts/header/menubars','',array()) ?>
</div>
</div>
</div>

<div class="w-100" id="menucontainer">

<div class="container">


<?php
wp_nav_menu(array('menu' => 'mainmenu', 'menu_id'=>'mainmenu', 'container' => false, 'menu_class' => 'mleft'));
?>

</div>
</div>

<?php
$backgroundimage = wp_get_attachment_image_src( get_post_thumbnail_id(),'full')[0];
?>

<div class="w-100" id="headerbackground" style="background-image:url('<?php echo $backgroundimage; ?>')">
<div class="headercontent">

<div class="container py-4 px-4 px-xl-0" id="header-inner-content-container">
<div class="row">
<div class="col-12">
<h1 class="white fs36 topline"><?php the_title(); ?></h1>
<h2 class="white fs36"><?php echo get_post_meta($post->ID, 'subtitle', true); ?></h2>
</div>
</div>

<?php if(get_post_meta($post->ID, 'headerinhalt', true)): ?>


<div class="row">
<div class="col-12 bg-white">
<?php echo apply_filters('the_content', get_post_meta($post->ID, 'headerinhalt', true)); ?>
</div>
</div>

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

</header>
14 changes: 14 additions & 0 deletions template-parts/shortcodes/grid.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="container-fluid p-0">
<div class="row">
<?php

$grid = 4;

if(isset($args['grid'])) :
$grid = $args['grid'];
endif;


?>
</div>
</div>

0 comments on commit c45a656

Please sign in to comment.