From 713aa48f60d337743917fd21347594561eef377b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 6 Nov 2022 23:49:15 +0100 Subject: sidebar: split "about" and "links" into different includes --- _includes/jekyll-theme/sidebar.html | 1 + _includes/jekyll-theme/sidebar/about.html | 14 -------------- _includes/jekyll-theme/sidebar/links.html | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 _includes/jekyll-theme/sidebar/links.html (limited to '_includes') diff --git a/_includes/jekyll-theme/sidebar.html b/_includes/jekyll-theme/sidebar.html index 2ffe91b..5bcda66 100644 --- a/_includes/jekyll-theme/sidebar.html +++ b/_includes/jekyll-theme/sidebar.html @@ -3,5 +3,6 @@ {% include jekyll-theme/sidebar/latest-posts.html %} {% include custom-sidebar.html %} {% include jekyll-theme/sidebar/about.html %} + {% include jekyll-theme/sidebar/links.html %} {% endunless %} diff --git a/_includes/jekyll-theme/sidebar/about.html b/_includes/jekyll-theme/sidebar/about.html index 9ea927c..4d3787e 100644 --- a/_includes/jekyll-theme/sidebar/about.html +++ b/_includes/jekyll-theme/sidebar/about.html @@ -20,20 +20,6 @@

{{ project_desc }}

- -
-
-

links

-
- {% if site.github %} - {% assign github_link = site.settings.navbar.github.link | default: 'GitHub' %} - {% assign github_icon = site.settings.navbar.github.icon | default: 'globe' %} - {% capture github_icon %} {% endcapture %} - {{ github_icon }}{{ github_link }} - {% endif %} - {% assign author_email = site.settings.author.email | default: 'John.Doe@example.com' %} -  {{ author_email }} -
{% endcapture %} {% include jekyll-theme/sidebar/entry.html content=about_content %} diff --git a/_includes/jekyll-theme/sidebar/links.html b/_includes/jekyll-theme/sidebar/links.html new file mode 100644 index 0000000..1b56467 --- /dev/null +++ b/_includes/jekyll-theme/sidebar/links.html @@ -0,0 +1,21 @@ +{% unless site.settings.sidebar.links.hide or page.sidebar.links.hide %} + +{% capture links_content %} +
+
+

links

+
+ {% if site.github %} + {% assign github_link = site.settings.navbar.github.link | default: 'GitHub' %} + {% assign github_icon = site.settings.navbar.github.icon | default: 'globe' %} + {% capture github_icon %} {% endcapture %} + {{ github_icon }}{{ github_link }} + {% endif %} + {% assign author_email = site.settings.author.email | default: 'John.Doe@example.com' %} +  {{ author_email }} +
+{% endcapture %} + +{% include jekyll-theme/sidebar/entry.html content=links_content %} + +{% endunless %} -- cgit v1.2.3