aboutsummaryrefslogtreecommitdiff
path: root/_includes/sidebar.html
diff options
context:
space:
mode:
authorAdrián Oliva <adrian.oliva@cimat.mx>2023-05-05 07:57:23 -0600
committerAdrián Oliva <adrian.oliva@cimat.mx>2023-05-05 07:57:23 -0600
commit7b48dd2428d35b29bdffeedce5be52d4acf2cfca (patch)
tree80119c27403d064a37314479073f0bcff9eae574 /_includes/sidebar.html
parente8cc304f7fc137bf46eb3053b904392226f21919 (diff)
downloadpersonal-web-7b48dd2428d35b29bdffeedce5be52d4acf2cfca.tar.gz
personal-web-7b48dd2428d35b29bdffeedce5be52d4acf2cfca.zip
New page on the sidebar!
It points to my personal little Git page.
Diffstat (limited to '')
-rw-r--r--_includes/sidebar.html112
1 files changed, 112 insertions, 0 deletions
diff --git a/_includes/sidebar.html b/_includes/sidebar.html
new file mode 100644
index 0000000..7bf440e
--- /dev/null
+++ b/_includes/sidebar.html
@@ -0,0 +1,112 @@
+<!-- The Side Bar -->
+
+<div id="sidebar" class="d-flex flex-column align-items-end">
+ <div class="profile-wrapper text-center">
+ <div id="avatar">
+ <a href="{{ '/' | relative_url }}" class="mx-auto">
+ {% if site.avatar != empty and site.avatar %}
+ {% capture avatar_url %}
+ {% if site.avatar contains '://' %}
+ {{ site.avatar }}
+ {% elsif site.img_cdn != empty and site.img_cdn %}
+ {{ site.avatar | prepend: site.img_cdn }}
+ {% else %}
+ {{ site.avatar | relative_url }}
+ {% endif %}
+ {% endcapture %}
+ <img src="{{ avatar_url | strip }}" alt="avatar" onerror="this.style.display='none'">
+ {% endif %}
+ </a>
+ </div>
+
+ <div class="site-title">
+ <a href="{{ '/' | relative_url }}">{{ site.title }}</a>
+ </div>
+ <div class="site-subtitle font-italic">{{ site.tagline }}</div>
+ </div>
+ <!-- .profile-wrapper -->
+
+ <ul class="w-100">
+ <!-- home -->
+ <li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
+ <a href="{{ '/' | relative_url }}" class="nav-link">
+ <i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
+ <span>{{ site.data.locales[include.lang].tabs.home | default: "Home" | upcase }}</span>
+ </a>
+ </li>
+ <!-- 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 }} ml-xl-3 mr-xl-3 unloaded"></i>
+ {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
+
+ <span>{{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
+ </a>
+ </li>
+ <!-- .nav-item -->
+ {% endfor %}
+ <li class="nav-item">
+ <a href="https://git.hisiste.com/" class="nav-link">
+ <i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
+ <span>{{ "Git Page" | upcase }}</span>
+ </a>
+ </li>
+ </ul>
+ <!-- ul.nav.flex-column -->
+
+ <div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
+ {% unless site.theme_mode %}
+ <button class="mode-toggle btn" aria-label="Switch Mode">
+ <i class="fas fa-adjust"></i>
+ </button>
+
+ {% if site.data.contact.size > 0 %}
+ <span class="icon-border"></span>
+ {% endif %}
+ {% endunless %}
+
+ {% 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 -%}
+ javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
+ {%- endcapture -%}
+ {% when 'rss' %}
+ {% assign url = '/feed.xml' | relative_url %}
+ {% else %}
+ {% assign url = entry.url %}
+ {% endcase %}
+
+ {% if url %}
+ <a
+ href="{{ url }}"
+ aria-label="{{ entry.type }}"
+ {% assign link_types = '' %}
+
+ {% unless entry.noblank %}
+ target="_blank"
+ {% assign link_types = 'noopener noreferrer' %}
+ {% endunless %}
+
+ {% if entry.type == 'mastodon' %}
+ {% assign link_types = link_types | append: ' me' | strip %}
+ {% endif %}
+
+ {% unless link_types == empty %}
+ rel="{{ link_types }}"
+ {% endunless %}
+ >
+ <i class="{{ entry.icon }}"></i>
+ </a>
+ {% endif %}
+ {% endfor %}
+ </div>
+ <!-- .sidebar-bottom -->
+</div>
+<!-- #sidebar -->