<?php get_header(); ?>

    <!-- About Section Start -->
    <div id="about" class="section-padding rt-services">
      <div class="container">
        <div class="row">
          <div class="col-md-12 text-center">
            <br><br>
          </div>
          <div class="col-md-12 text-center">
            <div class="">
              <?php echo get_option('gf_titel');  ?>
            </div>
          </div>
          <div class="col-md-12 text-center">
            <br><br>
          </div>
        </div>
        <div class="row">


          <?php

            $args = array(
                'post_type' => 'geschaeftfelder',
                'post_status' => 'publish',
                'posts_per_page' => -1
            );
            $posts = new WP_Query($args);
            $counter = 1;

            while ($posts -> have_posts()) {
                $posts->the_post(); ?>

          <div class="col-lg-3 col-md-6 col-xs-12">
            <div class="about block text-center">
              <div class="felder-img">
                <div class="rl-center">

                  <img src="<?php echo get_the_post_thumbnail_url($posts->post->ID, 'medium'); ?>" alt="<?php the_title(); ?>">
                </div>
              </div>
              <h5><?php the_title(); ?></h5>
              <p><?php echo get_post_meta($posts->post->ID, 'geschaeftfeld_text', true); ?></p>
            </div>
          </div>


          <?php
        } //  while ( $posts -> have_posts() )
          wp_reset_postdata();
          // wp_reset_query();
          ?>



        </div>
        <div class="row">
          <div class="col-md-12 text-center">
            <br><br><br>
          </div>
          <div class="col-md-12 text-center">
            <div class="">
              <?php
               $options = get_option('gf_extra');
               echo $options;
              ?>
            </div>
          </div>
          <div class="col-md-12 text-center">
            <br><br><br>
          </div>
        </div>
      </div>
    </div>
    <!-- About Section End -->



    <!-- Portfolio Section -->
    <section id="portfolio" class="section-padding rt-color-projekte">
      <!-- Container Starts -->
      <div class="container">
        <div class="row">
          <div class="col-md-12">
            <p class="rl-section-title" data-wow-delay="0.3s"><?php echo get_option('pr_titel');  ?></p>


          </div>
        </div>
        <ul class="row portfolio list-unstyled" id="grid">

        <?php

          $args = array(
              'post_type' => 'projekte',
              'post_status' => 'publish',
              'posts_per_page' => -1
          );
          $posts = new WP_Query($args);
          $counter = 1;

          while ($posts -> have_posts()) {
              $posts->the_post(); ?>


                          <!-- project -->
                          <li class="col-md-4 col-sm-6 project">

                            <div class="portfolio block">
                              <figure>
                                <div class="hovereffect rl-projects-figure rl-border-round">
                                  <div class="rl-center-helper">
                                    <div class="rl-center-frame">
                                      <img class="rl-center-img" src="<?php echo get_the_post_thumbnail_url($posts->post->ID, 'medium'); ?>" alt="<?php the_title(); ?>">
                                    </div>
                                </div>
                                  <div class="overlay">
                                    <div class="icons-link">
                                      <a class="left-link" href="<?php echo get_post_meta($posts->post->ID, 'projekt_link', true); ?>"><i class="fa fa-link"></i></a>
                                      <!--
                                      <a class="right-link" href="#"><i class="fa fa-heart"></i></a>
                                       -->
                                    </div>
                                  </div>
                                </div>
                              </figure>
                              <span><br></span>
                              <h5><?php the_title(); ?></h5>
                              <p class="project-description"><?php echo get_post_meta($posts->post->ID, 'projekt_beschreibung', true); ?></p>
                            </div>
                          </li>
                          <!-- project -->




            <?php
          } //  while ( $posts -> have_posts() )
            wp_reset_postdata();
            // wp_reset_query();
            ?>
          </ul>
          <div class="row">
            <div class="col-md-12 text-center">
              <br><br><br>
            </div>
            <div class="col-md-12 text-center">
              <div class="">
                <?php echo get_option('pr_extra');  ?>
              </div>
            </div>
            <div class="col-md-12 text-center">
              <br><br><br>
            </div>
          </div>
      </div>
      <!-- Container Ends -->
    </section>
    <!-- Portfolio Section Ends -->





		    <!-- Team Section Start -->
        <section id="team-section" class="section-padding rt-team">
		    <div id="team" class="team-members-tow section-padding ">
		      <div class="container">
		        <div class="row">
		          <div class="col-md-12">
		            <p class="rl-section-title" data-wow-delay="0.3s">Das Team</p>
		          </div>
		        </div>
            <div class="row">
            <?php

              $args = array(
                  'post_type' => 'mitarbeiter',
                  'post_status' => 'publish',
                  'posts_per_page' => -1
              );
              $posts = new WP_Query($args);
              $counter = 1;

              while ($posts -> have_posts()) {
                  $posts->the_post(); ?>


                  <!-- Team Item Starts -->
                  <div class="col-lg-3 col-md-6 col-xs-12">
                    <!--
                    <?php echo get_the_post_thumbnail_url($posts->post->ID, 'general_thumb' ); ?>
                    -->
                    <div class="team-item">
                      <figure class="team-profile rl-team-round">
                        <img src="<?php echo get_the_post_thumbnail_url($posts->post->ID, 'general_thumb' ); ?>" alt="<?php the_title(); ?>">
                        <figcaption class="our-team">
                          <div class="details">
                            <p class="content-white"><?php echo get_post_meta($posts->post->ID, 'mitarbeiter_beschreibung', true); ?></p>
                            <hr class="small-divider border-white">
                            <div class="social">
                              <?php
                              $content = get_post_meta($posts->post->ID, 'mitarbeiter_email', true);
                              echo encode_email_shortcode( [], $content   );
                                ?><br/>
                              <a href="tel:<?php echo get_post_meta($posts->post->ID, 'mitarbeiter_tel', true); ?>"><?php echo get_post_meta($posts->post->ID, 'mitarbeiter_tel', true); ?></a><br/>
                              <!-- <a href="<?php echo get_post_type_archive_link( 'mitarbeiter' ); echo '#post-';  echo get_the_ID();  ?>"><i class="fa fa-link" aria-hidden="true"></i></a> -->
                              <?php if (  get_post_meta($posts->post->ID, 'mitarbeiter_cv', true) != "" ): ?>
                              <a href="<?php echo get_post_meta($posts->post->ID, 'mitarbeiter_cv', true); ?>"><i class="fa fa-link" aria-hidden="true"></i></a>
                              <?php endif; ?>
                              <!--
                              <a class="facebook" href="#"><i class="fa fa-facebook"></i></a>
                              <a class="twitter" href="#"><i class="fa fa-twitter"></i></a>
                              <a class="google-plus" href="#"><i class="fa fa-instagram"></i></a>
                               -->
                            </div>
                          </div>
                        </figcaption>
                      </figure>
                      <div class="info">
                        <h2>
                          <?php the_title(); ?>
                        </h2>
                        <p>
                          <?php echo get_post_meta($posts->post->ID, 'mitarbeiter_position', true); ?>
                        </p>
                      </div>
                    </div>
                  </div>
                  <!-- Team Item Ends -->




								<?php if ($counter && $counter % 4 == 0): ?>

									</div>
									<div class="row">

								<?php endif;

                  $counter++;
              } //  while ( $posts -> have_posts() )
                                wp_reset_postdata();


                                ?>

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





    <!-- Services Section Start -->

    <!-- Services Section Start -->

    <!-- Services Section Start -->


