aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes/common
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-06-25 02:13:47 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-06-25 02:13:47 +0300
commit7f02962f5502bb581f0b50d534be0bcea0a739b2 (patch)
tree43a1cd08cbb888e674e0333a054da787ce8c1599 /_includes/common
parentREADME update (diff)
downloadjekyll-theme-7f02962f5502bb581f0b50d534be0bcea0a739b2.tar.gz
jekyll-theme-7f02962f5502bb581f0b50d534be0bcea0a739b2.zip
move common assets to common/, more info to config
Diffstat (limited to '_includes/common')
-rw-r--r--_includes/common/bootstrap_css.html5
-rw-r--r--_includes/common/bootstrap_js.html5
-rw-r--r--_includes/common/footer.html25
-rw-r--r--_includes/common/header.html29
-rw-r--r--_includes/common/ie_compat.html11
-rw-r--r--_includes/common/jquery.html5
-rw-r--r--_includes/common/navbar.html26
-rw-r--r--_includes/common/pagination.html30
-rw-r--r--_includes/common/sidebar.html16
9 files changed, 152 insertions, 0 deletions
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..9ff7838
--- /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 }}#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..4637244
--- /dev/null
+++ b/_includes/common/sidebar.html
@@ -0,0 +1,16 @@
+<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>
+<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 %}