%PDF- %PDF-
Direktori : /var/www/sms.eco-n-tech.co.uk/wp-content/themes/hittasmslanwebvatra/ |
Current File : /var/www/sms.eco-n-tech.co.uk/wp-content/themes/hittasmslanwebvatra/single-langivare.php |
<?php get_header(); ?> <?php the_post(); ?> <?php if ( have_rows( 'page_under_construction' ) ) { while ( have_rows( 'page_under_construction' ) ) { the_row(); if ( get_sub_field( 'enable' ) == 1 ) { $under_construction = 1; } else { $under_construction = 0; } $construction_text = get_sub_field( 'text' ); } } if ($under_construction == 0) { if ( have_rows( 'general_info' ) ) { while ( have_rows( 'general_info' ) ) { the_row(); $general_link = get_sub_field( 'source_link' ); } } if ( have_rows( 'hero_section' ) ) { while ( have_rows( 'hero_section' ) ) { the_row(); ?> <section id="hero" class="hero-comparison"> <?php $background = get_sub_field( 'background' ); if(!$background){ $background = get_field( 'background_image', 'option' ); } if ( $background ) { ?> <div class="bg-img"> <img src="<?php echo $background['url']; ?>" srcset="<?php echo $background['url']; ?> 575w, <?php echo $background['url']; ?>" alt="<?php if($background['alt']){ echo $background['alt'];}else{ echo "Hittasmslan Background Image"; } ?>" /> </div> <?php } ?> <div class="container"> <div class="align-items-center row"> <div class="left col-lg-6"> <h1 class="title h2 text-shadow"> <span class="strikethrough-border"><?php the_title(); ?></span> </h1> <div class="text text-big text-shadow-small"> <?php if(get_sub_field( 'hero_description' )){ the_sub_field( 'hero_description' ); } if ( have_rows( 'list' ) ) { ?> <hr> <ul class="text-shadow-small"> <?php while ( have_rows( 'list' ) ) { the_row(); if ( have_rows( 'item' ) ) { while ( have_rows( 'item' ) ) { the_row(); $icon = get_sub_field( 'icon' ); $fa_icon = ''; if($icon == 'dollar'){ $fa_icon = '<i class="fas fa-dollar-sign"></i>'; }elseif ($icon == 'like') { $fa_icon = '<i class="far fa-thumbs-up"></i>'; }elseif ($icon == 'eye') { $fa_icon = '<i class="far fa-eye-slash"></i>'; }elseif ($icon == 'shipping') { $fa_icon = '<i class="fas fa-shipping-fast"></i>'; }elseif ($icon == 'earth') { $fa_icon = '<i class="fas fa-globe"></i>'; } if(get_sub_field( 'text' )){ ?> <li><?php echo $fa_icon; ?></i><?php the_sub_field( 'text' ); ?></li> <?php } } } } ?> </ul> <?php } ?> </div> </div> <div class="right col-lg-6"> <?php if ( have_rows( 'hero_box' ) ) { while ( have_rows( 'hero_box' ) ) { the_row(); ?> <div class="langivare-hero-box box-shadow"> <div class="langivare-bg <?php echo strtolower(get_the_title()); ?> img contain-img"> <?php if( get_sub_field( 'image' ) ){ $image = get_sub_field( 'image' ); } if ( $image ) { ?> <img src="<?php echo $image['url']; ?>" alt="<?php if($image['alt']){echo $image['alt'];}else{ echo get_the_title();} ?>" data-src="<?php echo $image['url']; ?>" data-srcset="<?php echo $image['url']; ?>" srcset="<?php echo $image['url']; ?>" /> <?php } ?> </div> <div class="mid"> <strong><?php the_title(); ?></strong> <?php if(get_sub_field( 'rating' )){ $stars_count = get_sub_field( 'rating' ) * 2; $i = 1; ?> <div class="rating-stars-container"> <div class="rating-stars " data-stars="<?php echo $stars_count; ?>"> <?php if(!$stars_count % 2){ $image = 'star_filled_l.png'; }else{ $image = 'star_filled_r.png'; } while($i <= 10){ if ($i <= $stars_count){ if($i % 2 !== 0){ $image = 'star_filled_l.png'; }else{ $image = 'star_filled_r.png'; } }else{ if($i % 2 !== 0){ $image = 'star_unfilled_l.png'; }else{ $image = 'star_unfilled_r.png'; } } ?> <img src="<?php echo get_template_directory_uri(); ?>/dist/img/<?php echo $image; ?>" alt="star filled" class="filled" data-starid="<?php echo $i; ?>"> <?php $i++; } ?> </div> <p class="rating-number">(<?php the_sub_field( 'rating' ); ?>)</p> </div> <?php } ?> </div> <?php if ( have_rows( 'card_button' ) ) { while ( have_rows( 'card_button' ) ) { the_row(); if ( have_rows( 'button' ) ) { while ( have_rows( 'button' ) ) { the_row(); if ( get_sub_field( 'button_color' ) == 1 ) { $alt_color = ''; } else { $alt_color = ' alt-color'; } $btn_icon = get_sub_field( 'button_icon' ); if( $btn_icon == 'money' ){ $icon = '<i class="fas fa-money-check-alt"></i>'; }elseif( $btn_icon == 'dollar' ){ $icon = '<i class="fas fa-dollar-sign"></i>'; }elseif( $btn_icon == 'star' ){ $icon = '<i class="fas fa-star"></i>'; } if(get_sub_field( 'url' )){ $url = get_sub_field( 'url' ); }else{ $url = $general_link; } if( get_sub_field( 'title' ) && $url){ if ( get_sub_field( 'open_in_new_window' ) == 1 ) { $target = 'target="_blank"'; }else{ $target = ''; } ?> <div class="btn-pill-subcontainer square<?php echo $alt_color; ?>"> <a class="btn-pill" <?php echo $target; ?> href="<?php echo $url; ?>" rel="nofollow"> <span><?php echo $icon; ?><?php the_sub_field( 'title' ); ?></span> </a> </div> <?php } } } } } ?> </div> <?php } } ?> </div> </div> </div> </section> <?php } } if ( have_rows( 'short_info_section' ) ) { while ( have_rows( 'short_info_section' ) ) { the_row(); ?> <section id="short-info"> <div class="container box-shadow"> <div class="row"> <div class="stats-container col-lg-6"> <?php if ( have_rows( 'stats' ) ) { while ( have_rows( 'stats' ) ) { the_row(); ?> <table class="stats zebra-stripe"> <tbody> <?php if(get_sub_field( 'belopp' )){ ?> <tr> <td><?php _e('Belopp:', 'hittasmslan'); ?></td> <td><strong><?php the_sub_field( 'belopp' ); ?></strong></td> </tr> <?php } if(get_sub_field( 'ranta' )){ ?> <tr> <td><?php _e('Ränta:', 'hittasmslan'); ?></td> <td><strong><?php the_sub_field( 'ranta' ); ?></strong></td> </tr> <?php } if(get_sub_field( 'effektiv_ranta' )){ ?> <tr> <td><?php _e('Effektiv ränta:', 'hittasmslan'); ?></td> <td><strong><?php the_sub_field( 'effektiv_ranta' ); ?></strong></td> </tr> <?php } if(get_sub_field( 'loptid' )){ ?> <tr> <td><?php _e('Löptid:', 'hittasmslan'); ?></td> <td><strong><?php the_sub_field( 'loptid' ); ?></strong></td> </tr> <?php } if(get_sub_field( 'alderskrav' )){ ?> <tr> <td><?php _e('Ålderskrav:', 'hittasmslan'); ?></td> <td><strong><?php the_sub_field( 'alderskrav' ); ?></strong></td> </tr> <?php } ?> <?php if ( have_rows( 'utan_uc' ) ) { while ( have_rows( 'utan_uc' ) ) { the_row(); ?> <tr> <td><?php _e('Utan UC:', 'hittasmslan'); ?></td> <?php if ( get_sub_field( 'icon' ) == 1 ) { $icon = '<i class="fas fa-check-circle text-success"></i>'; } else if ( get_sub_field( 'icon' ) == 0 ) { $icon = '<i class="fas fa-times-circle text-danger"></i>'; } ?> <td> <strong><?php echo $icon; ?><?php the_sub_field( 'text' ); ?></strong> </td> </tr> <?php } } if ( have_rows( 'ansok_med_bankid' ) ) { while ( have_rows( 'ansok_med_bankid' ) ) { the_row(); ?> <tr> <td><?php _e('Ansök med BankID:', 'hittasmslan'); ?></td> <?php if ( get_sub_field( 'icon' ) == 1 ) { $icon = '<i class="fas fa-check-circle text-success"></i>'; } else if ( get_sub_field( 'icon' ) == 0 ) { $icon = '<i class="fas fa-times-circle text-danger"></i>'; } ?> <td> <strong><?php echo $icon; ?><?php the_sub_field( 'text' ); ?></strong> </td> </tr> <?php } } if ( have_rows( 'betalningsanmarkningar' ) ) { while ( have_rows( 'betalningsanmarkningar' ) ) { the_row(); ?> <tr> <td><?php _e('Betalningsanmärkningar:', 'hittasmslan'); ?></td> <?php if ( get_sub_field( 'icon' ) == 1 ) { $icon = '<i class="fas fa-check-circle text-success"></i>'; } else if ( get_sub_field( 'icon' ) == 0 ) { $icon = '<i class="fas fa-times-circle text-danger"></i>'; } ?> <td> <strong><?php echo $icon; ?><?php the_sub_field( 'text' ); ?></strong> </td> </tr> <?php } } if ( have_rows( 'laneskydd_kan_tecknas' ) ) { while ( have_rows( 'laneskydd_kan_tecknas' ) ) { the_row(); ?> <tr> <td><?php _e('Låneskydd kan tecknas:', 'hittasmslan'); ?></td> <?php if ( get_sub_field( 'icon' ) == 1 ) { $icon = '<i class="fas fa-check-circle text-success"></i>'; } else if ( get_sub_field( 'icon' ) == 0 ) { $icon = '<i class="fas fa-times-circle text-danger"></i>'; } ?> <td> <strong><?php echo $icon; ?><?php the_sub_field( 'text' ); ?></strong> </td> </tr> <?php } } if ( have_rows( 'direktutbetalning' ) ) { while ( have_rows( 'direktutbetalning' ) ) { the_row(); ?> <tr> <td><?php _e('Direktutbetalning:', 'hittasmslan'); ?></td> <?php if ( get_sub_field( 'icon' ) == 1 ) { $icon = '<i class="fas fa-check-circle text-success"></i>'; } else if ( get_sub_field( 'icon' ) == 0 ) { $icon = '<i class="fas fa-times-circle text-danger"></i>'; } ?> <td> <strong><?php echo $icon; ?><?php the_sub_field( 'text' ); ?></strong> <?php if( !empty(get_sub_field( 'description' ))) { ?> <br><i style="font-size: 0.8rem"><?php echo get_sub_field( 'description' ); ?></i> <?php } ?> </td> </tr> <?php } } ?> </tbody> </table> <?php } } if ( have_rows( 'contacts' ) ) { while ( have_rows( 'contacts' ) ) { the_row(); if ( have_rows( 'support' ) ) { while ( have_rows( 'support' ) ) { the_row(); ?> <hr> <div class="text"> <?php if(get_sub_field( 'title' )){ ?> <p class="title h4"><?php the_sub_field( 'title' ); ?></p> <?php } ?> <p> <?php if(get_sub_field( 'phone' )){ ?> <strong><?php _e('TELEFONSUPPORT: ', 'hittasmslan'); ?></strong><?php the_sub_field( 'phone' ); ?><br> <?php } if(get_sub_field( 'live_chat' )){ ?> <strong><?php _e('LIVE-CHATT: ', 'hittasmslan'); ?></strong><?php the_sub_field( 'live_chat' ); ?><br> <?php } if(get_sub_field( 'email' )){ ?> <strong><?php _e('E-POST: ', 'hittasmslan'); ?></strong>: <?php the_sub_field( 'email' ); ?> <?php } if ( have_rows( 'more_contacts' ) ) { while ( have_rows( 'more_contacts' ) ) { the_row(); if(get_sub_field( 'title' ) && get_sub_field( 'contact' )) { ?> <strong><?php the_sub_field( 'title' ); ?></strong><?php the_sub_field( 'contact' ); ?> <?php } } } ?> </p> <?php } } if ( have_rows( 'address' ) ) { while ( have_rows( 'address' ) ) { the_row(); if(get_sub_field( 'title' )) { ?> <p class="h4"><?php the_sub_field( 'title' ); ?></p> <?php } if(get_sub_field( 'organisationsnummer' )){ ?> <p><strong><?php _e('ORGANISATIONSNUMMER: ', 'hittasmslan'); ?></strong><br> <?php the_sub_field( 'organisationsnummer' ); ?></p> <?php } if(get_sub_field( 'postaddress' )){ ?> <p><strong><?php _e('BESÖKSADDRESS/POSTADDRESS: ', 'hittasmslan'); ?></strong><br> <?php the_sub_field( 'postaddress' ); ?></p> <?php } ?> </div> <?php } } } } ?> </div> <div class="text-container col-lg-6"> <?php if(get_sub_field( 'title' )) { ?> <h2 class="title border-bottom h2"><?php the_sub_field( 'title' ); ?></h2> <?php } ?> <div class="text text-big"> <?php if(get_sub_field( 'description' )) { the_sub_field( 'description' ); } if ( have_rows( 'button' ) ) { while ( have_rows( 'button' ) ) { the_row(); ?> <div class="btn-pill-container multiple"> <?php if(get_sub_field( 'url' )){ $url = get_sub_field( 'url' ); }else{ $url = $general_link; } if(get_sub_field( 'title' )){ $url_title = get_sub_field( 'title' ); }else{ $url_title = __('Ansök lån', 'hittasmslan'); } ?> <div class="btn-pill-subcontainer square"> <a class="btn-pill" href="<?php echo $url; ?>" target="_blank"><span><i class="fas fa-money-check-alt"></i><?php echo $url_title; ?></span></a> </div> <div class="btn-pill-subcontainer square alt-color"> <a class="btn-pill" href="#jamfor-priser"><span><i class="fas fa-list-ol"></i><?php _e('Jämför priser', 'hittasmslan'); ?></span></a> </div> </div> <?php } } ?> </div> </div> </div> <div class="quick-links row"> <div class="col-lg-12"> <div class="btn-pill-container"> <div class="alt-color btn-pill-subcontainer"> <a class="btn-pill" href="#jamfor-priser"><span><?php _e('Jämför kostnad', 'hittasmslan'); ?></span></a> </div> <div class="alt-color btn-pill-subcontainer"> <a class="btn-pill" href="#lanevilkor-och-avgifter"><span><?php _e('Lånevilkor & avgifter', 'hittasmslan'); ?></span></a> </div> <div class="alt-color btn-pill-subcontainer"> <a class="btn-pill" href="#recensioner"><span><?php _e('Recensioner', 'hittasmslan'); ?></span></a> </div> <div class="alt-color btn-pill-subcontainer"> <a class="btn-pill" href="#ytterliggare-information"><span><?php _e('Ytterliggare information', 'hittasmslan'); ?></span></a> </div> </div> </div> </div> </div> </section> <?php } } ?> <section id="calculator" class="section-padding"> <div id="jamfor-priser" class="container"> <div class="row"> <i class="fas fa-exclamation-triangle" style=" background-color: yellow; font-size: 4rem; border-radius: 6rem; height: 6.5rem; width: 6.5rem; line-height: 5.3rem; text-align: center; border: 4px solid #333; margin: 0 auto; "></i> <p class="h3 text-shadow" style=" width: 100%; margin-top: 2rem; text-align: center; color: white; ">Den här sektionen är fortfarande under konstruktion</p> <!-- <div class="title-container col-lg-12"> <p class="title h3 text-shadow">Hur mycket <span class="strikethrough-border">kostar Lumify?</span></p> <div class="text text-big text-shadow-small"> <p>Här kan göra en grov uträkning på vad ditt lån kan kosta hos Lumify. Notera att detta verktyg inte ger faktiska erbjudanden hos Lumify, utan endast en approximation.</p> </div> </div> <div class="left col-lg-6"> <div class="comparison-tool"> <div class="slide-container clear-both"> <label for="money-amount"><b>Lånesumma</b></label> <input type="range" min="1" max="16" value="1" class="slider" name="money-amount" id="money-amount" /> <input type="text" class="slider-amount" name="money-amount-text" id="money-amount-text" value="500 kr"/> </div> <div class="slide-container clear-both"> <label for="borrowing-time"><b>Tid</b></label> <input type="range" min="1" max="4" value="1" class="slider" name="borrowing-time" id="borrowing-time" /> <input type="text" class="slider-amount" name="borrowing-time-text" id="borrowing-time-text" value="14 dagar"/> </div> <p><b>Ränta: </b>39.50%</p> </div> </div> <div class="right col-lg-6"> <div class="text text-big text-shadow-small row"> <div class="col-lg-6"> <p><b>Räntekostnad</b>165 kr</p> </div> <div class="col-lg-6"> <p><b>Ränteavdrag</b>-45 kr</p> </div> <div class="col-lg-6"> <p><b>Avgifter</b>60 kr</p> </div> <div class="col-lg-6"> <p><b>Belopp att betala tillbaka</b>5 225 kr</p> </div> <div class="col-lg-6"> <p><b>Effektiv ränta</b>69.75%</p> </div> <div class="col-lg-6"> <p><b>Före ränteavdrag</b>5225 kr</p> </div> <div class="monthly-cost col-lg-12"> <p><b>Månadskostnad: </b>5175 kr/mån</p> </div> </div> </div> --> </div> </div> </section> <?php if ( have_rows( 'terms_&_fees_section' ) ) { while ( have_rows( 'terms_&_fees_section' ) ) { the_row(); ?> <section id="lanevilkor-och-avgifter" class="book-spread"> <div class="container-fluid"> <div class="row"> <div class="left col-lg-6"> <?php if ( have_rows( 'left_side' ) ) { while ( have_rows( 'left_side' ) ) { the_row(); if(get_sub_field( 'title' )){ ?> <p class="icon-title title border-bottom h2 mt-0"> <i class="far fa-handshake"></i> <?php the_sub_field( 'title' ); ?> </p> <?php } if(get_sub_field( 'description' )){ ?> <div class="text text-big"> <?php the_sub_field( 'description' ); ?> </div> <?php } } } ?> </div> <div class="right col-lg-6"> <?php if ( have_rows( 'right_side' ) ) { while ( have_rows( 'right_side' ) ) { the_row(); if(get_sub_field( 'title' )){ ?> <p class="icon-title title border-bottom h2 mt-0"> <i class="fas fa-dollar-sign"></i> <?php the_sub_field( 'title' ); ?> </p> <?php } if ( have_rows( 'list' ) ) { ?> <div class="heading-text-split text text-big"> <?php while ( have_rows( 'list' ) ) { the_row(); if ( have_rows( 'item' ) ) { while ( have_rows( 'item' ) ) { the_row(); ?> <div class="ht-row"> <div class="l"> <?php if(get_sub_field( 'service_title' )){ ?> <p><?php the_sub_field( 'service_title' ); ?></p> <?php } ?> </div> <div class="r"> <?php if(get_sub_field( 'price' ) || get_sub_field( 'description' )){ ?> <p><b><?php the_sub_field( 'price' ); ?></b><?php the_sub_field( 'description' ); ?></p> <?php } ?> </div> </div> <?php } } } ?> </div> <?php } } } ?> </div> </div> </div> </section> <?php } } if ( have_rows( 'review_section' ) ) { while ( have_rows( 'review_section' ) ) { the_row(); ?> <section id="reviews" class="book-spread"> <div id="recensioner" class="container-fluid"> <div class="row"> <div class="left col-lg-6"> <i class="fas fa-exclamation-triangle" style=" background-color: yellow; font-size: 4rem; border-radius: 6rem; height: 6.5rem; width: 6.5rem; line-height: 5.3rem; text-align: center; border: 4px solid #333; margin: 0 auto; display: block; "></i> <p class="h3" style=" width: 100%; margin-top: 2rem; text-align: center; ">Den här sektionen är fortfarande under konstruktion</p> <?php /* <!-- <p class="icon-title title border-bottom h2"><i class="fas fa-user-edit"></i>Kundrecensioner</p> <div class="customer-reviews"> <div class="good highlight"> <header class="text-big"> <p><strong>Jonathan Turja</strong></p> <div class="rating-stars-container"> <div class="rating-stars " data-stars="7"> <img src="/img/star_filled_l.png" alt="star filled" class="filled" data-starid="1"> <img src="/img/star_filled_r.png" alt="star filled" class="filled" data-starid="2"> <img src="/img/star_filled_l.png" alt="star filled" class="filled" data-starid="3"> <img src="/img/star_filled_r.png" alt="star filled" class="filled" data-starid="4"> <img src="/img/star_filled_l.png" alt="star filled" class="filled" data-starid="5"> <img src="/img/star_filled_r.png" alt="star filled" class="filled" data-starid="6"> <img src="/img/star_filled_l.png" alt="star filled" class="filled" data-starid="7"> <img src="/img/star_unfilled_r.png" alt="star filled" class="filled" data-starid="8"> <img src="/img/star_unfilled_l.png" alt="star filled" class="filled" data-starid="9"> <img src="/img/star_unfilled_r.png" alt="star filled" class="filled" data-starid="10"> </div> <p class="rating-number">(3.5)</p> </div> </header> <div class="text"> <p>Jag tycker att Lumify är jätte bra!</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nisl tellus, tincidunt id volutpat sit amet, consectetur et odio. Quisque sit amet felis convallis, interdum nulla eget, rhoncus elit. Aliquam erat volutpat. Nulla eget ultricies tellus, sit amet gravida ex. Suspendisse sit amet urna non sem fermentum consectetur at ut tortor.</p> </div> </div> <div class="bad highlight"> <header class="text-big"> <p><strong>Jonathan Turja</strong></p> <div class="rating-stars-container"> <div class="rating-stars " data-stars="2"> <img src="/img/star_filled_l.png" alt="star filled" class="filled" data-starid="1"> <img src="/img/star_filled_r.png" alt="star filled" class="filled" data-starid="2"> <img src="/img/star_unfilled_l.png" alt="star filled" class="filled" data-starid="3"> <img src="/img/star_unfilled_r.png" alt="star filled" class="filled" data-starid="4"> <img src="/img/star_unfilled_l.png" alt="star filled" class="filled" data-starid="5"> <img src="/img/star_unfilled_r.png" alt="star filled" class="filled" data-starid="6"> <img src="/img/star_unfilled_l.png" alt="star filled" class="filled" data-starid="7"> <img src="/img/star_unfilled_r.png" alt="star filled" class="filled" data-starid="8"> <img src="/img/star_unfilled_l.png" alt="star filled" class="filled" data-starid="9"> <img src="/img/star_unfilled_r.png" alt="star filled" class="filled" data-starid="10"> </div> <p class="rating-number">(1)</p> </div> </header> <div class="text"> <p>Inte alls bra...</p> </div> </div> <div class="btn-pill-container big"> <div class="btn-pill-subcontainer alt-color"> <a class="btn-pill" href="#"><span><i class="far fa-plus-square"></i>Se alla omdömen</span></a> </div> <div class="btn-pill-subcontainer"> <a class="btn-pill" href="#"><span><i class="fas fa-pencil-alt"></i>Skriv ett eget omdöme</span></a> </div> </div> </div> --> */ ?> </div> <div class="right col-lg-6"> <?php if(get_sub_field( 'title' )){ ?> <p class="icon-title title border-bottom h2 mt-0"> <i class="fas fa-question"></i> <span><?php the_sub_field( 'title' ); ?></span> </p> <?php } if ( have_rows( 'review' ) ) { while ( have_rows( 'review' ) ) { the_row(); if ( have_rows( 'item' ) ) { ?> <div class="heading-text-split ht-rating-stars text text-big"> <?php while ( have_rows( 'item' ) ) { the_row(); ?> <div class="ht-row"> <div class="l"> <?php if(get_sub_field( 'name' )){ ?> <p><b><?php the_sub_field( 'name' ); ?></b></p> <?php } ?> </div> <div class="r"> <?php if(get_sub_field( 'rating' )){ $stars_count = get_sub_field( 'rating' ) * 2; $i = 1; ?> <div class="rating-stars-container"> <div class="rating-stars " data-stars="<?php echo $stars_count; ?>"> <?php if(!$stars_count % 2){ $image = 'star_filled_l.png'; }else{ $image = 'star_filled_r.png'; } while($i <= 10){ if ($i <= $stars_count){ if($i % 2 !== 0){ $image = 'star_filled_l.png'; }else{ $image = 'star_filled_r.png'; } }else{ if($i % 2 !== 0){ $image = 'star_unfilled_l.png'; }else{ $image = 'star_unfilled_r.png'; } } ?> <img src="<?php echo get_template_directory_uri(); ?>/dist/img/<?php echo $image; ?>" alt="star filled" class="filled" data-starid="<?php echo $i; ?>"> <?php $i++; } ?> </div> <p class="rating-number">(<?php the_sub_field( 'rating' ); ?>)</p> </div> <?php } ?> <div class="text"> <?php if(get_sub_field( 'comment' )){ ?> <p><?php the_sub_field( 'comment' ); ?></p> <?php } ?> </div> </div> </div> <?php } ?> </div> <?php } } } ?> </div> </div> </div> </section> <?php } } if ( have_rows( 'cta_section' ) ) { while ( have_rows( 'cta_section' ) ) { the_row(); ?> <div id="overtygad" class="wide-bg"> <div class="container"> <div class="justify-content-center row"> <div class="col-lg-9"> <?php if(get_sub_field( 'title' )){ ?> <h4 class="title h4 text-shadow-small mt-0"><?php the_sub_field( 'title' ); ?></h4> <?php } if(get_sub_field( 'description' )){ ?> <div class="text-big"> <p class="text-shadow-small"><?php the_sub_field( 'description' ); ?></p> </div> <?php } if ( have_rows( 'button' ) ) { while ( have_rows( 'button' ) ) { the_row(); ?> <div class="btn-pill-container"> <div class="btn-pill-subcontainer"> <?php if(get_sub_field( 'url' )){ $url = get_sub_field( 'url' ); }else{ $url = $general_link; } if(get_sub_field( 'title' )){ $url_title = get_sub_field( 'title' ); }else{ $url_title = __('Låna hos Slantar', 'hittasmslan'); } if($url && $url_title){ ?> <a href="<?php echo $url; ?>" class="btn-pill" target="_blank"> <span><?php echo $url_title; ?></span> </a> <?php } ?> </div> </div> </div> <?php } } ?> </div> </div> </div> <?php } } if ( have_rows( 'more_info_section' ) ) { while ( have_rows( 'more_info_section' ) ) { the_row(); ?> <section id="more-info" class="section-padding"> <div id="ytterliggare-information" class="container"> <div class="row"> <?php if ( have_rows( 'advantages_and_disadvantages' ) ) { while ( have_rows( 'advantages_and_disadvantages' ) ) { the_row(); ?> <div class="left col-lg-6"> <?php if ( have_rows( 'advantages' ) ) { while ( have_rows( 'advantages' ) ) { the_row(); if(get_sub_field( 'title' )){ ?> <p class="icon-title title h3 border-bottom mt-0"><i class="fas fa-plus"></i><?php the_sub_field( 'title' ); ?></p> <?php } if ( have_rows( 'list' ) ) { ?> <ul class="arrow-list"> <?php while ( have_rows( 'list' ) ) { the_row(); if(get_sub_field( 'item' )){ ?> <li><?php the_sub_field( 'item' ); ?></li> <?php } } ?> </ul> <?php } } } ?> </div> <div class="right col-lg-6"> <?php if ( have_rows( 'disadvantages' ) ) { while ( have_rows( 'disadvantages' ) ) { the_row(); if(get_sub_field( 'title' )){ ?> <p class="icon-title title h3 border-bottom mt-0"><i class="fas fa-minus"></i><?php the_sub_field( 'title' ); ?></p> <?php } if ( have_rows( 'list' ) ) { ?> <ul class="arrow-list"> <?php while ( have_rows( 'list' ) ) { the_row(); if(get_sub_field( 'item' )){ ?> <li><?php the_sub_field( 'item' ); ?></li> <?php } } ?> </ul> <?php } } } ?> </div> <?php } } ?> </div> <?php if ( have_rows( 'content' ) ) { while ( have_rows( 'content' ) ) { the_row(); ?> <div class="row"> <div class="left col-lg-6"> <?php if ( have_rows( 'left_column' ) ) { while ( have_rows( 'left_column' ) ) { the_row(); if ( have_rows( 'content_items' ) ) { while ( have_rows( 'content_items' ) ) { the_row(); if ( have_rows( 'item' ) ) { while ( have_rows( 'item' ) ) { the_row(); if(get_sub_field( 'title' )){ ?> <p class="title h3 border-top border-bottom"><?php the_sub_field( 'title' ); ?></p> <?php } if ( get_sub_field( 'content_type' ) == 0 ) { ?> <div class="text text-big"> <?php the_sub_field( 'description' ); ?> </div> <?php }elseif ( get_sub_field( 'content_type' ) == 1 ) { if ( have_rows( 'table' ) ) { while ( have_rows( 'table' ) ) { the_row(); if ( have_rows( 'item' ) ) { ?> <table class="zebra-stripe" width="100%"> <tbody> <?php while ( have_rows( 'item' ) ) { the_row(); ?> <tr> <?php if(get_sub_field( 'title' )) { ?> <td width="30%"><?php the_sub_field( 'title' ); ?></td> <?php } if(get_sub_field( 'description' )) { ?> <td><strong><time> <?php the_sub_field( 'description' ); ?></time> </strong> </td> <?php } ?> </tr> <?php } ?> </tbody> </table> <?php } } } } } } } } } } ?> </div> <div class="right col-lg-6"> <?php if ( have_rows( 'right_column' ) ) { while ( have_rows( 'right_column' ) ) { the_row(); if ( have_rows( 'content_items' ) ) { while ( have_rows( 'content_items' ) ) { the_row(); if ( have_rows( 'item' ) ) { while ( have_rows( 'item' ) ) { the_row(); if(get_sub_field( 'title' )){ ?> <p class="title h3 border-top border-bottom"><?php the_sub_field( 'title' ); ?></p> <?php } if ( get_sub_field( 'content_type' ) == 0 ) { ?> <div class="text text-big"> <?php the_sub_field( 'description' ); ?> </div> <?php }elseif ( get_sub_field( 'content_type' ) == 1 ) { if ( have_rows( 'table' ) ) { while ( have_rows( 'table' ) ) { the_row(); if ( have_rows( 'item' ) ) { ?> <table class="zebra-stripe" width="100%"> <tbody> <?php while ( have_rows( 'item' ) ) { the_row(); ?> <tr> <?php if(get_sub_field( 'title' )) { ?> <td width="30%"><?php the_sub_field( 'title' ); ?></td> <?php } if(get_sub_field( 'description' )) { $string = get_sub_field( 'description' ); $regex = '/^[0-9]{2} \- [0-9]{2}$/'; if (preg_match($regex, $string)) { $time = '<time>'; $time_close = '</time>'; }else{ $time = ''; $time_close = ''; } ?> <td><strong><?php echo $time; the_sub_field( 'description' ); echo $time_close; ?></strong> </td> <?php } ?> </tr> <?php } ?> </tbody> </table> <?php } } } } } } } } } } ?> </div> </div> <?php } } ?> </div> </section> <?php } } }elseif($under_construction == 1){ if ( have_rows( 'hero_section' ) ) { while ( have_rows( 'hero_section' ) ) { the_row(); ?> <section id="hero" class="hero-comparison"> <?php $background = get_sub_field( 'background' ); if(!$background){ $background = get_field( 'background_image', 'option' ); } if ( $background ) { ?> <div class="bg-img"> <img src="<?php echo $background['url']; ?>" srcset="<?php echo $background['url']; ?> 575w, <?php echo $background['url']; ?>" alt="<?php if($background['alt']){ echo $background['alt'];}else{ echo "Hittasmslan Background Image"; } ?>" /> </div> <?php } ?> <div class="container"> <div class="align-items-center justify-content-center row" style="min-height: calc(100vh - 600px);"> <div class="left col-lg-8"> <?php if($construction_text) { ?> <p class="title h2 text-shadow" style="text-align: center;"><?php echo $construction_text; ?></p> <?php } ?> </div> </div> </div> </section> <?php } } } get_footer(); ?>