From 860ae3c81409ba0e49c224bc1431e1835d500196 Mon Sep 17 00:00:00 2001
From: Egor Tensin <Egor.Tensin@gmail.com>
Date: Sat, 25 Jun 2016 03:20:21 +0300
Subject: move common assets to common/, more info to config

---
 _includes/common/bootstrap_css.html |  5 +++++
 _includes/common/bootstrap_js.html  |  5 +++++
 _includes/common/footer.html        | 25 +++++++++++++++++++++++++
 _includes/common/header.html        | 29 +++++++++++++++++++++++++++++
 _includes/common/ie_compat.html     | 11 +++++++++++
 _includes/common/jquery.html        |  5 +++++
 _includes/common/navbar.html        | 26 ++++++++++++++++++++++++++
 _includes/common/pagination.html    | 30 ++++++++++++++++++++++++++++++
 _includes/common/sidebar.html       | 18 ++++++++++++++++++
 9 files changed, 154 insertions(+)
 create mode 100644 _includes/common/bootstrap_css.html
 create mode 100644 _includes/common/bootstrap_js.html
 create mode 100644 _includes/common/footer.html
 create mode 100644 _includes/common/header.html
 create mode 100644 _includes/common/ie_compat.html
 create mode 100644 _includes/common/jquery.html
 create mode 100644 _includes/common/navbar.html
 create mode 100644 _includes/common/pagination.html
 create mode 100644 _includes/common/sidebar.html

(limited to '_includes/common')

