<html <?php echo get_language_attributes(); ?>>
<?php echo $__env->make('partials.head', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<body id="news" <?php body_class() ?>><?php wp_body_open(); ?>
<div class="pacewrap">

  <div id="container">
  <?php echo $__env->make('partials.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

  <article class="mt-lg-5 pt-lg-5">
    <section class="main">

      <div class="row plr-0 pb-5 col-10 offset-1">
        <div class="container">
          <header class="post_titlearea">
            <div class="container clearfix d-flex align-items-center">
              <h1 class="en float-left">News</h1>

              <select class="news_select selectpicker float-left en" onChange="location.href=value;">
                <option class="check_cat" selected name="cat" value="news_release">All News</option>
                <option class="check_cat" <?php $url = $_SERVER['REQUEST_URI'];if(strstr($url,'ncat=news')==true){echo "selected";} ?> name="cat" value="<?php echo e(home_url('/news_release?ncat=news')); ?>">お知らせ</option>
                <option class="check_cat" <?php $url = $_SERVER['REQUEST_URI'];if(strstr($url,'press')==true){echo "selected";} ?> name="cat" value="<?php echo e(home_url('/news_release?ncat=press')); ?>">プレスリリース</option>
                <option class="check_cat" <?php $url = $_SERVER['REQUEST_URI'];if(strstr($url,'seminar')==true){echo "selected";} ?> name="cat" value="<?php echo e(home_url('/news_release?ncat=seminar')); ?>">イベント・セミナー</option>
                <option class="check_cat" <?php $url = $_SERVER['REQUEST_URI'];if(strstr($url,'media')==true){echo "selected";} ?> name="cat" value="<?php echo e(home_url('/news_release?ncat=media')); ?>">メディア</option>
              </select>

            <div class="news_search float-right ml-auto d-none d-lg-block">
               <?php echo get_search_form(); ?>

            </div>

            <div class="news_search float-right ml-auto d-sm-block d-md-block d-lg-none">
              <span class="sp-search collapsed" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
                <i class="fas fa-search"></i>
              </span>
            </div>

            </div>

            <div class="collapse" id="collapseExample">
              <div class="card card-body">
                <?php echo get_search_form(); ?>

              </div>
            </div>

          </header>




          <div id="latest_news" class="mt-md-0 border-bottom-0">
            <ul id="result" class="row post_row mx-0">
              <!-- ここに投稿を表示 -->
                <?php if(have_posts()): while(have_posts()):the_post();$rankcount++; ?>
                  <li class="col-lg-11 offset-lg-1 post_box2">
                    <a href="<?php echo e(get_permalink()); ?>" class="d-flex">
                      <div class="thumbnail_wrap">
                        <div class="thumbnail">
                          <?php if(has_post_thumbnail()): ?>
                            <img src="<?php the_post_thumbnail_url( 'thumbnail' ); ?>" data-src="<?php the_post_thumbnail_url( 'medium' ); ?>" data-srcset="<?php the_post_thumbnail_url( 'medium' ); ?> 767w, <?php the_post_thumbnail_url( 'large' ); ?>" class="img-fluid lazyload">
                          <?php else: ?>
                            <img src="<?= App\asset_path('images/notfound.jpg'); ?>" alt="RECALM" class="img-fluid" />
                          <?php endif; ?>
                        </div>
                      </div>
                      <div>
                        <span class="d-none d-md-inline">
                          <time class="en"><?php echo e(get_the_date()); ?></time>  -
                          <?php
                              if($terms = get_the_terms($post->ID, 'ncat')) {
                                foreach ( $terms as $term ) {
                                  $term_slug = $term -> slug;
                                ?>
                                <span class="ctegory c_<?php echo esc_html($term_slug);?>"><?php echo esc_html($term->name);?>
                            </span><?php }}?>
                          </span>
                        <h2><?php echo get_the_title(); ?></h2>
                        <span class="d-md-none">
                          <time class="en"><?php echo e(get_the_date()); ?></time>  -
                          <?php
                              if($terms = get_the_terms($post->ID, 'ncat')) {
                                foreach ( $terms as $term ) {
                                  $term_slug = $term -> slug;
                                ?>
                                <span class="ctegory c_<?php echo esc_html($term_slug);?>"><?php echo esc_html($term->name);?>
                            </span><?php }}?>
                          </span>
                      </div>
                    </a>
                  </li>
                  <?php if ($rankcount == $number ): ?>
                  <?php endif; ?>
                <?php endwhile;endif; ?>
            </ul>

            <div id="pagination">
              <?php the_pagination();?>
            </div>
              <!-- <div id="pagination" class="text-right">
                <div class="clearfix text-right">
                  <?php
                    if ($the_query->max_num_pages > 1) {
                      echo paginate_links(array(
                      'base' => get_pagenum_link(1) . '%_%',
                      'format' => 'page/%#%/',
                      'current' => max(1, $paged),
                      'total' => $the_query->max_num_pages,
                      'prev_text' => '&larr;',
                      'next_text' => '&rarr;'
                      ));
                    }
                  ?>
                </div>
              </div> -->

           </div>

    </section>
  </article>


  <?php do_action('get_footer') ?>
  <?php echo $__env->make('partials.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
  <?php wp_footer() ?>

</div>

</body>
</html>
