diff --git a/css/oik-themes.css b/css/oik-themes.css index 006b2f2..0bde9f9 100644 --- a/css/oik-themes.css +++ b/css/oik-themes.css @@ -1,4 +1,4 @@ -/* (C) Copyright Bobbing Wide 2015, 2016 */ +/* (C) Copyright Bobbing Wide 2015, 2016, 2022 */ /* Styling for the output of oik-themes to be similar to wordpress.org for the TwentyTwelve theme and different for Genesis based themes */ @@ -57,4 +57,8 @@ div.theme-info:after { clear: left; } } +.bw_accordion_item pre { + overflow: auto; + font-size: 0.8em; +} diff --git a/includes/class-oik-themes-content.php b/includes/class-oik-themes-content.php index 44fe054..b8e8042 100644 --- a/includes/class-oik-themes-content.php +++ b/includes/class-oik-themes-content.php @@ -713,11 +713,11 @@ function list_files($files) { } function accordion( $files, $type ) { - oik_require( "shortcodes/oik-jquery.php" ); - bw_jquery_enqueue_script( "jquery-ui-accordion" ); - bw_jquery_enqueue_style( "jquery-ui-accordion" ); + //oik_require( "shortcodes/oik-jquery.php" ); + //bw_jquery_enqueue_script( "jquery-ui-accordion" ); + //bw_jquery_enqueue_style( "jquery-ui-accordion" ); $selector = $this->bw_accordion_id(); - bw_jquery( "#$selector", "accordion", '{ heightStyle: "content"}' ); + //bw_jquery( "#$selector", "accordion", '{ heightStyle: "content"}' ); $class = "bw_accordion"; sdiv( $class, $selector ); @@ -730,23 +730,25 @@ function accordion( $files, $type ) { return bw_ret(); } - function format_accordion( $file, $type=null ) { - //bw_format_accordion() - h3( basename( $file ) ); - $contents = file_get_contents( $file ); - $contents = str_replace( '[', '[', $contents); - //bw_geshi_it() - sdiv(); - if ( 'patterns' === $type ) { - $this->preview_pattern($file, $contents); - } - stag( 'pre', 'pattern'); - e( esc_html( $contents )); - etag( 'pre'); - - ediv(); - - + function format_accordion( $file, $type=null ) { + sdiv('bw_accordion_item'); + stag('details'); + stag('summary'); + e(basename($file)); + etag('summary'); + $contents = file_get_contents($file); + $contents = str_replace('[', '[', $contents); + //bw_geshi_it() + sdiv(); + if ('patterns' === $type) { + $this->preview_pattern($file, $contents); + } + stag('pre', 'pattern'); + e(esc_html($contents)); + etag('pre'); + ediv(); + etag('details'); + ediv(); } function preview_pattern( $file, $contents ) {