]> _ Git - fluidbook-v3.git/commitdiff
WIP #3641 @1.25
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 23 Jun 2020 11:29:24 +0000 (11:29 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 23 Jun 2020 11:29:24 +0000 (11:29 +0000)
framework/application/Bootstrap.php
framework/application/views/helpers/BlogIntro.php
less/610-blog.less

index 77f797bd953deb61ff96315191df2c9d4a9551f4..1585c5edb91d4af2c024d341549265149bf6b5af 100644 (file)
@@ -38,6 +38,13 @@ class Bootstrap extends CubeIT_Bootstrap
         if (!$page) return;
 
         if ($page->getTemplate() === 'blog') {
+
+            // Don't show the Blog link in the main menu for the English locale
+            if ($locale == 'en') {
+                $page->setVisible(false);
+                return;
+            }
+
             $this->addBlogPages($page, $locale, $isAdmin);
         }
     }
index aae2e189b9c9ade2776946d0a42837a681f1c14c..fb5ab2c68ff4b6a4cc0aca6c5442d3a7a001b99a 100644 (file)
@@ -14,9 +14,11 @@ class Fluidbook_View_Helper_BlogIntro extends CubeIT_View_Helper_Abstract {
         if ($is_single) {
             $title = $post->getTitle();
             $title_tag = 'h1';
+            $read_more = '';
         } else {
             $title = $this->link($post->getTitle(), $URL, ['itemprop' => 'url']);
             $title_tag = 'h2';
+            $read_more = $this->link(__('Lire la suite'), $URL, ['class' => 'blog-intro-read-more']);
         }
 
         // Avoid orphaned punctuation in titles
@@ -36,6 +38,7 @@ class Fluidbook_View_Helper_BlogIntro extends CubeIT_View_Helper_Abstract {
         );
         $res .= $this->title($title, $title_tag, ['class' => 'blog-intro-title', 'itemprop' => 'headline']);
         $res .= $this->markupDotclear($post->getExcerpt(), [], ['class' => 'blog-intro-excerpt']);
+        $res .= $read_more;
         $res .= '</div>'; // .col-2
         $res .= '</div>'; // .grid
 
index 30824f25748ccb4bab192f8e77f81f825f3f5c21..e32e9683edb8af70b21533c81eaff1f0320f1ab9 100644 (file)
     }
   }
 
+  &-read-more {
+    .border-button-fill(#fff, #fff, 5%);
+    .longarrow-button(12px, 40px, 18px);
+    margin-top: 1.5em;
+
+    &:hover {
+      color: #fff;
+    }
+  }
+
   .grid {
     width: 100%;
   }