Skip to content

Commit

Permalink
das-sagen-unsere-kunde
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjorn Zschernack committed Nov 26, 2023
1 parent 1369866 commit 8f2c896
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 0 deletions.
10 changes: 10 additions & 0 deletions images/star-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions includes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ function getPartnerBanner($atts){

add_shortcode( 'partnerbanner', 'getPartnerBanner' );

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

add_shortcode( 'kunden', 'getKunden' );



function getPostTypeGrid($atts){
ob_start();
Expand Down
37 changes: 37 additions & 0 deletions scss/includes/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ a{
padding: 25px;
grid-template-columns: repeat(3, 1fr );
padding-top: 40px;row-gap: 20px;
&.grid-four {
grid-template-columns: repeat(4, 1fr );
@media (max-width: 1100px) {
grid-template-columns: repeat(2, 1fr );
}
@media (max-width: 768px) {
grid-template-columns: repeat(1, 1fr );
}

}
@media (max-width: 1100px) {
grid-template-columns: repeat(2, 1fr );
}
Expand All @@ -35,6 +45,7 @@ a{
&:nth-child(3n) {
margin-right: 0;
}

@media (max-width: 1100px) {

margin-right: 0;
Expand Down Expand Up @@ -104,6 +115,19 @@ a{
}
}
}

&.grid-four {
.single-post{

&:nth-child(3n) {
margin-right: 20px;
}
&:nth-child(4n) {
margin-right: 0px;
}
}

}
}

#about-banner{
Expand Down Expand Up @@ -197,5 +221,18 @@ h2 {
margin: auto;
}
}

&.kunde{
font-size: 16px;
font-family: 'BarlowBold';
text-align: left;

}
}



.fs16 * {
font-size: 16px;
}

4 changes: 4 additions & 0 deletions scss/includes/_shortcodes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
height: 41px;
width: auto;;
}
}

.staricon {
margin-right: 5px;
}
32 changes: 32 additions & 0 deletions scss/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,19 @@ a:hover {
padding-top: 40px;
row-gap: 20px;
}
.posts-grid.grid-four {
grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
.posts-grid.grid-four {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) {
.posts-grid.grid-four {
grid-template-columns: repeat(1, 1fr);
}
}
@media (max-width: 1100px) {
.posts-grid {
grid-template-columns: repeat(2, 1fr);
Expand Down Expand Up @@ -451,6 +464,12 @@ a:hover {
transition: all 0.3s ease-in-out;
background-size: 105%;
}
.posts-grid.grid-four .single-post:nth-child(3n) {
margin-right: 20px;
}
.posts-grid.grid-four .single-post:nth-child(4n) {
margin-right: 0px;
}

#about-banner {
min-height: 100px;
Expand Down Expand Up @@ -539,6 +558,15 @@ h2.content-h2:after {
display: block;
margin: auto;
}
h2.kunde {
font-size: 16px;
font-family: "BarlowBold";
text-align: left;
}

.fs16 * {
font-size: 16px;
}

#servicebar {
box-shadow: 0 33px 36px 0 rgba(93, 108, 123, 0.08);
Expand All @@ -550,6 +578,10 @@ h2.content-h2:after {
width: auto;
}

.staricon {
margin-right: 5px;
}

/* external stuff*/
.mobile-de-plugin {
width: 100% !important;
Expand Down
1 change: 1 addition & 0 deletions template-parts/shortcodes/grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<?php endif; ?>

<?php

$subpages = get_pages(
array(
'parent' => $post->ID,
Expand Down
16 changes: 16 additions & 0 deletions template-parts/shortcodes/kunde.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

<?php if (isset($args)): ?>
<div class="single-post bg-white p-3 p-lg-5">
<h2 class="kunde"><?php echo $args->post_title; ?></h2>
<div class="w-100 d-flex justify-content-start">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/star-solid.svg" class="staricon">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/star-solid.svg" class="staricon">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/star-solid.svg" class="staricon">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/star-solid.svg" class="staricon">
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/star-solid.svg" class="staricon">
</div>
<div class="mb-1 mt-5 kunde fs16">
<?php echo apply_filters('the_content', $args->post_content); ?>
</div>
</div>
<?php endif; ?>
8 changes: 8 additions & 0 deletions template-parts/shortcodes/kunden.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

<div class="posts-grid grid-four p-0 w-100">

<?php $kunden = get_posts(array('post_type'=>'kunde','post_status' => 'publish', 'posts_per_page' => 4)); ?>
<?php foreach($kunden as $kunde): ?>
<?php get_template_part('template-parts/shortcodes/kunde','',$kunde); ?>
<?php endforeach; ?>
</div>

0 comments on commit 8f2c896

Please sign in to comment.