From c8bbc25228a7d199ca6868db7375f1661c3ef6e4 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 23 Mar 2022 16:52:53 +0300 Subject: _includes: move everything to jekyll-theme/ --- _includes/common/footer.html | 72 --------------------------------- _includes/common/ga.html | 9 ----- _includes/common/header.html | 80 ------------------------------------- _includes/common/navbar.html | 66 ------------------------------ _includes/common/sidebar.html | 47 ---------------------- _includes/common/sidebar_entry.html | 4 -- 6 files changed, 278 deletions(-) delete mode 100644 _includes/common/footer.html delete mode 100644 _includes/common/ga.html delete mode 100644 _includes/common/header.html delete mode 100644 _includes/common/navbar.html delete mode 100644 _includes/common/sidebar.html delete mode 100644 _includes/common/sidebar_entry.html (limited to '_includes/common') diff --git a/_includes/common/footer.html b/_includes/common/footer.html deleted file mode 100644 index 9331784..0000000 --- a/_includes/common/footer.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - {% assign scripts = '' | split: '' %} - {% if site.settings.scripts %} - {% assign scripts = scripts | concat: site.settings.scripts %} - {% endif %} - {% if page.scripts %} - {% assign scripts = scripts | concat: page.scripts %} - {% endif %} - - {% for script in scripts %} - {% assign abs_check = script.src | downcase | split: '//' %} - {% if abs_check[0] == 'http:' or abs_check[0] == 'https:' or abs_check[0] == '' %} - {% assign url = script.src %} - {% else %} - {% assign abs_check = script.src | slice: 0 %} - {% if abs_check == '/' %} - {% assign url = script.src %} - {% else %} - {% assign url = script.src | relative_url %} - {% endif %} - {% endif %} - - {% endfor %} - - diff --git a/_includes/common/ga.html b/_includes/common/ga.html deleted file mode 100644 index 56eaca7..0000000 --- a/_includes/common/ga.html +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/_includes/common/header.html b/_includes/common/header.html deleted file mode 100644 index 07ba1c5..0000000 --- a/_includes/common/header.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - {% assign project_name = site.settings.project.name %} - {% unless project_name %} - {% if site.github %} - {% comment %} - What the damn hell? site.github.is_project_page is set to true even - for my root user site (the one with the .github.io suffix). - TODO: remove the following workaround and replace with a simple check - site.github.is_project_page above when this is fixed? - {% endcomment %} - {% capture assumed_user_name %}{{ site.github.owner_name }}.github.io{% endcapture %} - {% if site.github.repository_name != assumed_user_name %} - {% assign project_name = site.github.repository_name %} - {% endif %} - {% endif %} - {% endunless %} - {% assign author_name = site.settings.author.name %} - {% unless author_name %} - {% if site.github %} - {% assign author_name = site.github.owner_name %} - {% endif %} - {% endunless %} - {% assign author_name = author_name | default: 'John Doe' %} - {% if project_name %} - {% capture title %}{{ project_name }} - {{ author_name }}{% endcapture %} - {% else %} - {% capture title %}{{ author_name }}{% endcapture %} - {% endif %} - {% if page.url != '/' %} - {% capture title %}{{ page.title }} - {{ title }}{% endcapture %} - {% endif %} - {{ title }} - - - - - {% include mathjax.html %} - - - - {% assign links = '' | split: '' %} - {% if site.settings.links %} - {% assign links = links | concat: site.settings.links %} - {% endif %} - {% if page.links %} - {% assign links = links | concat: page.links %} - {% endif %} - - {% for link in links %} - {% assign abs_check = link.href | downcase | split: '//' %} - {% if abs_check[0] == 'http:' or abs_check[0] == 'https:' or abs_check[0] == '' %} - {% assign url = link.href %} - {% else %} - {% assign abs_check = link.href | slice: 0 %} - {% if abs_check == '/' %} - {% assign url = link.href %} - {% else %} - {% assign url = link.href | relative_url %} - {% endif %} - {% endif %} - - {% endfor %} - - {% if site.settings.ga_tag %} - {% include common/ga.html ga_tag=site.settings.ga_tag %} - {% endif %} - - -
- {% include common/navbar.html %} -
diff --git a/_includes/common/navbar.html b/_includes/common/navbar.html deleted file mode 100644 index 67db12e..0000000 --- a/_includes/common/navbar.html +++ /dev/null @@ -1,66 +0,0 @@ -{% unless site.settings.navbar.hide or page.navbar.hide %} - -{% endunless %} diff --git a/_includes/common/sidebar.html b/_includes/common/sidebar.html deleted file mode 100644 index 4eeeac2..0000000 --- a/_includes/common/sidebar.html +++ /dev/null @@ -1,47 +0,0 @@ -{% unless site.settings.sidebar.hide or page.sidebar.hide %} -
- -{% capture about_content %} -{% assign project_desc = site.settings.project.description %} -{% unless project_desc %} - {% if site.github %} - {% assign project_desc = site.github.project_tagline %} - {% endif %} -{% endunless %} -{% if project_desc %} - {% capture project_desc %}{{ project_desc }}. {% endcapture %} -{% endif %} -{% capture project_desc %}{{ project_desc }}Feel free to contribute or contact me.{% endcapture %} -

{{ project_desc }}

-
- {% 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 common/sidebar_entry.html header='About' content=about_content %} - -{% if site.posts.size > 0 %} - -{% capture latest_posts_content %} -
- {% for post in site.posts limit: 5 %} - -  {{ post.date | date: '%-d %b %Y' }} -  {{ post.title }} - - {% endfor %} -
-{% endcapture %} - -{% include common/sidebar_entry.html header='Latest posts' content=latest_posts_content %} -{% endif %} - -
-{% endunless %} diff --git a/_includes/common/sidebar_entry.html b/_includes/common/sidebar_entry.html deleted file mode 100644 index 761119d..0000000 --- a/_includes/common/sidebar_entry.html +++ /dev/null @@ -1,4 +0,0 @@ -
-

{{ include.header }}

- {{ include.content }} -
-- cgit v1.2.3