diff --git a/less/main.less b/less/main.less index d0cd863..21359c1 100644 --- a/less/main.less +++ b/less/main.less @@ -112,6 +112,12 @@ a:hover { margin-bottom: 0; } +.list-card-date { + margin-top: 0; + margin-bottom: 0; + display: block; +} + .gmap { position: relative; padding-bottom: 75%; diff --git a/page-list-2016.php b/page-list-2016.php index 52c5e16..7d48cde 100644 --- a/page-list-2016.php +++ b/page-list-2016.php @@ -4,6 +4,7 @@

+ 小さい画面用のページはこちら
@@ -17,79 +18,75 @@ array( - 'start_date' => array( - 'key' => 'startDate', - 'value' => array( '2016/01/01', '2016/12/31' ), - 'compare' => 'BETWEEN', - 'type' => 'DATE' - ), - 'address' => array( - 'key' => 'address', - 'type' => 'CHAR', - ) - ), - 'post_type' => 'post', - 'order' => 'ASC', - 'orderby' => 'address', - 'nopaging' => true, - ); - $posts = query_posts( $args ); - $tmp = array(); - foreach ( $posts as $post ) { - if ( in_array( get_field( 'schoolName' ), $tmp ) ) { - continue; - } - ?> - - - - - + + + + - - + + +
- - ' . get_sub_field( 'public_open_day' ) . ' ' . get_sub_field( 'public_open_start_time' ) . ' ~ ' . get_sub_field( 'public_open_end_time' ) . '

'; - elseif ( get_sub_field( 'public_open_day' ) ): - echo '

' . get_sub_field( 'public_open_day' ) . '

'; + $args = [ + 'meta_query' => [ + 'start_date' => [ + 'key' => 'startDate', + 'value' => [ '2016/01/01', '2016/12/31' ], + 'compare' => 'BETWEEN', + 'type' => 'DATE' + ], + 'address' => [ + 'key' => 'address', + 'type' => 'CHAR', + ] + ], + 'post_type' => 'post', + 'order' => 'ASC', + 'orderby' => 'address', + 'nopaging' => true, + ]; + $posts = query_posts( $args ); + $tmp = [ ]; + foreach ( $posts as $post ) { + if ( in_array( get_field( 'schoolName' ), $tmp ) ) { + continue; + } + ?> +
+ + ' . get_sub_field( 'public_open_day' ) . ' ' . get_sub_field( 'public_open_start_time' ) . ' ~ ' . get_sub_field( 'public_open_end_time' ) . '

'; + elseif ( get_sub_field( 'public_open_day' ) ): + echo '

' . get_sub_field( 'public_open_day' ) . '

'; + else: + endif; + endwhile; + elseif ( get_field( 'public_unknown' ) ): + echo '

不明

'; + elseif ( get_field( 'publicStartDate' ) and get_field( 'publicEndDate' ) ): + echo '

' . get_field( 'publicStartDate' ) . ' ~ ' . get_field( 'publicEndDate' ) . '

'; + elseif ( get_field( 'publicStartDate' ) and !get_field( 'publicEndDate' ) ): + echo '

' . get_field( 'publicStartDate' ) . '

'; + elseif ( !get_field( 'publicStartDate' ) and !get_field( 'publicEndDate' ) ): + echo '

なし

'; else: - + echo '

不明

'; endif; - endwhile; - - elseif ( get_field( 'public_unknown' ) ): - echo '

不明

'; - elseif ( get_field( 'publicStartDate' ) and get_field( 'publicEndDate' ) ): - echo '

' . get_field( 'publicStartDate' ) . ' ~ ' . get_field( 'publicEndDate' ) . '

'; - elseif ( get_field( 'publicStartDate' ) and !get_field( 'publicEndDate' ) ): - echo '

' . get_field( 'publicStartDate' ) . '

'; - elseif ( !get_field( 'publicStartDate' ) and !get_field( 'publicEndDate' ) ): - echo '

なし

'; - else: - echo '

不明

'; - endif; - ?> -
diff --git a/page-sp-list-2016.php b/page-sp-list-2016.php new file mode 100644 index 0000000..60194bd --- /dev/null +++ b/page-sp-list-2016.php @@ -0,0 +1,96 @@ + +
+
+
+
+

+ [ + 'start_date' => [ + 'key' => 'startDate', + 'value' => [ '2016/01/01', '2016/12/31' ], + 'compare' => 'BETWEEN', + 'type' => 'DATE' + ], + 'address' => [ + 'key' => 'address', + 'type' => 'CHAR', + ] + ], + 'post_type' => 'post', + 'order' => 'ASC', + 'orderby' => 'address', + 'nopaging' => true, + ]; + $posts = query_posts( $args ); + $school_name_tmp = [ ]; + ?> + +
+

+ +

+

+
+

+ 開催期間 + +  ~  + + + + 不明 + +

+

+ 一般公開 + + 不明 + '; + echo get_sub_field( 'public_open_day' ) . ' ' . get_sub_field( 'public_open_start_time' ) . ' ~ ' . get_sub_field( 'public_open_end_time' ); + echo ''; + elseif ( get_sub_field( 'public_open_day' ) ): ?> + + '; + echo get_field( 'publicStartDate' ) . ' ~ ' . get_field( 'publicEndDate' ); + echo ''; + elseif ( get_field( 'publicStartDate' ) and !get_field( 'publicEndDate' ) ): + echo ''; + echo get_field( 'publicStartDate' ); + echo ''; + elseif ( !have_rows( 'public_open' ) and !get_field( 'publicStartDate' ) and !get_field( 'publicEndDate' ) ): ?> + なし + '; + endif; + $tmp[] = get_field( 'schoolName' ); + ?> +

+
+ +
+
+
+
+ diff --git a/style.css b/style.css index 3e5ff97..87abbf1 100644 --- a/style.css +++ b/style.css @@ -7,7 +7,7 @@ Author: Sugiyama Masato Author URI: http://bunkasai.nagano.jp License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html -Version: 2016.0708 +Version: 2016.0709 ---------------------------------------------------------*/ html { position: relative; @@ -99,6 +99,11 @@ a:hover { margin-top: 0; margin-bottom: 0; } +.list-card-date { + margin-top: 0; + margin-bottom: 0; + display: block; +} .gmap { position: relative; padding-bottom: 75%; diff --git a/style.less b/style.less index 52d6112..4676f33 100644 --- a/style.less +++ b/style.less @@ -7,7 +7,7 @@ Author: Sugiyama Masato Author URI: http://bunkasai.nagano.jp License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html -Version: 2016.0708 +Version: 2016.0709 ---------------------------------------------------------*/ @import "less/main.less";