]> _ Git - physioassist-wordpress.git/commitdiff
wait #6564 @1:00
authorsoufiane <soufiane@cubedesigners.com>
Tue, 9 Jan 2024 15:06:44 +0000 (16:06 +0100)
committersoufiane <soufiane@cubedesigners.com>
Tue, 9 Jan 2024 15:06:44 +0000 (16:06 +0100)
wp-content/themes/physioassist/resources/assets/styles/widgets/flux-post-carousel.styl
wp-content/themes/physioassist/resources/functions.php
wp-content/themes/physioassist/resources/views/partials/post.blade.php
wp-content/themes/physioassist/resources/views/widgets/flux-post-carousel.blade.php

index 00c5b62e7521920da706974057504613167e4089..3e2b3acbadf126d03edb3e9f6206600139e1c9bd 100644 (file)
     margin-bottom: 0 !important
     font-weight: 700
     font-size: 14px !important
+    color: #b3b9c6
 
   &-title
     font-weight: 500
     color: #20548c
 
+  &-subtitle
+    font-size: 14px
+    font-style: italic
+    margin-top: 5px
+
   &-item
     margin-bottom: 30px
 
@@ -49,7 +55,7 @@
     text-align: left
 
   .arrow-link
-    margin-top: 10px
+    margin-top: 5px
     font-size: 14px !important
 
   &-download
index 33df8487269da6defce83230045bd72b0f706e75..509e632fd6666ae0ee2f3cfa27363c6151913c2e 100644 (file)
@@ -117,12 +117,7 @@ function flux_posts()
         'category__in' => !empty($catId) ? [$catId] : $categoriesId,
         'order' => 'desc',
     ]);
-
-    var_dump([
-        'posts_per_page' => -1,
-        'category__in' => !empty($catId) ? [$catId] : $categoriesId,
-        'order' => 'desc',
-    ]);
+    $current_language = apply_filters( 'wpml_current_language', NULL );
 
     foreach ($posts as $item) {
         echo template('partials/post', compact('item'));
index af6c7d536d31ac0ea8f39225fc21880e84896c7f..e5933ca6f23a4f5195516a901e79509692fbdf46 100644 (file)
@@ -1,8 +1,12 @@
+@php
+$format = $current_language === "en" ? "Y/m" : "m/Y";
+@endphp
+
 <div class="text-carousel-item flux-post-carousel-item slick-slide">
   <div class="flux-post-carousel-item-content">
-    <p class="flux-post-carousel-date">{!! date('Y/m', strtotime($item->post_date)) !!}</p>
+    <p class="flux-post-carousel-date">{!! date($format, strtotime($item->post_date)) !!}</p>
     <h3 class="flux-post-carousel-title">{{ $item->post_title }}</h3>
     <p class="flux-post-carousel-subtitle">{{ $item->subtitle }}</p>
-    <a href="{{ get_the_permalink($item->id) }}" class="arrow-link">@svg('arrow') {{ __('Read more') }}</a>
+    <a href="{{ get_the_permalink($item->id) }}" class="arrow-link">@svg('arrow') {{ __('Read more', 'sage') }}</a>
   </div>  {{-- .flux-post-carousel-item-content --}}
 </div> {{-- .flux-post-carousel-item --}}
index 6a640d41faee4a9f7276e75275ee8588e677b183..b1ab8e982773379c4e00de456538cca11fc1c46a 100644 (file)
@@ -35,8 +35,7 @@
   ];
 
   $slick = json_encode($settings);
-
-  use function App\template;
+  $current_language = apply_filters( 'wpml_current_language', NULL );
 @endphp
 
 <div class="section-flux-post-carousel">
       {{__($title)}}
     </h2>
   </div>
+  @if($categories)
   <div class="flux-post-carousel-filter">
     <ul class="flux-post-carousel-filter-list">
-      <li class="flux-post-carousel-filter-item elementor-button" data-cat="">{{ __('Tout') }}</li>
+      <li class="flux-post-carousel-filter-item elementor-button" data-cat="">{{ __('All', 'sage') }}</li>
       @foreach($categories as $category)
         <li class="flux-post-carousel-filter-item elementor-button inactive" data-cat="{{ $category->term_id }}">{{ $category->name }}</li>
       @endforeach
     </ul>
   </div>
+  @endif
   <div class="flux-post-carousel elementor-slick-slider" data-slick="{{ $slick }}">
 
     @foreach ($items as $item)