Skip to content

Commit

Permalink
Rework sidebar tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Nov 10, 2023
1 parent a5d164f commit 76c0cc0
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
6 changes: 3 additions & 3 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ <h1 class="site-title">
<!-- the real tabs -->
{% for tab in site.tabs %}
<li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
<a href="{{ tab.url | relative_url }}" class="nav-link">
<i class="fa-fw {{ tab.icon }}"></i>
<a href="{{ tab.override_url | tab.url | relative_url }}" class="nav-link">
<i class="fa-fw {{ tab.icon }} {{ tab.add_class }}"></i>
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}

<span>{{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
<span class="{{ tab.add_class }}">{{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
</a>
</li>
<!-- .nav-item -->
Expand Down
12 changes: 12 additions & 0 deletions _sass/addon/commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,18 @@ $btn-mb: 0.5rem;
user-select: none;
}

.rainbow {
background-color: violet; /* For browsers that do not support gradients */
background-image: -webkit-linear-gradient(60deg, purple, violet); /* For Safari 5.1 to 6.0 */
background-image: -o-linear-gradient(60deg, purple, violet); /* For Opera 11.1 to 12.0 */
background-image: -moz-linear-gradient(60deg, purple, violet); /* For Firefox 3.6 to 15 */
background-image: linear-gradient(to 60deg, purple, violet); /* Standard syntax (must be last) */
background-clip: text;
-webkit-background-clip: text;
color: transparent;
font-weight: bold;
}

ul {
margin-bottom: 2rem;

Expand Down
2 changes: 1 addition & 1 deletion _tabs/about.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# the default layout is 'page'
icon: fas fa-info-circle
order: 4
order: 3
---

> Add Markdown syntax content to file `_tabs/about.md`{: .filepath } and it will show up on this page.
Expand Down
5 changes: 0 additions & 5 deletions _tabs/archives.md

This file was deleted.

2 changes: 1 addition & 1 deletion _tabs/categories.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: categories
icon: fas fa-stream
order: 1
order: 2
---
6 changes: 6 additions & 0 deletions _tabs/store.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
icon: fas fa-bag-shopping
order: 1
override_url: https://store.mcbrawls.net
add_class: rainbow
---
5 changes: 0 additions & 5 deletions _tabs/tags.md

This file was deleted.

0 comments on commit 76c0cc0

Please sign in to comment.