<?php get_header(); ?>
<div class="mainArea">
  <div class="main_inner">
    <p class="main_txt">3A<br class="mobile_only03"> CRAFT<br class="mobile_only03"> WORKS<span>日々の暮らしに心豊かな時間を創出する</span></p>
  </div>
	<div class="scrolldown1"><span>SCROLL</span></div>
</div>
<div class="transparent_bg">
  <div class="newsArea">
    <div class="inner">
      <div class="left">
        <div class="h2Area">
          <h2>NEWS</h2>
          </div>
        </div>
      <div class="right">
        <ul>
<?php
$args = [
	"posts_per_page" => 1,
	'paged' => get_query_var('paged') ? get_query_var('paged') : 1,
	"post_type" => "post",
	"orderby " => "date",
	"post_status" => "publish",
	"category_name" => "news"
];
	$the_query = new WP_Query($args);
	if ($the_query->have_posts()) {
	while ($the_query->have_posts()) {
		$the_query->the_post();
		$cat = get_the_category();
		$cat = $cat[0];
?>
          <li>
            <div class="n_left">
              <time class="date"><?php the_time("Y-m-d"); ?></time>
              </div>
            <div class="n_right">
              <div class="ttl"><a href="<?php the_permalink(); ?>"><?php echo mb_strimwidth(get_the_title(), 0, 250, "..."); ?></a></div>
              </div>
            </li>
<?php	}
} else { ?>
			<p class="nopost">現在、投稿情報はございません。</p>
<?php }
?>
          </ul>
        <div class="btn"><a href="<?php echo home_url('topics/'); ?>" class="btnarrow btn01">NEWSLIST</a></div>
        </div>
      </div>
    </div>
  <div class="aboutArea">
    <div class="inner fadeUpTrigger">
        <div class="h2Area">
          <h2><span>ABOUT</span> 3A CRAFT WORKS</h2>
        </div>
		<div class="box">
			<div class="left"><img src="<?php echo get_theme_file_uri('/img/top/top_3a.png'); ?>" alt="3A CRAFT WORKS"></div>
			<div class="right">
				<ul>
					<li>Architect</li>
					<li>Artist</li>
					<li>Activist for you</li>
				</ul>
			</div>
		</div>
		<p class="aboutTxt">異国の最新技術を駆使し、<br class="mobile_only03">建築物から芸術作へと昇華させる</p>
	  </div>
  </div>
  <div class="contentArea">
    <ul class="fadeUpTrigger">
      <li>
		  <a href="<?php echo home_url('about/'); ?>">
          <h2 class="about">ABOUT</h2>
          <p class="txt">Elevating from Architecture to Artistic Masterpiece</p>
		  </a>
      </li>
      <li>
		  <a href="<?php echo home_url('company/'); ?>">
          <h2 class="company">COMPANY</h2>
          <p class="txt">We have posted the company information for 3A CRAFT WORKS</p>
		  </a>
      </li>
      <li>
		  <a href="<?php echo home_url('works/'); ?>">
          <h2 class="works">WORKS</h2>
          <p class="txt">We will now introduce our past construction projects as examples.</p>
		  </a>
      </li>
      <li>
		  <a href="<?php echo home_url('contact/'); ?>">
          <h2 class="contact">CONTACT</h2>
          <p class="txt">Please feel free to contact us at your convenience.</p>
		  </a>
      </li>
      </ul>
    </div>
</div>
<?php get_footer(); ?>
