Skip to content

Commit 07037db

Browse files
committed
Further tweaks
1 parent 6d5811d commit 07037db

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

includes/Renderer/Stories/Carousel_Renderer.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public function load_assets(): void {
6767
parent::load_assets();
6868

6969
$this->assets->register_script_asset( self::SCRIPT_HANDLE, [], false );
70-
$this->assets->register_style_asset( self::SCRIPT_HANDLE );
7170

7271
wp_localize_script(
7372
self::SCRIPT_HANDLE,
@@ -103,9 +102,10 @@ class="web-stories-list__inner-wrapper <?php echo esc_attr( 'carousel-' . $this-
103102
style="<?php echo esc_attr( $container_styles ); ?>"
104103
>
105104
<?php
105+
$this->maybe_render_archive_link();
106+
106107
if ( ! $this->context->is_amp() ) {
107108
$this->assets->enqueue_script( self::SCRIPT_HANDLE );
108-
$this->assets->enqueue_style( self::SCRIPT_HANDLE );
109109
?>
110110
<div
111111
class="web-stories-list__carousel <?php echo esc_attr( $this->get_view_type() ); ?>"
@@ -148,7 +148,6 @@ function () {
148148
</amp-carousel>
149149
<?php
150150
}
151-
$this->maybe_render_archive_link();
152151
?>
153152
</div>
154153
</div>

packages/stories-block/src/css/views/carousel.css

+8-4
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,19 @@
3131
}
3232

3333
.web-stories-list.is-carousel .web-stories-list__archive-link {
34-
position: absolute;
35-
right: 0;
36-
top: -35px;
34+
text-align: right;
35+
margin-bottom: 5px;
3736
}
3837

3938
.web-stories-theme-header-section
4039
.web-stories-list.is-carousel
4140
.web-stories-list__archive-link {
42-
right: 10px;
41+
margin-right: 10px;
42+
}
43+
44+
.web-stories-list.is-carousel .web-stories-list__carousel:not(.glider) ~ .glider-next,
45+
.web-stories-list.is-carousel .web-stories-list__carousel:not(.glider) ~ .glider-prev {
46+
display: none;
4347
}
4448

4549
.web-stories-list.is-carousel .glider-next,

0 commit comments

Comments
 (0)