<?php /*  ?>

    <section id="baugruppen">
      <div class="container">
        <div class="row">
          <div class="col-md-12">
            <h2 class="section-title wow fadeInDown animated" data-wow-delay="0.3s">Unsere Baugrupen</h2>
          </div>
          <!--
          <div class="sub-title">
            <span>Unsere Baugrupen</span>
          </div>
           -->
        </div>

        <ul class="row portfolio list-unstyled justify-content-center" id="grid">


            <?php

              $args = array(
                  'post_type' => 'baugruppen',
                  'post_status' => 'publish',
                  'posts_per_page' => -1
              );
              $posts = new WP_Query($args);
              $counter = 2;


              while ($posts -> have_posts()) {
                  $posts->the_post();

                  if ( $counter % 2 == 0 ){
                    $divmargin = "margin-top: 30px;";
                  } else {
                    $divmargin = "margin-bottom: 30px;";
                  }

                  ?>

                  <li class="col-md-3 col-sm-6 project">
                    <figure>
                      <div class="hovereffect round-pic" style="<?php echo $divmargin ?>">
                        <img src="<?php echo get_the_post_thumbnail_url($posts->post->ID, 'general_thumb' ); ?>" alt="<?php the_title(); ?>">
                        <div class="overlay">
                          <div class="iocns">
                            <a class="left-link" href="<?php echo get_post_meta($posts->post->ID, 'baugruppe_link', true); ?>"><i class="fa fa-link"></i></a>
                          </div>
                        </div>
                      </div>
                    </figure>
                  </li>


                <?php if ($counter && $counter % 4 == 0): ?>

                  </ul>
                  <ul class="row portfolio list-unstyled justify-content-center" id="grid">

                <?php endif;

                if ( $counter % 8 == 0 ){
                  $counter++;
                }

                $counter++;

              } //  while ( $posts -> have_posts() )
              wp_reset_postdata();


              ?>

            </ul>
          </div>
        </section>


<?php */  ?>








     <!-- Clients Section Start -->
    <div id="clients" class="section-padding rl-clients">
      <div class="container">
        <div class="row">
          <div class="col-md-12">
            <p class="rl-section-title" data-wow-delay="0.3s">Unsere Kunden</p>
          </div>
        </div>


                  <ul class="row portfolio list-unstyled" id="grid">


  <?php

    $args = array(
        'post_type' => 'clients',
        'post_status' => 'publish',
        'posts_per_page' => -1
    );
    $posts = new WP_Query($args);
    $counter = 1;


    while ($posts -> have_posts()) {
        $posts->the_post();

        ?>

        <li class="col-md-2 col-sm-6 project">

          <figure>
            <div class="hovereffect">

              <div class="rl-clients-fix">
                <div class="rl-center">

              <img src="<?php echo get_the_post_thumbnail_url($posts->post->ID, 'medium'); ?>" alt="<?php the_title(); ?>">
            </div>
          </div>
              <div class="overlay">
                <div class="iocns">
                  <a class="left-link" href="<?php echo get_post_meta($posts->post->ID, 'client_link', true); ?>"><i class="fa fa-link"></i></a>
                </div>
              </div>
          </div>
          </figure>
        </li>

      <?php if ($counter && $counter % 6 == 0): ?>

        </ul>
        <ul class="row portfolio list-unstyled justify-content-center" id="grid-clients">

      <?php endif;

      $counter++;

    } //  while ( $posts -> have_posts() )
    wp_reset_postdata();


    ?>



              </ul>

      </div>
    </div>
    <!-- Clients Section End -->

    <!-- facts Section Start -->
    <!-- <div id="counter">
      <div class="container">
        <div class="row count-to-sec">
          <div class="col-lg-3 col-md-6 col-xs-12 count-one">
            <span class="icon"><i class="fa fa-download"> </i></span>
            <h3 class="timer count-value" data-to="561" data-speed="1000">561</h3>
            <hr class="width25-divider">
            <small class="count-title">Downloads</small>
          </div>

          <div class="col-lg-3 col-md-6 col-xs-12 count-one">
            <span class="icon"><i class="fa fa-user"> </i></span>
            <h3 class="timer count-value" data-to="950" data-speed="1000">950</h3>
            <hr class="width25-divider">
            <small class="count-title">Developers</small>
          </div>

          <div class="col-lg-3 col-md-6 col-xs-12 count-one">
            <span class="icon"><i class="fa fa-desktop"> </i></span>
            <h3 class="timer count-value" data-to="978" data-speed="1000">978</h3>
            <hr class="width25-divider">
            <small class="count-title">Lines of code written</small>
          </div>

          <div class="col-lg-3 col-md-6 col-xs-12 count-one">
            <span class="icon"><i class="fa fa-coffee"> </i></span>
            <h3 class="timer count-value" data-to="1700" data-speed="1000">1700</h3>
            <hr class="width25-divider">
            <small class="count-title">Cups of coffee consumed</small>
          </div>
        </div>
      </div>
    </div> -->
    <!-- facts Section End -->




    <!-- ***************************************************************************** -->

    <!-- Single testimonial Start -->

    <?php /*  ?>
    <div  id="testimonials" class="single-testimonial-area">
      <div class="container">

        <div class="row">
          <div class="col-md-12">
            <h2 class="section-title wow fadeInDown animated" data-wow-delay="0.3s">Was andere über uns sagen</h2>
          </div>
        </div>

        <div id="single-testimonial-item" class="owl-carousel">


        <?php

          $args = array(
              'post_type' => 'testimonials',
              'post_status' => 'publish',
              'posts_per_page' => 100
          );
          $posts = new WP_Query($args);


          while ($posts -> have_posts()) {
              $posts->the_post();

              ?>


                <div class="item">
                  <div class="row justify-content-md-center">
                    <div class="col-lg-8 col-md-12 col-xs-12 col-md-auto">
                      <div class="testimonial-inner text-md-center">
                        <blockquote>
                          <?php echo get_post_meta($posts->post->ID, 'testimonial_text', true); ?>
                        </blockquote>
                        <div class="testimonial-images">
                          <img class="img-circle text-md-center" src="<?php echo get_the_post_thumbnail_url($posts->post->ID, 'general_thumb' ); ?>" alt="">
                        </div>
                        <div class="testimonial-footer">
                          <i class="fa fa-user"></i>
                          <a href="<?php echo get_post_meta($posts->post->ID, 'testimonial_link', true); ?>"> <?php echo get_post_meta($posts->post->ID, 'testimonial_autor', true); ?></a>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>


          <?php
          } //  while ( $posts -> have_posts() )
          wp_reset_postdata();


          ?>


        </div>
      </div>
    </div>
    <?php */  ?>
    <!-- end -->


    <!-- ***************************************************************************** -->


    <!-- Contact Form Section Start -->
    <!-- <section id="contact" class="contact-form section-padding">
      <div class="container">
        <div class="row">
          <div class="col-md-12">
            <h2 class="section-title wow fadeInDown animated" data-wow-delay="0.3s">Contact Us</h2>
          </div>
        </div>
        <div class="row">
          <div class="col-lg-8 col-md-6 col-xs-12">
            <h3 class="title-head text-left">Get in touch</h3>
            <form class="contact-form" data-toggle="validator">
              <div class="row">
                <div class="col-lg-4 col-md-12 col-xs-12">
                  <div class="form-group">
                    <i class="contact-icon fa fa-user"></i>
                    <input type="text" class="form-control" id="name" placeholder="Full Name" required data-error="Please enter your name">
                    <div class="help-block with-errors"></div>
                  </div>
                </div>
                <div class="col-lg-4 col-md-12 col-xs-12">
                  <div class="form-group">
                    <i class="contact-icon fa fa-envelope-o"></i>
                    <input type="email" class="form-control" id="email" placeholder="Email" required data-error="Please enter your email">
                    <div class="help-block with-errors"></div>
                  </div>
                </div>
                <div class="col-lg-4 col-md-12 col-xs-12">
                  <div class="form-group">
                    <i class="contact-icon fa fa-pencil-square-o"></i>
                    <input type="text" class="form-control" id="subject" placeholder="Subject" required data-error="Please enter your Subject">
                    <div class="help-block with-errors"></div>
                  </div>
                </div>
                <div class="col-lg-12 col-md-12 col-xs-12">
                  <textarea class="form-control" id="message" rows="4" placeholder="Message" required data-error="Please enter your message"></textarea>
                  <div class="help-block with-errors"></div>
                  <button type="submit" id="form-submit" class="btn btn-common btn-form-submit">Send Message</button>
                  <div id="msgSubmit" class="h3 text-center hidden"></div>
                  <div class="clearfix"></div>
                </div>
              </div>
            </form>
          </div>

          <div class="col-lg-4 col-md-6 col-xs-12">
            <h4 class="contact-info-title text-left">Contact Information</h4>
            <div class="contact-info">
              <address>
              <i class="lni-map-marker icons cyan-color contact-info-icon"></i>
              Level 13, 2 Elizabeth St, Melbourne,
            </address>
              <div class="tel-info">
                <a href="tel:1800452308"><i class="lni-mobile icons cyan-color contact-info-icon"></i>1800 452 308</a>
                <a href="tel:+61(8)82343555"><i class="lni-phone icons cyan-color contact-info-icon"></i>+61 (8) 8234 3555</a>
              </div>
              <a href="mailto:hello@spiritapp.com"><i class="lni-envelope icons cyan-color contact-info-icon"></i>admin@uideck.com</a>
              <a href="#"><i class="lni-tab icons cyan-color contact-info-icon"></i>www.uideck.com</a>
              <ul class="social-links">
                <li>
                  <a href="#" class="fa fa-facebook"></a>
                </li>
                <li>
                  <a href="#" class="fa fa-twitter"></a>
                </li>
                <li>
                  <a href="#" class="fa fa-instagram"></a>
                </li>
                <li>
                  <a href="#" class="fa fa-linkedin"></a>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </section>
   -->
    <!-- Contact Form Section End -->

<?php get_footer(); ?>
