First steps to upgrade to Ghost 3

This commit is contained in:
Eduardo Gomez 2020-02-25 17:10:57 +01:00
parent af3f6cf8d9
commit 74f5ba8577
10 changed files with 317 additions and 321 deletions

View file

@ -9,58 +9,58 @@ into the {body} of the default.hbs template --}}
<div class="main-wrap"> <div class="main-wrap">
{{!-- Everything inside the #author tags pulls data from the author --}} {{!-- Everything inside the #author tags pulls data from the author --}}
{{#author}} {{#author}}
{{!-- Special header.hbs partial to generate the <header> tag --}} {{!-- Special header.hbs partial to generate the <header> tag --}}
{{> header background=cover_image}} {{> header background=cover_image}}
{{!-- Inject styles of the hero image to make it responsive --}} {{!-- Inject styles of the hero image to make it responsive --}}
{{> hero background=cover_image}} {{> hero background=cover_image}}
<div class="m-hero__content" data-aos="fade-down"> <div class="m-hero__content" data-aos="fade-down">
{{#if profile_image}} {{#if profile_image}}
<div class="m-hero-avatar" style="background-image: url({{profile_image}});"></div> <div class="m-hero-avatar" style="background-image: url({{profile_image}});"></div>
{{else}} {{else}}
<div class="m-hero-avatar" style="background-image: url({{asset "images/default-avatar-square-normal.jpg"}});"></div> <div class="m-hero-avatar" style="background-image: url({{asset "images/default-avatar-square-normal.jpg"}});"></div>
{{/if}}
<h1 class="m-hero-title">{{name}}</h1>
{{#if bio}}
<p class="m-hero-description">{{bio}}</p>
{{/if}}
<div class="m-hero__meta">
{{#has any="twitter, facebook, website"}}
<ul class="m-hero-social">
{{#if website}}
<li>
<a href="{{website}}" target="_blank" rel="noopener" aria-label="Website">
<span class="icon-globe"></span>
</a>
</li>
{{/if}} {{/if}}
{{#if facebook}} <h1 class="m-hero-title">{{name}}</h1>
<li> {{#if bio}}
<a href="https://facebook.com/{{facebook}}" target="_blank" rel="noopener" aria-label="Facebook"> <p class="m-hero-description">{{bio}}</p>
<span class="icon-facebook"></span>
</a>
</li>
{{/if}} {{/if}}
{{#if twitter}} <div class="m-hero__meta">
<li> {{#has any="twitter, facebook, website"}}
<a href="https://twitter.com/{{twitter}}" target="_blank" rel="noopener" aria-label="Twitter"> <ul class="m-hero-social">
<span class="icon-twitter"></span> {{#if website}}
</a> <li>
</li> <a href="{{website}}" target="_blank" rel="noopener" aria-label="Website">
{{/if}} <span class="icon-globe"></span>
</ul> </a>
{{/has}} </li>
<ul class="m-hero-stats"> {{/if}}
<li> {{#if facebook}}
{{plural ../pagination.total empty=(t "No posts") singular=(t "1 post") plural=(t "% posts")}} <li>
</li> <a href="https://facebook.com/{{facebook}}" target="_blank" rel="noopener" aria-label="Facebook">
{{#if location}} <span class="icon-facebook"></span>
<li>&bull;</li> </a>
<li>{{location}}</li> </li>
{{/if}} {{/if}}
</ul> {{#if twitter}}
</div> <li>
</div> <a href="https://twitter.com/{{twitter}}" target="_blank" rel="noopener" aria-label="Twitter">
</section> <span class="icon-twitter"></span>
</a>
</li>
{{/if}}
</ul>
{{/has}}
<ul class="m-hero-stats">
<li>
{{plural ../pagination.total empty=(t "No posts") singular=(t "1 post") plural=(t "% posts")}}
</li>
{{#if location}}
<li>&bull;</li>
<li>{{location}}</li>
{{/if}}
</ul>
</div>
</div>
</section>
{{/author}} {{/author}}
<main> <main>

View file

@ -15,10 +15,10 @@ into the {body} of the default.hbs template --}}
<div class="m-hero__content" data-aos="fade-down"> <div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{@site.title}}</h1> <h1 class="m-hero-title bigger">{{@site.title}}</h1>
{{#if @site.description}} {{#if @site.description}}
<p class="m-hero-description bigger">{{@site.description}}</p> <p class="m-hero-description bigger">{{@site.description}}</p>
{{/if}} {{/if}}
{{#if @labs.subscribers}} {{#if @labs.subscribers}}
<a href="{{@site.url}}/subscribe" class="m-button filled">{{t "Subscribe"}}</a> <a href="{{@site.url}}/subscribe" class="m-button filled">{{t "Subscribe"}}</a>
{{/if}} {{/if}}
</div> </div>
</section> </section>
@ -28,53 +28,49 @@ into the {body} of the default.hbs template --}}
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300"> <div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
<div class="l-grid centered"> <div class="l-grid centered">
{{#get "posts" filter="featured:true" include="authors,tags" limit="5" as |featured|}} {{#get "posts" filter="featured:true" include="authors,tags" limit="5" as |featured|}}
{{#if featured}} {{#if featured}}
<div class="m-featured-slider"> <div class="m-featured-slider">
<div class="m-featured-slider__list js-featured-articles"> <div class="m-featured-slider__list js-featured-articles">
{{#foreach featured}} {{#foreach featured}}
<div class="m-featured-slider__list__item"> <div class="m-featured-slider__list__item">
{{#if feature_image}} <article class="m-featured-article {{#unless feature_image}}no-picture{{/unless}}">
<article class="m-featured-article"> <div class="m-featured-article__picture">
{{else}} {{#if feature_image}}
<article class="m-featured-article no-picture"> <div class="lozad no-fade-animation" data-background-image="{{img_url feature_image size="l"}}"></div>
{{/if}} {{/if}}
<div class="m-featured-article__picture"> </div>
{{#if feature_image}} <div class="m-featured-article__meta">
<div class="lozad no-fade-animation" data-background-image="{{img_url feature_image size="l"}}"></div> <a href="{{primary_author.url}}" class="m-featured-article__author js-tooltip" aria-label="Authors" data-tippy-content="{{t "Posted by"}} {{primary_author.name}} {{authors autolink="false" from="2" prefix=(t "Among with") separator=" , "}}">
{{/if}} {{#if primary_author.profile_image}}
<div style="background-image: url({{img_url primary_author.profile_image size="xs"}});"></div>
{{else}}
<div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div>
{{/if}}
</a>
{{#if primary_tag}}
<a href="{{primary_tag.url}}" class="m-featured-article__tag">{{primary_tag.name}}</a>
{{/if}}
</div>
<div class="m-featured-article__ribbon">
<span class="icon-star"></span>
<span>{{t "Featured"}}</span>
</div>
<a href="{{url}}" class="m-featured-article__content">
<h1 class="m-featured-article__title js-featured-article-title" title="{{title}}">
{{title}}
</h1>
<div class="m-featured-article__timestamp">
<span>{{date published_at timeago="true"}}</span>
<span>&bull;</span>
<span>{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}</span>
</div>
</a>
</article>
</div> </div>
<div class="m-featured-article__meta"> {{/foreach}}
<a href="{{primary_author.url}}" class="m-featured-article__author js-tooltip" aria-label="Authors" data-tippy-content="{{t "Posted by"}} {{primary_author.name}} {{authors autolink="false" from="2" prefix=(t "Among with") separator=" , "}}"> </div>
{{#if primary_author.profile_image}}
<div style="background-image: url({{img_url primary_author.profile_image size="xs"}});"></div>
{{else}}
<div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div>
{{/if}}
</a>
{{#if primary_tag}}
<a href="{{primary_tag.url}}" class="m-featured-article__tag">{{primary_tag.name}}</a>
{{/if}}
</div>
<div class="m-featured-article__ribbon">
<span class="icon-star"></span>
<span>{{t "Featured"}}</span>
</div>
<a href="{{url}}" class="m-featured-article__content">
<h1 class="m-featured-article__title js-featured-article-title" title="{{title}}">
{{title}}
</h1>
<div class="m-featured-article__timestamp">
<span>{{date published_at timeago="true"}}</span>
<span>&bull;</span>
<span>{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}</span>
</div>
</a>
</article>
</div> </div>
{{/foreach}} {{/if}}
</div>
</div>
{{/if}}
{{/get}} {{/get}}
{{!-- The tag below iterates over all the posts --}} {{!-- The tag below iterates over all the posts --}}
{{> "loop"}} {{> "loop"}}

View file

@ -30,8 +30,8 @@
"demo": "https://liebling.eduardogomez.io", "demo": "https://liebling.eduardogomez.io",
"description": "Beautiful and clean theme that is easy and comfortable to use.", "description": "Beautiful and clean theme that is easy and comfortable to use.",
"engines": { "engines": {
"ghost": ">=2.0.0", "ghost": ">=3.0.0",
"ghost-api": "v2" "ghost-api": "v3"
}, },
"gpm": { "gpm": {
"type": "theme", "type": "theme",
@ -54,5 +54,5 @@
"desktop": "assets/screenshot-desktop.jpg", "desktop": "assets/screenshot-desktop.jpg",
"mobile": "assets/screenshot-mobile.jpg" "mobile": "assets/screenshot-mobile.jpg"
}, },
"version": "0.6.5" "version": "0.6.6"
} }

View file

@ -16,7 +16,7 @@ into the {body} of the default.hbs template --}}
<div class="m-hero__content" data-aos="fade-down"> <div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{title}}</h1> <h1 class="m-hero-title bigger">{{title}}</h1>
{{#if custom_excerpt}} {{#if custom_excerpt}}
<p class="m-hero-description">{{custom_excerpt}}</p> <p class="m-hero-description">{{custom_excerpt}}</p>
{{/if}} {{/if}}
</div> </div>
</section> </section>
@ -24,59 +24,59 @@ into the {body} of the default.hbs template --}}
<div class="l-content"> <div class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300"> <div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
{{#get 'authors' limit='all' include='count.posts' order='count.posts desc'}} {{#get 'authors' limit='all' include='count.posts' order='count.posts desc'}}
<div class="l-grid centered"> <div class="l-grid centered">
{{#foreach authors}} {{#foreach authors}}
<article class="m-article-card as-author"> <article class="m-article-card as-author">
{{#if profile_image}} {{#if profile_image}}
<div class="m-article-card__picture lozad" data-background-image="{{img_url profile_image size="m"}}"> <div class="m-article-card__picture lozad" data-background-image="{{img_url profile_image size="m"}}">
{{else}} {{else}}
<div class="m-article-card__picture lozad" data-background-image="{{asset "images/default-avatar-rectangle.jpg"}}"> <div class="m-article-card__picture lozad" data-background-image="{{asset "images/default-avatar-rectangle.jpg"}}">
{{/if}} {{/if}}
<a href="{{url}}" class="m-article-card__picture-link" aria-label="Author"></a> <a href="{{url}}" class="m-article-card__picture-link" aria-label="Author"></a>
<h3 class="m-article-card__name">{{name}}</h3> <h3 class="m-article-card__name">{{name}}</h3>
</div>
<div class="m-article-card__info">
<a href="{{url}}" class="m-article-card__info-link">
{{#if bio}}
<p class="m-article-card__excerpt js-article-card-title">
{{bio}}
</p>
{{/if}}
</a>
<div class="m-article-card__author-stats">
<span>
{{plural count.posts empty=(t "No posts") singular=(t "1 post") plural=(t "% posts")}}
</span>
{{#has any="twitter, facebook, website"}}
<ul class="m-article-card__social">
{{#if website}}
<li>
<a href="{{website}}" target="_blank" rel="noopener">
<span class="icon-globe"></span>
</a>
</li>
{{/if}}
{{#if facebook}}
<li>
<a href="https://facebook.com/{{facebook}}" target="_blank" rel="noopener">
<span class="icon-facebook"></span>
</a>
</li>
{{/if}}
{{#if twitter}}
<li>
<a href="https://twitter.com/{{twitter}}" target="_blank" rel="noopener">
<span class="icon-twitter"></span>
</a>
</li>
{{/if}}
</ul>
{{/has}}
</div> </div>
</div> <div class="m-article-card__info">
</article> <a href="{{url}}" class="m-article-card__info-link">
{{/foreach}} {{#if bio}}
</div> <p class="m-article-card__excerpt js-article-card-title">
{{bio}}
</p>
{{/if}}
</a>
<div class="m-article-card__author-stats">
<span>
{{plural count.posts empty=(t "No posts") singular=(t "1 post") plural=(t "% posts")}}
</span>
{{#has any="twitter, facebook, website"}}
<ul class="m-article-card__social">
{{#if website}}
<li>
<a href="{{website}}" target="_blank" rel="noopener">
<span class="icon-globe"></span>
</a>
</li>
{{/if}}
{{#if facebook}}
<li>
<a href="https://facebook.com/{{facebook}}" target="_blank" rel="noopener">
<span class="icon-facebook"></span>
</a>
</li>
{{/if}}
{{#if twitter}}
<li>
<a href="https://twitter.com/{{twitter}}" target="_blank" rel="noopener">
<span class="icon-twitter"></span>
</a>
</li>
{{/if}}
</ul>
{{/has}}
</div>
</div>
</article>
{{/foreach}}
</div>
{{/get}} {{/get}}
</div> </div>
</div> </div>

View file

@ -16,7 +16,7 @@ into the {body} of the default.hbs template --}}
<div class="m-hero__content" data-aos="fade-down"> <div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{title}}</h1> <h1 class="m-hero-title bigger">{{title}}</h1>
{{#if custom_excerpt}} {{#if custom_excerpt}}
<p class="m-hero-description">{{custom_excerpt}}</p> <p class="m-hero-description">{{custom_excerpt}}</p>
{{/if}} {{/if}}
</div> </div>
</section> </section>

View file

@ -2,11 +2,7 @@
This header template is shared across all the pages. This header template is shared across all the pages.
--}} --}}
{{#if background}} <header class="m-header {{#if background}}with-picture{{/if}} js-header">
<header class="m-header with-picture js-header">
{{else}}
<header class="m-header js-header">
{{/if}}
<div class="m-mobile-topbar" data-aos="fade-down"> <div class="m-mobile-topbar" data-aos="fade-down">
<button class="m-icon-button in-mobile-topbar js-open-menu" aria-label="Open menu"> <button class="m-icon-button in-mobile-topbar js-open-menu" aria-label="Open menu">
<span class="icon-menu"></span> <span class="icon-menu"></span>
@ -60,40 +56,40 @@ This header template is shared across all the pages.
<h3 class="m-submenu-title in-recent-articles">{{t "Recent articles"}}</h3> <h3 class="m-submenu-title in-recent-articles">{{t "Recent articles"}}</h3>
<div class="js-recent-articles"> <div class="js-recent-articles">
{{#get "posts" limit="4" order="published_at desc"}} {{#get "posts" limit="4" order="published_at desc"}}
{{#foreach posts}} {{#foreach posts}}
<div> <div>
<a href="{{url}}" class="m-recent-article"> <a href="{{url}}" class="m-recent-article">
<div class="m-recent-article__picture"> <div class="m-recent-article__picture">
{{#if feature_image}} {{#if feature_image}}
<div class="lozad" data-background-image="{{img_url feature_image size="s"}}"></div> <div class="lozad" data-background-image="{{img_url feature_image size="s"}}"></div>
{{else}} {{else}}
<div class="no-image lozad" data-background-image="{{asset "images/no-image.png"}}"></div> <div class="no-image lozad" data-background-image="{{asset "images/no-image.png"}}"></div>
{{/if}} {{/if}}
</div>
<h3 class="m-recent-article__title js-recent-article-title" title="{{title}}">
{{title}}
</h3>
<span class="m-recent-article__date">{{date published_at timeago="true"}}</span>
</a>
</div> </div>
<h3 class="m-recent-article__title js-recent-article-title" title="{{title}}"> {{else}}
{{title}} <div class="m-not-found in-recent-articles">{{t "No recent articles found :("}}</div>
</h3> {{/foreach}}
<span class="m-recent-article__date">{{date published_at timeago="true"}}</span>
</a>
</div>
{{else}}
<div class="m-not-found in-recent-articles">{{t "No recent articles found :("}}</div>
{{/foreach}}
{{/get}} {{/get}}
</div> </div>
</section> </section>
<section class="m-tags"> <section class="m-tags">
<h3 class="m-submenu-title">{{t "Tags"}}</h3> <h3 class="m-submenu-title">{{t "Tags"}}</h3>
{{#get "tags" limit="10"}} {{#get "tags" limit="10"}}
<ul> <ul>
{{#foreach tags}} {{#foreach tags}}
<li> <li>
<a href="{{url}}">{{name}}</a> <a href="{{url}}">{{name}}</a>
</li> </li>
{{else}} {{else}}
<li class="m-not-found">{{t "No tags found :("}}</li> <li class="m-not-found">{{t "No tags found :("}}</li>
{{/foreach}} {{/foreach}}
</ul> </ul>
{{/get}} {{/get}}
</section> </section>
</div> </div>

252
post.hbs
View file

@ -9,11 +9,11 @@ into the {body} of the default.hbs template --}}
<div class="main-wrap"> <div class="main-wrap">
{{!-- Everything inside the #post tags pulls data from the post --}} {{!-- Everything inside the #post tags pulls data from the post --}}
{{#post}} {{#post}}
{{!-- Special header.hbs partial to generate the <header> tag --}} {{!-- Special header.hbs partial to generate the <header> tag --}}
{{> header background=feature_image}} {{> header background=feature_image}}
{{!-- Inject styles of the hero image to make it responsive --}} {{!-- Inject styles of the hero image to make it responsive --}}
{{> hero background=feature_image}} {{> hero background=feature_image}}
</section> </section>
{{/post}} {{/post}}
<main> <main>
@ -21,124 +21,124 @@ into the {body} of the default.hbs template --}}
<div class="l-content in-post"> <div class="l-content in-post">
{{!-- Everything inside the #post tags pulls data from the post --}} {{!-- Everything inside the #post tags pulls data from the post --}}
{{#post}} {{#post}}
<div class="l-wrapper in-post {{#unless feature_image}}no-image{{/unless}} js-aos-wrapper" data-aos="fade-up" data-aos-delay="300"> <div class="l-wrapper in-post {{#unless feature_image}}no-image{{/unless}} js-aos-wrapper" data-aos="fade-up" data-aos-delay="300">
{{#if @labs.subscribers}} {{#if @labs.subscribers}}
<div class="l-post-content has-subscribe-form js-progress-content"> <div class="l-post-content has-subscribe-form js-progress-content">
{{else}} {{else}}
<div class="l-post-content js-progress-content"> <div class="l-post-content js-progress-content">
{{/if}} {{/if}}
<header class="m-heading"> <header class="m-heading">
<h1 class="m-heading__title in-post">{{title}}</h1> <h1 class="m-heading__title in-post">{{title}}</h1>
<div class="m-heading__meta"> <div class="m-heading__meta">
{{#if primary_tag}} {{#if primary_tag}}
<a href="{{primary_tag.url}}" class="m-heading__meta__tag">{{primary_tag.name}}</a> <a href="{{primary_tag.url}}" class="m-heading__meta__tag">{{primary_tag.name}}</a>
<span class="m-heading__meta__divider">&bull;</span> <span class="m-heading__meta__divider">&bull;</span>
{{/if}} {{/if}}
<span class="m-heading__meta__time">{{date published_at}}</span> <span class="m-heading__meta__time">{{date published_at}}</span>
</div>
</header>
<div class="pos-relative js-post-content">
<div class="m-share">
<div class="m-share__content js-sticky">
<a href="https://www.facebook.com/sharer/sharer.php?u={{url absolute='true'}}" class="m-icon-button filled in-share" target="_blank" rel="noopener" aria-label="Facebook">
<span class="icon-facebook"></span>
</a>
<a href="https://twitter.com/intent/tweet?text={{encode title}}&url={{url absolute='true'}}" class="m-icon-button filled in-share" target="_blank" rel="noopener" aria-label="Twitter">
<span class="icon-twitter"></span>
</a>
<button class="m-icon-button filled in-share progress js-scrolltop" aria-label="Scroll to top">
<span class="icon-arrow-top"></span>
<svg>
<circle class="progress-ring__circle js-progress" fill="transparent" r="0" />
</svg>
</button>
</div>
</div>
{{content}}
</div> </div>
</header> </div>
<div class="pos-relative js-post-content"> </div>
<div class="m-share"> {{!-- Email subscribe form at the bottom of the page --}}
<div class="m-share__content js-sticky"> {{#if @labs.subscribers}}
<a href="https://www.facebook.com/sharer/sharer.php?u={{url absolute='true'}}" class="m-icon-button filled in-share" target="_blank" rel="noopener" aria-label="Facebook"> <section class="m-subscribe-section">
<span class="icon-facebook"></span> <div class="l-wrapper in-post">
</a> <div class="m-subscribe-section__content">
<a href="https://twitter.com/intent/tweet?text={{encode title}}&url={{url absolute='true'}}" class="m-icon-button filled in-share" target="_blank" rel="noopener" aria-label="Twitter"> <div class="m-subscribe-section__text">
<span class="icon-twitter"></span> <h4 class="m-subscribe-section__title">{{t "Subscribe to our newsletter"}}</h4>
</a> <p class="m-subscribe-section__description">
<button class="m-icon-button filled in-share progress js-scrolltop" aria-label="Scroll to top"> {{t "Get the latest posts delivered right to your inbox."}}
<span class="icon-arrow-top"></span> </p>
<svg> </div>
<circle class="progress-ring__circle js-progress" fill="transparent" r="0" /> <div class="m-subscribe-section__form">
</svg> {{subscribe_form
</button> form_id="subscribe-form"
form_class="m-subscribe-section__form"
input_id="subscribe_input"
input_class="m-input in-subscribe-section"
button_id="subscribe_button"
button_class="m-button primary block"
placeholder=(t "Your email address")
}}
</div>
</div> </div>
</div> </div>
{{content}} </section>
</div> {{/if}}
</div> {{#if @labs.subscribers}}
</div> <section class="m-author">
{{!-- Email subscribe form at the bottom of the page --}} {{else}}
{{#if @labs.subscribers}} <section class="m-author no-subscribers">
<section class="m-subscribe-section"> {{/if}}
<div class="l-wrapper in-post"> <div class="m-author__content">
<div class="m-subscribe-section__content"> <div class="m-author__picture">
<div class="m-subscribe-section__text"> <a href="{{primary_author.url}}" class="m-author-picture" aria-label="Author picture">
<h4 class="m-subscribe-section__title">{{t "Subscribe to our newsletter"}}</h4> {{#if primary_author.profile_image}}
<p class="m-subscribe-section__description"> <div style="background-image: url({{primary_author.profile_image}});"></div>
{{t "Get the latest posts delivered right to your inbox."}} {{else}}
</p> <div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div>
{{/if}}
</a>
</div> </div>
<div class="m-subscribe-section__form"> <div class="m-author__info">
{{subscribe_form <h4 class="m-author__name">
form_id="subscribe-form" <a href="{{primary_author.url}}">{{primary_author.name}}</a>
form_class="m-subscribe-section__form" </h4>
input_id="subscribe_input" {{#has author="count:>1"}}
input_class="m-input in-subscribe-section" <p class="m-small-text in-author-along-with">
button_id="subscribe_button" {{authors separator=", " prefix=(t "Among with no break line") from="2"}}
button_class="m-button primary block" </p>
placeholder=(t "Your email address") {{/has}}
}} {{#if primary_author.bio}}
<p class="m-author__bio">{{primary_author.bio}}</p>
{{/if}}
<ul class="m-author-links">
{{#if primary_author.website}}
<li>
<a href="{{primary_author.website}}" target="_blank" rel="noopener" aria-label="Website">
<span class="icon-globe"></span>
</a>
</li>
{{/if}}
{{#if primary_author.facebook}}
<li>
<a href="https://facebook.com/{{primary_author.facebook}}" target="_blank" rel="noopener" aria-label="Facebook">
<span class="icon-facebook"></span>
</a>
</li>
{{/if}}
{{#if primary_author.twitter}}
<li>
<a href="https://twitter.com/{{primary_author.twitter}}" target="_blank" rel="noopener" aria-label="Twitter">
<span class="icon-twitter"></span>
</a>
</li>
{{/if}}
</ul>
</div> </div>
</div> </div>
</div> </section>
</section> {{!-- If you want to embed comments, this is a good place to do it! --}}
{{/if}} {{!--
{{#if @labs.subscribers}}
<section class="m-author">
{{else}}
<section class="m-author no-subscribers">
{{/if}}
<div class="m-author__content">
<div class="m-author__picture">
<a href="{{primary_author.url}}" class="m-author-picture" aria-label="Author picture">
{{#if primary_author.profile_image}}
<div style="background-image: url({{primary_author.profile_image}});"></div>
{{else}}
<div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div>
{{/if}}
</a>
</div>
<div class="m-author__info">
<h4 class="m-author__name">
<a href="{{primary_author.url}}">{{primary_author.name}}</a>
</h4>
{{#has author="count:>1"}}
<p class="m-small-text in-author-along-with">
{{authors separator=", " prefix=(t "Among with no break line") from="2"}}
</p>
{{/has}}
{{#if primary_author.bio}}
<p class="m-author__bio">{{primary_author.bio}}</p>
{{/if}}
<ul class="m-author-links">
{{#if primary_author.website}}
<li>
<a href="{{primary_author.website}}" target="_blank" rel="noopener" aria-label="Website">
<span class="icon-globe"></span>
</a>
</li>
{{/if}}
{{#if primary_author.facebook}}
<li>
<a href="https://facebook.com/{{primary_author.facebook}}" target="_blank" rel="noopener" aria-label="Facebook">
<span class="icon-facebook"></span>
</a>
</li>
{{/if}}
{{#if primary_author.twitter}}
<li>
<a href="https://twitter.com/{{primary_author.twitter}}" target="_blank" rel="noopener" aria-label="Twitter">
<span class="icon-twitter"></span>
</a>
</li>
{{/if}}
</ul>
</div>
</div>
</section>
{{!-- If you want to embed comments, this is a good place to do it! --}}
{{!--
<section class="m-comments"> <section class="m-comments">
<div class="m-load-comments"> <div class="m-load-comments">
<div class="m-load-comments__line"></div> <div class="m-load-comments__line"></div>
@ -166,17 +166,17 @@ into the {body} of the default.hbs template --}}
{{/post}} {{/post}}
{{!-- Related posts --}} {{!-- Related posts --}}
{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags,authors" as |related|}} {{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags,authors" as |related|}}
<section class="m-recommended"> <section class="m-recommended">
<div class="l-wrapper in-recommended"> <div class="l-wrapper in-recommended">
<h3 class="m-section-title in-recommended">{{t "Recommended for you"}}</h3> <h3 class="m-section-title in-recommended">{{t "Recommended for you"}}</h3>
<div class="m-recommended-articles"> <div class="m-recommended-articles">
<div class="m-recommended-slider js-recommended-articles"> <div class="m-recommended-slider js-recommended-articles">
{{!-- The tag below iterates over all the related posts --}} {{!-- The tag below iterates over all the related posts --}}
{{> "loop"}} {{> "loop"}}
</div>
</div> </div>
</div> </div>
</div> </section>
</section>
{{/get}} {{/get}}
</div> </div>
</article> </article>

View file

@ -2,7 +2,7 @@ version: '3'
services: services:
ghost: ghost:
image: ghost:2.31.1 image: ghost:3.7.0
container_name: ghost container_name: ghost
volumes: volumes:
- ./..:/var/lib/ghost/content/themes/liebling - ./..:/var/lib/ghost/content/themes/liebling

View file

@ -382,6 +382,10 @@
padding: 20px; padding: 20px;
} }
} }
&.line-numbers > code {
padding: 0;
}
} }
form { form {

22
tag.hbs
View file

@ -9,17 +9,17 @@ into the {body} of the default.hbs template --}}
<div class="main-wrap"> <div class="main-wrap">
{{!-- Everything inside the #tag tags pulls data from the tag --}} {{!-- Everything inside the #tag tags pulls data from the tag --}}
{{#tag}} {{#tag}}
{{!-- Special header.hbs partial to generate the <header> tag --}} {{!-- Special header.hbs partial to generate the <header> tag --}}
{{> header background=feature_image}} {{> header background=feature_image}}
{{!-- Inject styles of the hero image to make it responsive --}} {{!-- Inject styles of the hero image to make it responsive --}}
{{> hero background=feature_image}} {{> hero background=feature_image}}
<div class="m-hero__content" data-aos="fade-down"> <div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{name}}</h1> <h1 class="m-hero-title bigger">{{name}}</h1>
<p class="m-heading__description"> <p class="m-heading__description">
{{plural ../pagination.total empty=(t "No posts") singular=(t "1 post") plural=(t "% posts")}} {{t "with this tag"}} {{plural ../pagination.total empty=(t "No posts") singular=(t "1 post") plural=(t "% posts")}} {{t "with this tag"}}
</p> </p>
</div> </div>
</section> </section>
{{/tag}} {{/tag}}
<main> <main>