diff --git a/_includes/common/bootstrap_css.html b/_includes/common/bootstrap_css.html
new file mode 100644
index 0000000..f47b856
--- /dev/null
+++ b/_includes/common/bootstrap_css.html
@@ -0,0 +1,5 @@
+{% if site.minified_externals %}
+  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/css/bootstrap.min.css">
+{% else %}
+  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/css/bootstrap.css">
+{% endif %}
diff --git a/_includes/common/bootstrap_js.html b/_includes/common/bootstrap_js.html
new file mode 100644
index 0000000..e724257
--- /dev/null
+++ b/_includes/common/bootstrap_js.html
@@ -0,0 +1,5 @@
+{% if site.minified_externals %}
+  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/js/bootstrap.min.js"></script>
+{% else %}
+  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/{{ site.bootstrap_version }}/js/bootstrap.js"></script>
+{% endif %}
diff --git a/_includes/common/footer.html b/_includes/common/footer.html
new file mode 100644
index 0000000..0273971
--- /dev/null
+++ b/_includes/common/footer.html
@@ -0,0 +1,25 @@
+        </div>
+      </div>
+      <div class="footer-wrapper-collapse">
+        <footer class="navbar-default">
+          <div class="container">
+            <div style="display: table; width: 100%;">
+              <div style="display: table-row;">
+                <div style="display: table-cell;">
+                  <div class="text-center text-muted"><small>This project is licensed under the terms of the MIT License. See <a href="{{ site.github.repository_url }}/blob/gh-pages/README.md#license">License</a> for details.</small></div>
+                </div>
+              </div>
+              <div style="display: table-row;">
+                <div style="display: table-cell;">
+                  <div class="text-center text-muted"><small>This blog was last updated on: {{ site.time | date_to_long_string }}.</small></div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </footer>
+      </div>
+    </div>
+    {% include common/jquery.html %}
+    {% include common/bootstrap_js.html %}
+  </body>
+</html>
diff --git a/_includes/common/header.html b/_includes/common/header.html
new file mode 100644
index 0000000..c21b442
--- /dev/null
+++ b/_includes/common/header.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    <title>{{ page.title }} - {{ site.project.name }} - {{ site.personal_info.name }}</title>
+
+    {% include common/bootstrap_css.html %}
+
+    <link rel="stylesheet" href="{{ site.baseurl }}/css/common/footer.css">
+    <link rel="stylesheet" href="{{ site.baseurl }}/css/common/misc.css">
+
+    {% if page.custom_css %}
+      {% for css in page.custom_css %}
+        <link rel="stylesheet" href="{{ site.baseurl }}/css/{{ css }}"/>
+      {% endfor %}
+    {% endif %}
+
+    {% include common/ie_compat.html %}
+  </head>
+  <body>
+    <div class="top-level-footer-wrapper">
+      <div class="footer-wrapper-collapse">
+        {% include common/navbar.html %}
+      </div>
+      <div class="footer-wrapper-expand">
+        <div class="container">
diff --git a/_includes/common/ie_compat.html b/_includes/common/ie_compat.html
new file mode 100644
index 0000000..3cef67d
--- /dev/null
+++ b/_includes/common/ie_compat.html
@@ -0,0 +1,11 @@
+{% if site.minified_externals %}
+  <!--[if lt IE 9]>
+    <script src="https://oss.maxcdn.com/html5shiv/{{ site.html5shiv_version }}/html5shiv.min.js"></script>
+    <script src="https://oss.maxcdn.com/respond/{{ site.respond_version }}/respond.min.js"></script>
+  <![endif]-->
+{% else %}
+  <!--[if lt IE 9]>
+    <script src="https://oss.maxcdn.com/html5shiv/{{ site.html5shiv_version }}/html5shiv.js"></script>
+    <script src="https://oss.maxcdn.com/respond/{{ site.respond_version }}/respond.js"></script>
+  <![endif]-->
+{% endif %}
diff --git a/_includes/common/jquery.html b/_includes/common/jquery.html
new file mode 100644
index 0000000..aa6d2fd
--- /dev/null
+++ b/_includes/common/jquery.html
@@ -0,0 +1,5 @@
+{% if site.minified_externals %}
+  <script src="https://code.jquery.com/jquery-{{ site.jquery_version }}.min.js"></script>
+{% else %}
+  <script src="https://code.jquery.com/jquery-{{ site.jquery_version }}.js"></script>
+{% endif %}
diff --git a/_includes/common/navbar.html b/_includes/common/navbar.html
new file mode 100644
index 0000000..af4a1c5
--- /dev/null
+++ b/_includes/common/navbar.html
@@ -0,0 +1,26 @@
+<nav class="navbar navbar-default navbar-static-top" role="navigation">
+  <div class="container">
+    <div class="navbar-header">
+      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+        <span class="sr-only">Toggle navigation</span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+      </button>
+      <a class="navbar-brand" href="/">{{ site.personal_info.name }}</a>
+    </div>
+    <div class="navbar-collapse collapse">
+      <ul class="nav navbar-nav">
+        {% for node in site.pages %}
+          {% if node.groups contains 'navbar' %}
+            {% if page.url == node.url %}
+              <li class="active"><a href="{{ site.baseurl }}{{ node.url }}" class="active">{{ node.navbar_link }}</a></li>
+            {% else %}
+              <li><a href="{{ site.baseurl }}{{ node.url }}">{{ node.navbar_link }}</a></li>
+            {% endif %}
+          {% endif %}
+        {% endfor %}
+      </ul>
+    </div>
+  </div>
+</nav>
diff --git a/_includes/common/pagination.html b/_includes/common/pagination.html
new file mode 100644
index 0000000..aa2f034
--- /dev/null
+++ b/_includes/common/pagination.html
@@ -0,0 +1,30 @@
+{% if site.posts.size != 0 %}
+<ul class="pagination">
+  {% if paginator.previous_page %}
+    {% if paginator.previous_page == 1 %}
+      <li><a href="{{ site.baseurl }}/"><span class="glyphicon glyphicon-chevron-left"></span>&nbsp;Prev</a></li>
+    {% else %}
+      <li><a href="{{ site.baseurl }}/page{{ paginator.previous_page }}"><span class="glyphicon glyphicon-chevron-left"></span>&nbsp;Prev</a></li>
+    {% endif %}
+  {% else %}
+    <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span>&nbsp;Prev</a></li>
+  {% endif %}
+  {% if paginator.page == 1 %}
+    <li class="active"><a href="{{ site.baseurl }}/">1</a></li>
+  {% else %}
+    <li><a href="{{ site.baseurl }}/">1</a></li>
+  {% endif %}
+  {% for count in (2..paginator.total_pages) %}
+    {% if count == paginator.page %}
+      <li class="active"><a href="{{ site.baseurl }}/page{{ count }}">{{ count }}</a></li>
+    {% else %}
+      <li><a href="{{ site.baseurl }}/page{{ count }}">{{ count }}</a></li>
+    {% endif %}
+  {% endfor %}
+  {% if paginator.next_page %}
+    <li><a href="{{ site.baseurl }}/page{{ paginator.next_page }}">Next&nbsp;<span class="glyphicon glyphicon-chevron-right"></span></a></li>
+  {% else %}
+    <li class="disabled"><a href="#">Next&nbsp;<span class="glyphicon glyphicon-chevron-right"></span></a></li>
+  {% endif %}
+</ul>
+{% endif %}
diff --git a/_includes/common/sidebar.html b/_includes/common/sidebar.html
new file mode 100644
index 0000000..e6041c3
--- /dev/null
+++ b/_includes/common/sidebar.html
@@ -0,0 +1,18 @@
+<h4>About the project</h4>
+<p>{{ site.project.description }}. Feel free to contribute or contact me.</p>
+<div class="list-group wide-enough">
+  <a class="list-group-item" href="{{ site.github.repository_url }}"><span class="glyphicon glyphicon-home"></span>&nbsp;GitHub repository</a>
+  <a class="list-group-item" href="mailto:{{ site.personal_info.email }}"><span class="glyphicon glyphicon-envelope"></span>&nbsp;{{ site.personal_info.email }}</a>
+</div>
+<p>The implemented algorithms have been plotted to study their performance.
+You can examine the plots <a href="{{ site.baseurl }}/plots.html">here</a>.</p>
+<h4>Latest posts</h4>
+{% if site.posts.size == 0 %}
+  <p>Sorry, there're no posts yet.</p>
+{% else %}
+  <div class="list-group wide-enough">
+  {% for post in site.posts limit: 5 %}
+    <a class="list-group-item" href="{{ site.baseurl }}{{ post.url }}"><span class="badge"><span class="glyphicon glyphicon-time"></span>&nbsp;{{ post.date | date_to_string }}</span><span class="glyphicon glyphicon-file"></span>&nbsp;{{ post.title }}</a>
+  {% endfor %}
+  </div>
+{% endif %}
-- 
cgit v1.2.3