Skip to content

Commit ef141c2

Browse files
fix(site): add feed, fix sidebar
1 parent 081ab0d commit ef141c2

File tree

4 files changed

+66
-74
lines changed

4 files changed

+66
-74
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jekyll-archives:
189189

190190
plugins:
191191
- "jekyll-get-json"
192-
192+
- "jekyll-feed"
193193
jekyll_get_json:
194194
- data: github
195195
json: 'https://api.github.com/repos/techno-tim/techno-tim.github.io'

_data/contact.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,30 @@
1212
-
1313
type: patreon
1414
icon: 'fab fa-patreon'
15-
# -
16-
# type: github
17-
# icon: 'fab fa-github-alt'
18-
# -
15+
16+
-
1917
# type: instagram
2018
# icon: 'fab fa-instagram'
2119
# -
2220
# type: facebook
2321
# icon: 'fab fa-facebook'
2422
-
25-
type: discord
26-
icon: 'fab fa-discord'
23+
type: discord
24+
icon: 'fab fa-discord'
2725
# -
2826
# type: tiktok
2927
# icon: 'fab fa-tiktok'
3028

3129
# type: email
3230
# icon: 'fas fa-envelope'
3331
# noblank: true # open link in current tab
34-
# -
35-
# type: rss
36-
# icon: 'fas fa-rss'
37-
# noblank: true
32+
-
33+
type: github
34+
icon: 'fab fa-github-alt'
35+
-
36+
type: rss
37+
icon: 'fas fa-rss'
38+
noblank: true
3839

3940
# Uncomment and complete the url below to enable more contact options
4041
# -

_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@
8181
crossorigin="anonymous"></script>
8282

8383
{% include js-selector.html %}
84-
84+
{% feed_meta %}
8585
</head>

_includes/sidebar.html

Lines changed: 53 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
<div id="avatar">
99
<a href="{{ '/' | relative_url }}" alt="avatar" class="mx-auto">
1010
{% capture avatar_url %}
11-
{%- if site.avatar contains '://' -%}
12-
{{ site.avatar }}
13-
{%- elsif site.img_cdn != '' and site.img_cdn -%}
14-
{{ site.avatar | prepend: site.img_cdn }}
15-
{%- else -%}
16-
{{ site.avatar | relative_url }}
17-
{%- endif -%}
11+
{%- if site.avatar contains '://' -%}
12+
{{ site.avatar }}
13+
{%- elsif site.img_cdn != '' and site.img_cdn -%}
14+
{{ site.avatar | prepend: site.img_cdn }}
15+
{%- else -%}
16+
{{ site.avatar | relative_url }}
17+
{%- endif -%}
1818
{% endcapture %}
1919
<img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
2020
</a>
@@ -51,68 +51,59 @@
5151
<div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center">
5252

