Skip to content

Commit

Permalink
feat: add components/nav-socials.html template
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Apr 11, 2024
1 parent 28c4cbf commit 9b4d352
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 26 deletions.
25 changes: 25 additions & 0 deletions src/shibuya/theme/shibuya/components/nav-socials.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<div class="sy-head-socials flex items-center">
{%- if theme_github_url %}
<a href="{{ theme_github_url }}" aria-label="GitHub">
<i class="i-icon github"></i>
</a>
{%- elif theme_gitlab_url %}
<a href="{{ theme_gitlab_url }}" aria-label="Gitlab">
<i class="i-icon gitlab"></i>
</a>
{%- elif theme_bitbucket_url %}
<a href="{{ theme_bitbucket_url }}" aria-label="Bitbucket">
<i class="i-icon bitbucket"></i>
</a>
{%- endif %}
{%- if theme_twitter_url %}
<a href="{{ theme_twitter_url }}" aria-label="X (Twitter)">
<i class="i-icon x-twitter"></i>
</a>
{%- endif %}
{%- if theme_discord_url %}
<a href="{{ theme_discord_url }}" aria-label="Discord">
<i class="i-icon discord"></i>
</a>
{%- endif %}
</div>
21 changes: 1 addition & 20 deletions src/shibuya/theme/shibuya/components/site-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,7 @@
{% include "components/searchbox.html" %}
{% include "components/nav-versions.html" %}
{% include "components/nav-languages.html" %}
<div class="sy-head-social flex items-center">
{%- if theme_github_url %}
<a class="flex items-center" href="{{ theme_github_url }}" aria-label="GitHub">
<i class="i-icon github"></i>
</a>
{%- elif theme_gitlab_url %}
<a class="flex items-center" href="{{ theme_gitlab_url }}" aria-label="Gitlab">
<i class="i-icon gitlab"></i>
</a>
{%- elif theme_bitbucket_url %}
<a class="flex items-center" href="{{ theme_bitbucket_url }}" aria-label="Bitbucket">
<i class="i-icon bitbucket"></i>
</a>
{%- endif %}
{%- if theme_discord_url %}
<a class="flex items-center" href="{{ theme_discord_url }}" aria-label="Discord">
<i class="i-icon discord"></i>
</a>
{%- endif %}
</div>
{% include "components/nav-socials.html" %}
</div>
</div>
<div class="sy-head-actions flex items-center shrink-0 print:hidden">
Expand Down
10 changes: 4 additions & 6 deletions static/css/layout/head.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@
font-weight: 400;
}

.sy-head-social a {
.sy-head-socials a {
padding: 0.5rem;
display: flex;
align-items: center;
}

.sy-head-actions button {
Expand Down Expand Up @@ -245,11 +247,7 @@
padding: 0.2rem 0;
}

.sy-head-social {
.sy-head-socials {
margin-left: 0.5rem;
}

.sy-head-social a {
padding: 0.5rem;
}
}

0 comments on commit 9b4d352

Please sign in to comment.