public function indexAction() {
$this->view->headScript()->addScriptAndStyle('610-blog');
+ $this->view->body_class = 'blog-post-single';
//$parent = $this->view->currentPage->getParent();
//$parent_data = $this->getBootstrap()->getCMSDatasOfNavigationPage($parent);
\r
foreach ($posts as $post) {\r
/* @var $post Fluidbook_Model_Blog */\r
- $res .= $this->blogIntro($post, false);\r
+ $res .= $this->htmlElement($this->blogIntro($post, false), 'article', ['itemProp' => 'blogPost']);\r
}\r
\r
return $this->htmlElement($res, 'div', ['class' => 'blog-index']);\r
$title_tag = 'h2';
}
+ // Avoid orphaned punctuation in titles
+ $title = str_replace([' ?', ' :'], [' ?', ' :'], $title);
+
// Blog intro content structure
$res = '<div class="grid">';
$res .= '<div class="blog-intro-content">';
.blog-intro {
display: flex;
align-items: center;
- padding: 0 !important;
+
+ // Extra padding to ensure text doesn't get too close to edges or overlap when under a header
+ // Padding is symmetrical so that vertical centre is not thrown off
+ padding: 144px 0 !important;
+
+ @media @m1280 {
+ padding: 86px 0 !important;
+ }
+ @media @m900 {
+ padding: 96px 0 !important;
+ }
+ @media @m768 {
+ padding: 75px 0 !important;
+ }
+
+ @media @m1024 {
+ min-height: 0 !important; // Reset min-height now that there's no image
+ }
+
+
&.light {
color: #fff;
&-content {
flex-basis: 40%;
+
+ @media @m1280 {
+ flex-basis: 42%;
+ }
+ @media (max-width: 1100px) {
+ flex-basis: 47%;
+ }
+ @media @m1024 {
+ flex-basis: 100%;
+ }
+
+ @media @m900 {
+ text-align: center;
+ }
}
&-date {
color: currentColor !important;
font-size: 60px !important;
+ @media (max-width: 1600px) {
+ font-size: 50px !important;
+ }
+ @media @m1024 {
+ font-size: 40px !important;
+ }
+ @media @m640 {
+ font-size: 30px !important;
+ }
+
&:after {
background-color: currentColor !important;
bottom: 0.7em !important;
font-size: 15px;
line-height: 1.7;
max-width: 550px;
+
+ @media @m1024 {
+ max-width: none;
+ }
+ }
+
+ .grid {
+ width: 100%;
}
.picture {
@media @m1024 {
display: none;
}
+
+ // Make image cover space even when text pushes height out
+ img {
+ left: 0;
+ height: 100% !important;
+ object-fit: cover;
+ object-position: left;
+ }
+
}
}
max-width: 1008px;
width: 100%;
+ @media @m1024 {
+ font-size: 20px;
+ }
+ @media @m900 {
+ font-size: 18px;
+ }
+ @media @m640 {
+ font-size: 16px;
+ }
+
+
> * + * {
margin-top: 1.5em;
}
padding: 1.5em;
font-size: 15px;
+ @media (max-width: 600px) {
+ flex-wrap: wrap;
+ justify-content: center;
+ text-align: center;
+
+ > * + * {
+ padding-top: 0.75em;
+ }
+
+ }
+
&-photo {
+ flex-shrink: 0;
width: 120px;
height: 120px;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
border-radius: 50%;
- margin-right: 1.5em;
+ }
+
+ &-details {
+ margin: 0 1.5em;
}
&-name {
font-family: @heading-font;
font-size: 30px;
+ font-weight: normal;
+ line-height: 1.3;
+ margin-bottom: 0.2em;
}
}