5353
{% for entry in site.data.contact %}
54-
{% capture url %}
55-
{%- if entry.type == 'github' -%}
56-
https://github.com/{{ site.github.username }}
57-
{%- elsif entry.type == 'twitter' -%}
58-
https://twitter.com/{{ site.twitter.username }}
59-
{%- elsif entry.type == 'email' -%}
60-
{% assign email = site.social.email | split: '@' %}
61-
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
62-
{%- elsif entry.type == 'rss' -%}
63-
{{ "/feed.xml" | relative_url }}
64-
{%- elsif entry.type == 'patreon' -%}
65-
https://patreon.com/{{ site.patreon.username }}
66-
{%- elsif entry.type == 'youtube' -%}
67-
https://www.youtube.com/channel/{{ site.youtube.channelid }}
68-
{%- elsif entry.type == 'twitch' -%}
69-
https://twitch.tv/{{ site.twitch.username }}
70-
{%- elsif entry.type == 'instagram' -%}
71-
https://instagram.com/{{ site.instagram.username }}
72-
{%- elsif entry.type == 'facebook' -%}
73-
https://facebook.com/{{ site.facebook.username }}
74-
{%- elsif entry.type == 'discord' -%}
75-
https://discord.gg/{{ site.discord.invitelink }}
76-
{%- elsif entry.type == 'tiktok' -%}
77-
https://tiktok.com/{{ site.tiktok.username }}
78-
{%- else -%}
79-
{{ entry.url }}
80-
{%- endif -%}
81-
{% endcapture %}
54+
{% capture url %}
55+
{%- if entry.type == 'github' -%}
56+
https://github.com/{{ site.github.username }}
57+
{%- elsif entry.type == 'twitter' -%}
58+
https://twitter.com/{{ site.twitter.username }}
59+
{%- elsif entry.type == 'email' -%}
60+
{% assign email = site.social.email | split: '@' %}
61+
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
62+
{%- elsif entry.type == 'rss' -%}
63+
{{ "/feed.xml" | relative_url }}
64+
{%- elsif entry.type == 'patreon' -%}
65+
https://patreon.com/{{ site.patreon.username }}
66+
{%- elsif entry.type == 'youtube' -%}
67+
https://www.youtube.com/channel/{{ site.youtube.channelid }}
68+
{%- elsif entry.type == 'twitch' -%}
69+
https://twitch.tv/{{ site.twitch.username }}
70+
{%- elsif entry.type == 'instagram' -%}
71+
https://instagram.com/{{ site.instagram.username }}
72+
{%- elsif entry.type == 'facebook' -%}
73+
https://facebook.com/{{ site.facebook.username }}
74+
{%- elsif entry.type == 'discord' -%}
75+
https://discord.gg/{{ site.discord.invitelink }}
76+
{%- elsif entry.type == 'tiktok' -%}
77+
https://tiktok.com/{{ site.tiktok.username }}
78+
{%- else -%}
79+
{{ entry.url }}
80+
{%- endif -%}
81+
{% endcapture %}
8282

83-
{% if url %}
84-
<a href="{{ url }}" aria-label="{{ entry.type }}"
85-
{% unless site.theme_mode %}class="order-{{ forloop.index | plus: 2 }}"{% endunless %}
86-
{% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}>
87-
<i class="{{ entry.icon }}"></i>
88-
</a>
89-
{% endif %}
83+
{% if url %}
84+
<a href="{{ url }}" aria-label="{{ entry.type }}" {% unless site.theme_mode
85+
%}class="order-{{ forloop.index | plus: 2 }}" {% endunless %} {% unless entry.noblank %}target="_blank"
86+
rel="noopener" {% endunless %}>
87+
<i class="{{ entry.icon }}"></i>
88+
</a>
89+
{% endif %}
9090

9191
{% endfor %}
9292

9393
{% unless site.theme_mode %}
94-
{% if site.data.contact.size > 0 %}
95-
<span class="icon-border order-2"></span>
96-
{% endif %}
94+
{% if site.data.contact.size > 0 %}
95+
<span class="icon-border order-2"></span>
96+
{% endif %}
9797

98-
<span id="mode-toggle-wrapper" class="order-1">
99-
{% include mode-toggle.html %}
100-
</span>
98+
<span id="mode-toggle-wrapper" class="order-1">
99+
{% include mode-toggle.html %}
100+
</span>
101101
{% endunless %}
102102

103-
<div class="d-flex flex-row justify-content-center align-items-center">
104-
<div class="p-1">
105-
<a href="https://github.com/techno-tim/techno-tim.github.io" target="_blank" rel="noopener">
106-
<i class="fab fa-github fa-2x"></i>
107-
</a>
108-
</div>
109-
<div class="p-1">
110-
<div class="d-flex flex-column align-items-start justify-content-end">
111-
<div class="text-sm-left">{{ site.data.github.stargazers_count}} stars</div>
112-
<div class="p-0">{{ site.data.github.forks_count}} forks</div>
113-
</div>
114-
</div>
103+
104+
<div class="d-flex flex-wrap justify-content-center">
105+
<div class="p-1 text-small-left">{{ site.data.github.stargazers_count}} stars</div>
106+
<div class="p-1">{{ site.data.github.forks_count}} forks </div>
115107
</div>
116108
</div> <!-- .sidebar-bottom -->
117-
118-
</div><!-- #sidebar -->
109+
</div><!-- #sidebar -->

0 commit comments

Comments
 (0)