perf: avoid post pageviews from shifting while loading
This commit is contained in:
parent
6d35f5f8da
commit
135a16f13e
1 changed files with 34 additions and 31 deletions
|
@ -35,28 +35,6 @@ tail_includes:
|
|||
|
||||
<div class="post-meta text-muted">
|
||||
|
||||
<!-- author -->
|
||||
<div>
|
||||
{% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
|
||||
{% assign author_link = nil %}
|
||||
|
||||
{% if page.author %}
|
||||
{% assign author_link = site.data.authors[page.author].url %}
|
||||
{% elsif author_name == site.social.name %}
|
||||
{% assign author_link = site.social.links[0] %}
|
||||
{% endif %}
|
||||
|
||||
{{ site.data.locales[lang].post.written_by }}
|
||||
<em>
|
||||
{% if author_link %}
|
||||
<a href="{{ author_link }}">{{ author_name }}</a>
|
||||
{% else %}
|
||||
{{ author_name }}
|
||||
{% endif %}
|
||||
</em>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<div>
|
||||
<!-- published date -->
|
||||
<span>
|
||||
|
@ -71,10 +49,32 @@ tail_includes:
|
|||
{% include datetime.html date=page.last_modified_at tooltip=true %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- read time -->
|
||||
{% include read-time.html content=content prompt=true %}
|
||||
<div class="d-flex justify-content-between">
|
||||
<!-- author -->
|
||||
<span>
|
||||
{% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
|
||||
{% assign author_link = nil %}
|
||||
|
||||
{% if page.author %}
|
||||
{% assign author_link = site.data.authors[page.author].url %}
|
||||
{% elsif author_name == site.social.name %}
|
||||
{% assign author_link = site.social.links[0] %}
|
||||
{% endif %}
|
||||
|
||||
{{ site.data.locales[lang].post.written_by }}
|
||||
|
||||
<em>
|
||||
{% if author_link %}
|
||||
<a href="{{ author_link }}">{{ author_name }}</a>
|
||||
{% else %}
|
||||
{{ author_name }}
|
||||
{% endif %}
|
||||
</em>
|
||||
</span>
|
||||
|
||||
<div>
|
||||
<!-- page views -->
|
||||
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
||||
<span>
|
||||
|
@ -84,6 +84,9 @@ tail_includes:
|
|||
{{ site.data.locales[lang].post.pageview_measure }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<!-- read time -->
|
||||
{% include read-time.html content=content prompt=true %}
|
||||
</div>
|
||||
|
||||
</div> <!-- .d-flex -->
|
||||
|
|
Loading…
Reference in a new issue