Skip to content

Commit

Permalink
add visitor counter
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouTimeMachine committed Jun 7, 2024
1 parent b21167f commit 0652b49
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ icon: icon.png # ⚛️the emoji used as the favicon (alternatively, provide im

url: https://ZhouTimeMachine.github.io # the base hostname & protocol for your site
baseurl: # the subpath of your site, e.g. /blog/
last_updated: false # set to true if you want to display last updated in the footer
last_updated: true # set to true if you want to display last updated in the footer
impressum_path: # set to path to include impressum link in the footer, use the same path as permalink in a page, helps to conform with EU GDPR

# -----------------------------------------------------------------------------
Expand Down
14 changes: 13 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
{% if site.footer_fixed %}
<footer class="fixed-bottom">
<div class="container mt-0">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}. {{ site.footer_text }}
<div style="color: var(--global-footer-text-color); flex: 1;">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}.
{{ site.footer_text }}
{%- if site.impressum_path -%}
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
{%- endif -%}
{%- if site.last_updated -%}
Last updated: {{ "now" | date: '%B %d, %Y' }}.
{%- endif %}
</div>

<div style="height: auto; max-width: 100%; vertical-align: middle;">
<a href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fzhoutimemachine.github.io&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false"/></a>
</div>
</div>
</footer>
{%- else -%}
<footer class="sticky-bottom mt-5">
<div class="container">
<div class="text">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}. {{ site.footer_text }}
{%- if site.impressum_path -%}
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
{%- endif -%}
{%- if site.last_updated -%}
Last updated: {{ "now" | date: '%B %d, %Y' }}.
{%- endif %}
</div>
<div class="image">
<a href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fzhoutimemachine.github.io&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false" style="height: 10%;width: 10%;"/></a>
</div>
</div>
</footer>
{%- endif %}
2 changes: 1 addition & 1 deletion _includes/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<tr>
<th scope="row">2022</th>
<td class="news-title">
2nd Price, Contemporary Undergraduate Mathematical Contest in Modeling(<a href="http://www.mcm.edu.cn">CUMCM</a>)
2nd Prize, Contemporary Undergraduate Mathematical Contest in Modeling(<a href="http://www.mcm.edu.cn">CUMCM</a>)
</td>
</tr>
<tr>
Expand Down
5 changes: 3 additions & 2 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,9 @@ footer.fixed-bottom {

.container {
color: var(--global-footer-text-color);
padding-top: 9px;
padding-bottom: 8px;
padding-top: 5px;
padding-bottom: 5px;
display: flex;
}

a {
Expand Down

0 comments on commit 0652b49

Please sign in to comment.