Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: re-format copyright message and auto increase copyright end year based on the current year #46

Merged
merged 3 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

source "https://rubygems.org"
gemspec

4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
title: Your awesome title
email: [email protected]
author: GitHub User
copyright: Copyright © 1970-2010

copyright: "Unpublished Work (cleft) 2017-{currentYear} {author}"

description: >- # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Expand Down
5 changes: 4 additions & 1 deletion _includes/views/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

<div class="wrapper">
<div class="site-footer-inner">
<div>{{ site.copyright }} {% if site.author %}@{{ site.author | escape }}{% endif %}</div>
<div>{% assign currYear = 'now' | date: "%Y" %}
{% assign currYearVar = '{currentYear}' %}
{% assign authorVar = '{author}' %}
{{ site.copyright | replace: '(c)', '&copy;' | replace: '(p)', '℗' | replace: '(cleft)', '<span class="copyleft">&copy;</span>' | replace: currYearVar, currYear | replace: authorVar, site.author}}</div>
<div>Powered by <a title="Jekyll is a simple, blog-aware, static site
generator." href="http://jekyllrb.com/">Jekyll</a> &amp; <a title="Yat, yet
another theme." href="https://github.com/jeffreytse/jekyll-theme-yat">Yat Theme</a>.</div>
Expand Down
5 changes: 5 additions & 0 deletions _sass/yat/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ html {
}
}

.copyleft {
display: inline-block;
transform: rotate(180deg);
}

/**
* Post header
*/
Expand Down