Add a link to the author of the post
This commit is contained in:
parent
563e8085e8
commit
e2003f2b03
8 changed files with 45 additions and 10 deletions
|
@ -16,8 +16,23 @@ tail_includes:
|
||||||
|
|
||||||
<!-- author -->
|
<!-- author -->
|
||||||
<div>
|
<div>
|
||||||
|
{% capture author_name %}{{ page.author.name | default: site.social.name }}{% endcapture %}
|
||||||
|
{% assign author_link = nil %}
|
||||||
|
|
||||||
|
{% if page.author.link %}
|
||||||
|
{% assign author_link = page.author.link %}
|
||||||
|
{% elsif author_name == site.social.name %}
|
||||||
|
{% assign author_link = site.social.links[0] %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{{ site.data.locales[lang].post.written_by }}
|
{{ site.data.locales[lang].post.written_by }}
|
||||||
<em>{{ page.author | default: site.social.name }}</em>
|
<em>
|
||||||
|
{% if author_link %}
|
||||||
|
<a href="{{ author_link }}">{{ author_name }}</a>
|
||||||
|
{% else %}
|
||||||
|
{{ author_name }}
|
||||||
|
{% endif %}
|
||||||
|
</em>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
title: Text and Typography
|
title: Text and Typography
|
||||||
author: Cotes Chung
|
author:
|
||||||
|
name: Cotes Chung
|
||||||
|
link: https://github.com/cotes2020
|
||||||
date: 2019-08-08 11:33:00 +0800
|
date: 2019-08-08 11:33:00 +0800
|
||||||
categories: [Blogging, Demo]
|
categories: [Blogging, Demo]
|
||||||
tags: [typography]
|
tags: [typography]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
title: Writing a New Post
|
title: Writing a New Post
|
||||||
author: Cotes Chung
|
author:
|
||||||
|
name: Cotes Chung
|
||||||
|
link: https://github.com/cotes2020
|
||||||
date: 2019-08-08 14:10:00 +0800
|
date: 2019-08-08 14:10:00 +0800
|
||||||
categories: [Blogging, Tutorial]
|
categories: [Blogging, Tutorial]
|
||||||
tags: [writing]
|
tags: [writing]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
title: Getting Started
|
title: Getting Started
|
||||||
author: Cotes Chung
|
author:
|
||||||
|
name: Cotes Chung
|
||||||
|
link: https://github.com/cotes2020
|
||||||
date: 2019-08-09 20:55:00 +0800
|
date: 2019-08-09 20:55:00 +0800
|
||||||
categories: [Blogging, Tutorial]
|
categories: [Blogging, Tutorial]
|
||||||
tags: [getting started]
|
tags: [getting started]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
title: Customize the Favicon
|
title: Customize the Favicon
|
||||||
author: Cotes Chung
|
author:
|
||||||
|
name: Cotes Chung
|
||||||
|
link: https://github.com/cotes2020
|
||||||
date: 2019-08-11 00:34:00 +0800
|
date: 2019-08-11 00:34:00 +0800
|
||||||
categories: [Blogging, Tutorial]
|
categories: [Blogging, Tutorial]
|
||||||
tags: [favicon]
|
tags: [favicon]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
title: Enable Google Page Views
|
title: Enable Google Page Views
|
||||||
author: Dinesh Prasanth Moluguwan Krishnamoorthy
|
author:
|
||||||
|
name: Dinesh Prasanth Moluguwan Krishnamoorthy
|
||||||
|
link: https://github.com/SilleBille
|
||||||
date: 2021-01-03 18:32:00 -0500
|
date: 2021-01-03 18:32:00 -0500
|
||||||
categories: [Blogging, Tutorial]
|
categories: [Blogging, Tutorial]
|
||||||
tags: [google analytics, pageviews]
|
tags: [google analytics, pageviews]
|
||||||
|
|
|
@ -395,8 +395,6 @@ i { // fontawesome icons
|
||||||
word-spacing: 1px;
|
word-spacing: 1px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@extend %link-underline;
|
|
||||||
|
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,13 +22,21 @@
|
||||||
padding-right: $pr;
|
padding-right: $pr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%text-color {
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
|
||||||
h1 + .post-meta {
|
h1 + .post-meta {
|
||||||
span + span::before {
|
span + span::before {
|
||||||
@include dot;
|
@include dot;
|
||||||
}
|
}
|
||||||
|
|
||||||
em {
|
em {
|
||||||
color: var(--text-color);
|
@extend %text-color;
|
||||||
|
|
||||||
|
a {
|
||||||
|
@extend %text-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +53,10 @@ h1 + .post-meta {
|
||||||
margin-top: 6rem;
|
margin-top: 6rem;
|
||||||
border-bottom: 1px double var(--main-border-color);
|
border-bottom: 1px double var(--main-border-color);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
|
|
||||||
|
.post-meta a {
|
||||||
|
@extend %link-underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-tags {
|
.post-tags {
|
||||||
|
@ -179,7 +191,7 @@ nav[data-toggle=toc] {
|
||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
color: var(--text-color);
|
@extend %text-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
Loading…
Reference in a new issue