<?php /* Template name: home */ get_header(); ?>

  <?php if ( have_posts() ) : ?>  
  <div id="mainimg">
    <div class="inner-content">
      <img src="<?php the_field('mainimg',$post->ID); ?>" />
    </div>
  </div>

  <div id="contents" class="inner-content">
  
  <?php if(qtranxf_getLanguage()=='ja'):?>
    <?php the_field('bnrarea_33',$post->ID); ?>
  <?php elseif(qtranxf_getLanguage()=='en'):?>
    <?php the_field('bnrarea_33_en',$post->ID); ?>
  <?php endif;?>
  
  <div id="main" class="content-area">

	<?php if(qtranxf_getLanguage()=='ja'):?>
    <?php the_field('bnrarea_21',$post->ID); ?>
  <?php elseif(qtranxf_getLanguage()=='en'):?>
    <?php the_field('bnrarea_21_en',$post->ID); ?>
  <?php endif;?>
        
        <div id="home-youtube">
        <?php the_field('youtube',$post->ID); ?>
        </div>

        <div id="info_area">
        <h2><?php if(qtranxf_getLanguage()=='ja'):?>新着情報<?php elseif(qtranxf_getLanguage()=='en'):?>Information<?php endif;?></h2>
		<ul>
		<?php $args = array(
              'numberposts' => 4,
              'post_type' => 'info'
          );
          $customPosts = get_posts($args);
          if($customPosts) : foreach($customPosts as $post) : setup_postdata( $post ); ?>
          <li>
            <span class="date">
			<?php if(qtranxf_getLanguage()=='ja'):?>
			  <?php the_time('Y年m月d日') ?>
			<?php elseif(qtranxf_getLanguage()=='en'):?>
			  <?php the_time('Y, M d') ?>
			<?php endif;?>
            </span>
            <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
          </li>   
        <?php endforeach; ?>
        </ul>
        <?php endif; wp_reset_query(); ?>
        </div>

        <div id="event_area">
        <h2><?php if(qtranxf_getLanguage()=='ja'):?>イベント<?php elseif(qtranxf_getLanguage()=='en'):?>Upcoming Events<?php endif;?></h2>
        <ul>
		<?php $args = array(
              'numberposts' => 4,
              'post_type' => 'event'
          );
          $customPosts = get_posts($args);
          if($customPosts) : foreach($customPosts as $post) : setup_postdata( $post ); ?>
          <li>
            <span class="date">
			<?php if(qtranxf_getLanguage()=='ja'):?>
			  <?php the_time('Y年m月d日') ?>
			<?php elseif(qtranxf_getLanguage()=='en'):?>
			  <?php the_time('Y, M d') ?>
			<?php endif;?>
            </span>
            <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
          </li>   
        <?php endforeach; ?>
        </ul>
        <?php endif; wp_reset_query(); ?>
        </div>
        
	</div>
    <!-- // main -->
  <?php endif; ?>
  <?php get_sidebar(); ?>
  </div>
  <!-- // contents -->

<?php get_footer(); ?>

.wp-cf7-title
{
font-size: 24px;
margin-top: 50px;
width: 37%;
float: left;
}
.wp-cf7-text-design
{
font-size: 16px;
background-color: #f7f7f7;
color: #000000;
margin-top:  -24px;
margin-left: 140px;
width: 63%;
border-radius: 0;
}
.wp-cf7-button
{
clear:both;
padding-top: 30px;
text-align: center;
}
span.wp-cf7-icon
{
background-color: #A4A4A4;
color: #ffffff;
border-radius: 3px;
font-size: 12px;
margin-left: 12px;
padding: 2px 4px;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"]
{
  width: 50%;     
  height: 24px;  
  margin-left:   140px; 
  margin-top:    -24px;
  margin-bottom:  50px;
  background-color; #fff;
  color: #333;
  border: 1px solid #ddd;
  font-size: 100%;
  padding: 0.5em;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,.1) inset;
}  
.wpcf7 input[type="submit"]{
  	font-size: 100%;
    padding: 0.2em 0.4em;
  	background: #eee;
  	color: #333;
  	border-radius: 4px;
  	cursor: pointer;
  	box-shadow: 0 0 1px rgba(0,0,0,.2);
  	border: 1px solid #ccc;
  	text-shadow: -1px 1px 0 rgba(255,255,255,1);
}

.entry-content table{
  border: 1px solid #EDEDED;
}