Flexible footer

This commit is contained in:
Eduardo Gomez 2019-03-08 10:47:48 +01:00
parent 60d4426be4
commit 09ed1758c2
7 changed files with 272 additions and 259 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,66 +1,68 @@
{{!< default}}
{{#author}}
<div class="main-wrap">
{{#author}}
{{> header background=cover_image}}
{{> hero background=cover_image}}
<div class="m-hero__content" data-aos="fade-down">
{{#if profile_image}}
<div class="m-hero-avatar" style="background-image: url({{profile_image}});"></div>
{{else}}
<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">
<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}}
<ul class="m-hero-stats">
<li>
{{plural ../pagination.total empty="No posts" singular="% post" plural="% posts"}}
</li>
{{#if location}}
<li>&bull;</li>
<li>{{location}}</li>
{{/if}}
</ul>
</div>
<div class="m-hero__content" data-aos="fade-down">
{{#if profile_image}}
<div class="m-hero-avatar" style="background-image: url({{profile_image}});"></div>
{{else}}
<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">
<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}}
<ul class="m-hero-stats">
<li>
{{plural ../pagination.total empty="No posts" singular="% post" plural="% posts"}}
</li>
{{#if location}}
<li>&bull;</li>
<li>{{location}}</li>
{{/if}}
</ul>
</div>
</div>
</header>
{{/author}}
<main role="main">
<section class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
<section class="l-grid centered">
{{> "loop"}}
</section>
</div>
{{pagination}}
</section>
</main>
{{/author}}
<main role="main">
<section class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
<section class="l-grid centered">
{{> "loop"}}
</section>
</div>
{{pagination}}
</section>
</main>
</div>

122
index.hbs
View file

@ -1,77 +1,79 @@
{{!< default}}
{{> header background=@site.cover_image}}
{{> hero background=@site.cover_image}}
<div class="main-wrap">
{{> header background=@site.cover_image}}
{{> hero background=@site.cover_image}}
<div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{@site.title}}</h1>
{{#if @site.description}}
<p class="m-hero-description bigger">{{@site.description}}</p>
<p class="m-hero-description bigger">{{@site.description}}</p>
{{/if}}
{{#if @labs.subscribers}}
<a href="{{@site.url}}/subscribe" class="m-button filled">Subscribe</a>
<a href="{{@site.url}}/subscribe" class="m-button filled">Subscribe</a>
{{/if}}
</div>
</header>
<main role="main">
<section class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
<section class="l-grid centered">
{{#get "posts" filter="featured:true" include="authors,tags" limit="5" as |featured|}}
</header>
<main role="main">
<section class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
<section class="l-grid centered">
{{#get "posts" filter="featured:true" include="authors,tags" limit="5" as |featured|}}
{{#if featured}}
<div class="m-featured-slider">
<ul class="m-featured-slider__list js-featured-articles">
{{#foreach featured}}
<li class="m-featured-slider__list__item">
{{#if feature_image}}
<article class="m-featured-article">
{{else}}
<article class="m-featured-article no-picture">
<div class="m-featured-slider">
<ul class="m-featured-slider__list js-featured-articles">
{{#foreach featured}}
<li class="m-featured-slider__list__item">
{{#if feature_image}}
<article class="m-featured-article">
{{else}}
<article class="m-featured-article no-picture">
{{/if}}
<div class="m-featured-article__picture">
{{#if feature_image}}
<div style="background-image: url({{feature_image}});"></div>
<div class="m-featured-article__picture">
{{#if feature_image}}
<div style="background-image: url({{feature_image}});"></div>
{{/if}}
</div>
<div class="m-featured-article__meta">
<a href="{{primary_author.url}}" class="m-featured-article__author js-tooltip"
data-tippy-content="Posted by {{primary_author.name}} {{authors autolink="false" from="2" prefix="<br> Among with " separator=" , "}}">
{{#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}}
</div>
<div class="m-featured-article__meta">
<a href="{{primary_author.url}}" class="m-featured-article__author js-tooltip"
data-tippy-content="Posted by {{primary_author.name}} {{authors autolink="false" from="2" prefix="<br> Among with " separator=" , "}}">
{{#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>
{{#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>Featured</span>
</div>
<a href="{{url}}" class="m-featured-article__content">
<h1 class="m-featured-article__title">{{title}}</h1>
<div class="m-featured-article__timestamp">
<time datetime="{{published_at}}">{{date published_at timeago="true"}}</time>
<span>&bull;</span>
<span>{{reading_time}}</span>
</div>
</a>
</article>
</li>
{{/foreach}}
</ul>
</div>
{{#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>Featured</span>
</div>
<a href="{{url}}" class="m-featured-article__content">
<h1 class="m-featured-article__title">{{title}}</h1>
<div class="m-featured-article__timestamp">
<time datetime="{{published_at}}">{{date published_at timeago="true"}}</time>
<span>&bull;</span>
<span>{{reading_time}}</span>
</div>
</a>
</article>
</li>
{{/foreach}}
</ul>
</div>
{{/if}}
{{/get}}
{{> "loop"}}
</section>
</div>
{{pagination}}
</section>
</main>
{{/get}}
{{> "loop"}}
</section>
</div>
{{pagination}}
</section>
</main>
</div>
{{#contentFor "scripts"}}
<script defer src="{{asset "js/home.js"}}"></script>

View file

@ -1,71 +1,74 @@
{{!< default}}
{{#post}}
{{> header background=feature_image}}
{{> hero background=feature_image}}
<div class="main-wrap">
{{> header background=feature_image}}
{{> hero background=feature_image}}
<div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{title}}</h1>
{{#if excerpt}}
<p class="m-hero-description">{{excerpt}}</p>
<p class="m-hero-description">{{excerpt}}</p>
{{/if}}
</div>
</header>
<main role="main">
<section class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
{{#get 'authors' limit='all' include='count.posts' order='count.posts desc'}}
</header>
<main role="main">
<section class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
{{#get 'authors' limit='all' include='count.posts' order='count.posts desc'}}
<section class="l-grid centered">
{{#foreach authors}}
<article class="m-article-card as-author">
{{#if profile_image}}
<div class="m-article-card__picture" style="background-image: url({{profile_image}})">
<article class="m-article-card as-author">
{{#if profile_image}}
<div class="m-article-card__picture" style="background-image: url({{profile_image}})">
{{else}}
<div class="m-article-card__picture" style="background-image: url({{asset "images/default-avatar-rectangle.jpg"}})">
{{/if}}
<a href="{{url}}" class="m-article-card__picture-link" aria-label="Author"></a>
<h3 class="m-article-card__name">{{name}}</h3>
<div class="m-article-card__picture"
style="background-image: url({{asset "images/default-avatar-rectangle.jpg"}})">
{{/if}}
<a href="{{url}}" class="m-article-card__picture-link" aria-label="Author"></a>
<h3 class="m-article-card__name">{{name}}</h3>
</div>
<div class="m-article-card__info">
<a href="{{url}}" class="m-article-card__info-link">
<p class="m-article-card__excerpt">{{bio}}</p>
</a>
<div class="m-article-card__author-stats">
<span>
{{plural count.posts empty="No posts" singular="% post" plural="% 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 class="m-article-card__info">
<a href="{{url}}" class="m-article-card__info-link">
<p class="m-article-card__excerpt">{{bio}}</p>
</a>
<div class="m-article-card__author-stats">
<span>
{{plural count.posts empty="No posts" singular="% post" plural="% 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>
</div>
</article>
{{/foreach}}
</section>
{{/get}}
</div>
</section>
</main>
{{/get}}
</div>
</section>
</main>
</div>
{{/post}}

View file

@ -1,29 +1,31 @@
{{!< default}}
{{#post}}
{{> header background=feature_image}}
{{> hero background=feature_image}}
<div class="main-wrap">
{{> header background=feature_image}}
{{> hero background=feature_image}}
<div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{title}}</h1>
{{#if excerpt}}
<p class="m-hero-description">{{excerpt}}</p>
<p class="m-hero-description">{{excerpt}}</p>
{{/if}}
</div>
</header>
<main role="main">
<article>
<section class="l-content">
<div class="l-wrapper in-post" data-aos="fade-up" data-aos-delay="300">
<div class="l-post-content">
<section class="pos-relative js-post-content">
{{content}}
</section>
</header>
<main role="main">
<article>
<section class="l-content">
<div class="l-wrapper in-post" data-aos="fade-up" data-aos-delay="300">
<div class="l-post-content">
<section class="pos-relative js-post-content">
{{content}}
</section>
</div>
</div>
</div>
</section>
</article>
</main>
</section>
</article>
</main>
</div>
{{/post}}
{{#contentFor "scripts"}}

View file

@ -1,24 +1,25 @@
{{!< default}}
{{#post}}
<div class="main-wrap">
{{#post}}
{{> header background=feature_image}}
{{> hero background=feature_image}}
</header>
{{/post}}
<main role="main">
<article>
<section class="l-content">
{{#post}}
{{/post}}
<main role="main">
<article>
<section class="l-content">
{{#post}}
<div class="l-wrapper in-post js-wrapper-aos" data-aos="fade-up" data-aos-delay="300">
<div class="l-post-content js-progress-content">
<header class="m-heading">
<h1 class="m-heading__title in-post">{{title}}</h1>
<section class="m-heading__meta">
{{#if primary_tag}}
<a href="{{primary_tag.url}}" class="m-heading__meta__tag">{{primary_tag.name}}</a>
<span class="m-heading__meta__divider">&bull;</span>
<a href="{{primary_tag.url}}" class="m-heading__meta__tag">{{primary_tag.name}}</a>
<span class="m-heading__meta__divider">&bull;</span>
{{/if}}
<time class="m-heading__meta__time">{{date published_at}}</time>
</section>
@ -55,11 +56,11 @@
</div>
<div class="m-subscribe-section__form">
{{subscribe_form
form_class="m-subscribe-section__form"
input_class="m-input in-subscribe-section"
button_class="m-button primary block"
placeholder="Your email address"
}}
form_class="m-subscribe-section__form"
input_class="m-input in-subscribe-section"
button_class="m-button primary block"
placeholder="Your email address"
}}
</div>
</div>
</div>
@ -114,32 +115,32 @@
</div>
</section>
{{!--
<section class="m-comments">
<div class="m-load-comments">
<div class="m-load-comments__line"></div>
<button class="m-icon-button filled as-load-comments js-tooltip js-load-comments" data-tippy-content="Load comments">
<span class="icon-comments"></span>
</button>
</div>
<div class="m-load-comments__iframe l-wrapper in-comments js-comments-iframe">
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "{{url absolute="true"}}";
this.page.identifier = "ghost-{{comment_id}}"
};
(function () {
var d = document, s = d.createElement('script');
s.src = 'https://CHANGETHIS.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
</div>
</section>
--}}
{{/post}}
{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags,authors" as |related|}}
<section class="m-comments">
<div class="m-load-comments">
<div class="m-load-comments__line"></div>
<button class="m-icon-button filled as-load-comments js-tooltip js-load-comments" data-tippy-content="Load comments">
<span class="icon-comments"></span>
</button>
</div>
<div class="m-load-comments__iframe l-wrapper in-comments js-comments-iframe">
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "{{url absolute="true"}}";
this.page.identifier = "ghost-{{comment_id}}"
};
(function () {
var d = document, s = d.createElement('script');
s.src = 'https://CHANGETHIS.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
</div>
</section>
--}}
{{/post}}
{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags,authors" as |related|}}
<section class="m-recommended">
<div class="l-wrapper in-recommended">
<h3 class="m-section-title in-recommended">Recommended for you</h3>
@ -150,10 +151,11 @@
</div>
</div>
</section>
{{/get}}
</section>
</article>
</main>
{{/get}}
</section>
</article>
</main>
</div>
{{#contentFor "scripts"}}
<script defer src="{{asset "js/post.js"}}"></script>

42
tag.hbs
View file

@ -1,25 +1,27 @@
{{!< default}}
{{#tag}}
<div class="main-wrap">
{{#tag}}
{{> header background=feature_image}}
{{> hero background=feature_image}}
<div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{name}}</h1>
<p class="m-heading__description">
{{plural ../pagination.total empty="No posts" singular="% post" plural="% posts"}} with this tag
</p>
</div>
<div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{name}}</h1>
<p class="m-heading__description">
{{plural ../pagination.total empty="No posts" singular="% post" plural="% posts"}} with this tag
</p>
</div>
</header>
{{/tag}}
<main role="main">
<section class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
<section class="l-grid centered">
{{> "loop"}}
</section>
</div>
{{pagination}}
</section>
</main>
{{/tag}}
<main role="main">
<section class="l-content">
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
<section class="l-grid centered">
{{> "loop"}}
</section>
</div>
{{pagination}}
</section>
</main>
</div>