From 273b389c512f13693ed6cdf57d256ac21deae97c Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 11 Sep 2023 02:20:45 +0800 Subject: [PATCH] fix(sidebar): contact icons not stacking (#1224) Fixes #1224 --- _includes/sidebar.html | 66 +++++++++++++++++++--------------------- _sass/addon/commons.scss | 4 +-- 2 files changed, 34 insertions(+), 36 deletions(-) diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 1279ad1..99d6dcc 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -59,48 +59,46 @@ {% endif %} {% endunless %} -
- {% for entry in site.data.contact %} - {% case entry.type %} - {% when 'github', 'twitter' %} - {%- capture url -%} + {% for entry in site.data.contact %} + {% case entry.type %} + {% when 'github', 'twitter' %} + {%- capture url -%} https://{{ entry.type }}.com/{{ site[entry.type].username }} {%- endcapture -%} - {% when 'email' %} - {% assign email = site.social.email | split: '@' %} - {%- capture url -%} + {% when 'email' %} + {% assign email = site.social.email | split: '@' %} + {%- capture url -%} javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@') {%- endcapture -%} - {% when 'rss' %} - {% assign url = '/feed.xml' | relative_url %} - {% else %} - {% assign url = entry.url %} - {% endcase %} + {% when 'rss' %} + {% assign url = '/feed.xml' | relative_url %} + {% else %} + {% assign url = entry.url %} + {% endcase %} - {% if url %} - - - - {% endif %} - {% endfor %} -
+ {% unless link_types == empty %} + rel="{{ link_types }}" + {% endunless %} + > + + + {% endif %} + {% endfor %} diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 53c85fb..2eb5f14 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -830,8 +830,8 @@ $btn-mb: 0.5rem; } .sidebar-bottom { - @include pl-pr(2rem); - + padding-left: 2rem; + padding-right: 1rem; margin-bottom: 1.5rem; %button {