Added more config for license.

This commit is contained in:
Cotes Chung 2020-02-18 00:32:36 +08:00
parent 64125e6e42
commit 9935f76530
4 changed files with 30 additions and 26 deletions

View file

@ -1,18 +0,0 @@
# License data.
#
# v2.1
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2020 Cotes Chung
# MIT Licensed
icons:
- "fab fa-creative-commons"
- "fab fa-creative-commons-by"
type: "CC BY 4.0"
statment: >-
The blog posts on this site are licensed
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License.
link: "https://creativecommons.org/licenses/by/4.0/"

21
_data/right.yml Normal file
View file

@ -0,0 +1,21 @@
# License data.
#
# v2.1
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2020 Cotes Chung
# MIT Licensed
license:
link: "https://creativecommons.org/licenses/by/4.0/"
prompt: This post is licensed under
name: CC BY 4.0
icons:
- "fab fa-creative-commons"
- "fab fa-creative-commons-by"
brief: Some rights reserved.
verbose: >-
The blog posts on this site are licensed
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License.

View file

@ -12,9 +12,9 @@
<p class="mb-0"> <p class="mb-0">
© {{ 'now' | date: "%Y" }} © {{ 'now' | date: "%Y" }}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>. <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
{% if site.data.license.statment %} {% if site.data.right.brief %}
<span data-toggle="tooltip" data-placement="top" <span data-toggle="tooltip" data-placement="top"
title="{{ site.data.license.statment }}">Some rights reserved</span>. title="{{ site.data.right.verbose }}">{{ site.data.right.brief }}</span>
{% endif %} {% endif %}
</p> </p>
</div> </div>

View file

@ -83,14 +83,15 @@ layout: default
<div class="post-tail-bottom <div class="post-tail-bottom
d-flex justify-content-between align-items-center pt-5 pb-2"> d-flex justify-content-between align-items-center pt-5 pb-2">
{% if site.data.license.type %} {% if site.data.right.license %}
<div class="license-wrapper"> <div class="license-wrapper">
<span class="license-text ml-1 mr-1">This post is licensed under <span class="license-text ml-1 mr-1">
<a href="{{ site.data.license.link }}"> {{ site.data.right.license.prompt }}
{{ site.data.license.type }} <a href="{{ site.data.right.license.link }}">
{% for icon in site.data.license.icons %} {{ site.data.right.license.name }}
{% for icon in site.data.right.license.icons %}
<i class="{{ icon }}"></i> <i class="{{ icon }}"></i>
{% endfor %} {% endfor %}
</a> </a>
</span> </span>
</div> </div>