Fix minimalist mode for chapter list shortcode

This commit is contained in:
Tetrakern 2024-03-05 11:38:17 +01:00
parent 0abc6c9c91
commit 380052849d
4 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -838,7 +838,7 @@ function fictioneer_shortcode_chapter_list_empty( $attr ) {
ob_start();
// Start HTML ---> ?>
<div class="chapter-group">
<div class="chapter-group chapter-list _standalone _empty">
<?php if ( ! empty( $attr['heading'] ) ) : ?>
<button class="chapter-group__name" aria-label="<?php echo esc_attr( sprintf( __( 'Toggle chapter group: %s', 'fictioneer' ), $attr['heading'] ) ); ?>" tabindex="0">
<i class="fa-solid fa-chevron-down chapter-group__heading-icon"></i>
@ -965,7 +965,7 @@ function fictioneer_shortcode_chapter_list( $attr ) {
ob_start();
// Start HTML ---> ?>
<div class="chapter-group <?php echo $classes; ?>">
<div class="chapter-group chapter-list _standalone <?php echo $classes; ?>">
<?php if ( $heading ) : ?>
<button class="chapter-group__name" aria-label="<?php echo esc_attr( sprintf( __( 'Toggle chapter group: %s', 'fictioneer' ), $heading ) ); ?>" tabindex="0">
<i class="fa-solid fa-chevron-down chapter-group__heading-icon"></i>

View File

@ -59,12 +59,12 @@
}
}
[data-view=list] .chapter-group__list-item-link {
:is([data-view=list], .chapter-list) .chapter-group__list-item-link {
grid-area: 1 / 1 / 2 / 3;
padding-left: 8px;
}
[data-view=list] .chapter-group__list-item-subrow {
:is([data-view=list], .chapter-list) .chapter-group__list-item-subrow {
grid-area: 2 / 1 / 3 / 3;
padding-left: 8px;
}