<?php if ( wp_is_mobile() ) : ?>
<?php
$paged =  get_query_var('page');
$my_query = new WP_Query( array(
	'post_type' => 'post',
        'posts_per_page' =>20,
        'paged' => $paged,
         's' => $_GET['s']  ));
if ( $my_query->have_posts() ) : ?>
<ul style="height:auto;">
 <?php while ( $my_query->have_posts() ) : $my_query->the_post();?>
   
<div class="container"
    ><li> <span style="font-size: 8pt;">
      <?php the_time('Y.m.d _ G:i') ?></span> 
<h1 class="entry-title">
<a href="<?php the_permalink(); ?>"target="_blank"><?php echo mb_strimwidth(get_the_title(), 0, 56, "…", "UTF-8"); ?></a>
</h1>
<?php endwhile;endif; ?>
</ul>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(array('query'=>$my_query)); }  ?>
<?php wp_reset_postdata(); ?>
<?php else: ?>
<?php
$paged =  get_query_var('page');
$my_query = new WP_Query( array(
	'post_type' => 'post',
        'posts_per_page' =>40,
        'paged' => $paged,
         's' => $_GET['s']  ));
if ( $my_query->have_posts() ) : ?>
<ul style="height:auto;">
 <?php while ( $my_query->have_posts() ) : $my_query->the_post();?>
   
<div class="container"
    ><li> <span style="font-size: 8pt;">
      <?php the_time('Y.m.d _ G:i') ?></span> 
<h1 class="entry-title">
<a href="<?php the_permalink(); ?>"target="_blank"><?php echo mb_strimwidth(get_the_title(), 0, 70, "…", "UTF-8"); ?></a>
</h1>
<?php endwhile;endif; ?>
</ul>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(array('query'=>$my_query)); }  ?>
<?php wp_reset_postdata(); ?>
<?php endif; ?>