Skip to content

Commit

Permalink
Added support for hiding page title and feature image (#262)
Browse files Browse the repository at this point in the history
* Added support for hiding page title and feature image

Refs TryGhost/Product#3568
  • Loading branch information
sanne-san authored Jul 31, 2023
1 parent 77ed5d2 commit 15402eb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion assets/built/screen.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/built/screen.css.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion assets/css/blog/article.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.gh-article {
margin-top: 64px;
margin-top: 50px;
}

.page-template .gh-article {
margin-top: 0;
}

.gh-article-meta {
Expand Down
4 changes: 4 additions & 0 deletions assets/css/site/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
padding-bottom: 30px;
}

.page-template .site-content {
padding-block: 0;
}

@media (min-width: 992px) {
.related-column {
order: 1;
Expand Down
16 changes: 9 additions & 7 deletions page.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
{{#post}}
<article class="gh-article {{post_class}}">

<header class="gh-article-header gh-canvas">
<h1 class="gh-article-title">{{title}}</h1>
{{#match @page.show_title_and_feature_image}}
<header class="gh-article-header gh-canvas">
<h1 class="gh-article-title">{{title}}</h1>

{{#if custom_excerpt}}
<p class="gh-article-excerpt">{{custom_excerpt}}</p>
{{/if}}
{{#if custom_excerpt}}
<p class="gh-article-excerpt">{{custom_excerpt}}</p>
{{/if}}

{{> "post-image"}}
</header>
{{> "post-image"}}
</header>
{{/match}}

<div class="gh-content gh-canvas">
{{content}}
Expand Down

0 comments on commit 15402eb

Please sign in to comment.