Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ social_icons:
enable: true
icons_only: false
transition: false
# Dependencies: exturl: true in Tags Settings section below.
# To encrypt links above use https://www.base64encode.org
# Example encoded link: `GitHub: aHR0cHM6Ly9naXRodWIuY29tL3RoZW1lLW5leHQ= || github`
exturl: false

# Follow me on GitHub banner in right-top corner.
# Usage: `permalink || title`
Expand Down
30 changes: 19 additions & 11 deletions layout/_macro/sidebar.swig
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,26 @@

{% if theme.social %}
<div class="links-of-author motion-element">
{% for name, link in theme.social %}
<span class="links-of-author-item">
<a href="{{ link.split('||')[0] | trim }}" target="_blank" title="{{ name }}"{% if theme.seo %} rel="external nofollow"{% endif %}>
{% if theme.social_icons.enable %}
<i class="fa fa-fw fa-{{ link.split('||')[1] | trim | default('globe') }}"></i>{#
#}{% endif %}{#
#}{% if not theme.social_icons.icons_only %}{#
#}{{ name }}{#
#}{% endif %}{#
{% for name, link in theme.social %}
<span class="links-of-author-item">
{% if theme.exturl && theme.social_icons.exturl %}
<span class="exturl" data-url="{{ link.split('||')[0] | trim }}" title="{{ name }}">{#
#}{% else %}{#
#}<a href="{{ link.split('||')[0] | trim }}" target="_blank" title="{{ name }}"{% if theme.seo %} rel="external nofollow"{% endif %}>{#
#}{% endif %}{#
#}{% if theme.social_icons.enable %}{#
#}<i class="fa fa-fw fa-{{ link.split('||')[1] | trim | default('globe') }}"></i>{#
#}{% endif %}{#
#}{% if not theme.social_icons.icons_only %}{#
#}{{ name }}{#
#}{% endif %}{#
#}{% if theme.exturl && theme.social_icons.exturl %}{#
#}</span>
{% else %}{#
#}</a>
</span>
{% endfor %}
{% endif %}
</span>
{% endfor %}
</div>
{% endif %}

Expand Down
12 changes: 11 additions & 1 deletion layout/_third-party/github-banner.swig
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@
{% set github_banner_bg_color = theme.android_chrome_color %}
{% set github_banner_fg_color = "#fff" %}
{% set github_title = theme.github_banner.split('||')[1] | trim %}
<a href="{{ theme.github_banner.split('||')[0] | trim }}" class="github-corner" target="_blank" title="{{ github_title }}" aria-label="{{ github_title }}"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:{{ github_banner_bg_color }}; color:{{ github_banner_fg_color }}; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>
{% if theme.exturl && theme.social_icons.exturl %}
{% set github_url = '<span class="exturl github-corner" data-url=' %}
{% else %}
{% set github_url = '<a href=' %}
{% endif %}
{{ github_url }}"{{ theme.github_banner.split('||')[0] | trim }}" class="github-corner" target="_blank" title="{{ github_title }}" aria-label="{{ github_title }}"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:{{ github_banner_bg_color }}; color:{{ github_banner_fg_color }}; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>
{% if theme.exturl && theme.social_icons.exturl %}
</span>
{% else %}
</a>
{% endif %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
margin-top: 20px;
}

.links-of-author a {
.links-of-author a,
.links-of-author .exturl {
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-bottom: 10px;
border-bottom-color: $black-light;
font-size: 13px;
if hexo-config('social_icons.transition') { the-transition(); }

&:before {
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/sidebar/sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
background: $black-deep;
-webkit-transform: translateZ(0); // http://stackoverflow.com/questions/17079857/position-fixed-broken-in-chrome-with-flash-behind

a {
a, .exturl {
color: $grey-dark;
border-bottom-color: $black-light;
&:hover { color: $gainsboro; }
Expand Down
3 changes: 1 addition & 2 deletions source/css/_mixins/Pisces.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sidebar-inline-links-item() {
margin: 5px 0 0;
if !hexo-config('social_icons.icons_only') { width: 50%; }

& a {
& a, .exturl {
max-width: 216px;
box-sizing: border-box;
display: inline-block;
Expand All @@ -12,6 +12,5 @@ sidebar-inline-links-item() {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
if hexo-config('social_icons.transition') { the-transition(); }
}
}
13 changes: 9 additions & 4 deletions source/css/_schemes/Pisces/_sidebar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
clearfix();
}

.sidebar a {
.sidebar a,
.sidebar .exturl {
color: $black-light;

&:hover { color: $black-deep; }
Expand All @@ -52,8 +53,8 @@
}

.links-of-author-item {
a:before { display: none; }
a {
a:before, .exturl:before { display: none; }
a, .exturl {
border-bottom: none;
text-decoration: underline;
}
Expand Down Expand Up @@ -83,11 +84,15 @@
display: flex;
flex-wrap: wrap;
justify-content: center;

.exturl {
font-size: 13px;
}
}
.links-of-author-item {
sidebar-inline-links-item();

a {
a, .exturl {
display: block;
text-decoration: none;

Expand Down