Add scroll-margin-top
This commit is contained in:
parent
5c6356346d
commit
431b3cfc2d
@ -177,7 +177,7 @@ $tabs[ $current_tab ]['classes'][] = '_current';
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="tabs" class="author-page__tabs tabs-wrapper spacing-top">
|
||||
<section id="tabs" class="scroll-margin-top author-page__tabs tabs-wrapper spacing-top">
|
||||
<div class="tabs">
|
||||
<?php foreach ( $tabs as $key => $value ) : ?>
|
||||
<a
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1421,7 +1421,7 @@ function fictioneer_shortcode_blog( $attr ) {
|
||||
|
||||
if ( $blog_query->have_posts() ) {
|
||||
// Start HTML ---> ?>
|
||||
<section class="blog-posts _nested <?php echo $args['classes']; ?>" id="blog">
|
||||
<section id="blog" class="scroll-margin-top blog-posts _nested <?php echo $args['classes']; ?>">
|
||||
<?php
|
||||
while ( $blog_query->have_posts() ) {
|
||||
$blog_query->the_post();
|
||||
|
@ -23,7 +23,7 @@
|
||||
function fictioneer_chapters_list( $args ) {
|
||||
// Start HTML ---> ?>
|
||||
<section class="chapters__list spacing-top">
|
||||
<ul class="card-list" id="list-of-chapters">
|
||||
<ul id="list-of-chapters" class="scroll-margin-top card-list">
|
||||
|
||||
<?php if ( $args['chapters']->have_posts() ) : ?>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
function fictioneer_collections_list( $args ) {
|
||||
// Start HTML ---> ?>
|
||||
<section class="collections__list spacing-top">
|
||||
<ul class="card-list" id="list-of-collections">
|
||||
<ul id="list-of-collections" class="scroll-margin-top card-list">
|
||||
|
||||
<?php if ( $args['collections']->have_posts() ) : ?>
|
||||
|
||||
@ -174,7 +174,7 @@ function fictioneer_collection_featured_list( $args ) {
|
||||
|
||||
// Start HTML ---> ?>
|
||||
<section class="collection__list spacing-top">
|
||||
<ul id="featured-list" class="card-list">
|
||||
<ul id="featured-list" class="scroll-margin-top card-list">
|
||||
<?php
|
||||
// Render cards...
|
||||
if ( $args['featured_query']->have_posts() ) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
function fictioneer_recommendations_list( $args ) {
|
||||
// Start HTML ---> ?>
|
||||
<section class="recommendations__list spacing-top">
|
||||
<ul class="card-list" id="list-of-recommendations">
|
||||
<ul id="list-of-recommendations" class="scroll-margin-top card-list">
|
||||
|
||||
<?php if ( $args['recommendations']->have_posts() ) : ?>
|
||||
|
||||
|
@ -90,7 +90,7 @@ add_action( 'fictioneer_stories_after_content', 'fictioneer_stories_statistics',
|
||||
function fictioneer_stories_list( $args ) {
|
||||
// Start HTML ---> ?>
|
||||
<section class="stories__list spacing-top">
|
||||
<ul class="card-list" id="list-of-stories">
|
||||
<ul id="list-of-stories" class="scroll-margin-top card-list">
|
||||
|
||||
<?php if ( $args['stories']->have_posts() ) : ?>
|
||||
|
||||
|
@ -45,7 +45,7 @@ $hook_args = array(
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<section class="archive__posts">
|
||||
<ul class="card-list _no-mutation-observer" id="archive-list">
|
||||
<ul id="archive-list" class="scroll-margin-top card-list _no-mutation-observer">
|
||||
<?php
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
@ -96,9 +96,9 @@ $hook_args = array(
|
||||
<?php else : ?>
|
||||
|
||||
<section class="archive__posts">
|
||||
<ul class="card-list _no-mutation-observer" id="archive-list">
|
||||
<ul id="archive-list" class="scroll-margin-top card-list _no-mutation-observer">
|
||||
<li class="no-results">
|
||||
<span><?php _e( 'No matching posts found.', 'fictioneer' ) ?></span>
|
||||
<span><?php _e( 'No matching posts found.', 'fictioneer' ); ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
@ -104,17 +104,21 @@ $query = fictioneer_shortcode_query( $query_args );
|
||||
// Remove temporary filters
|
||||
remove_filter( 'posts_where', 'fictioneer_exclude_protected_posts' );
|
||||
|
||||
// Unique ID
|
||||
$unique_id = wp_unique_id( 'article-block-' );
|
||||
|
||||
// Pagination
|
||||
$pag_args = array(
|
||||
'current' => max( 1, $args['page'] ),
|
||||
'total' => $query->max_num_pages,
|
||||
'prev_text' => fcntr( 'previous' ),
|
||||
'next_text' => fcntr( 'next' )
|
||||
'next_text' => fcntr( 'next' ),
|
||||
'add_fragment' => "#{$unique_id}"
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<section class="article-card-block <?php echo esc_attr( $args['classes'] ); ?>">
|
||||
<section id="<?php echo $unique_id; ?>" class="scroll-margin-top article-card-block <?php echo esc_attr( $args['classes'] ); ?>">
|
||||
|
||||
<?php if ( $query->have_posts() ) : ?>
|
||||
|
||||
|
@ -104,7 +104,7 @@ $hook_args = array(
|
||||
|
||||
<?php if ( have_posts() && ! $no_params ) : ?>
|
||||
<section class="search-results__content">
|
||||
<ul class="card-list _no-mutation-observer" id="search-result-list">
|
||||
<ul id="search-result-list" class="scroll-margin-top card-list _no-mutation-observer">
|
||||
<?php
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
|
@ -125,7 +125,7 @@ $tabs[ $current_tab ]['classes'][] = '_current';
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( count( $tabs ) > 1 ) : ?>
|
||||
<section id="tabs" class="bookshelf__tabs tabs-wrapper spacing-top">
|
||||
<section id="tabs" class="scroll-margin-top bookshelf__tabs tabs-wrapper spacing-top">
|
||||
<div class="tabs">
|
||||
<?php foreach ( $tabs as $key => $value ) : ?>
|
||||
<a href="<?php echo esc_url( add_query_arg( array( 'tab' => $key, 'order' => $order ), $current_url ) . '#main'); ?>" class="tabs__item <?php echo implode( ' ', $value['classes'] )?>"><?php
|
||||
|
@ -332,3 +332,7 @@ html:not(.logged-in) body:not(.logged-in) .hide-if-logged-out,
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-margin-top {
|
||||
scroll-margin-top: 48px;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user