aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/comments.html16
-rw-r--r--_includes/footer.html23
-rw-r--r--_includes/header.html25
-rw-r--r--_includes/links.html11
-rw-r--r--_includes/navbar.html20
-rw-r--r--_includes/pagination.html30
-rw-r--r--_includes/sidebar.html16
7 files changed, 141 insertions, 0 deletions
diff --git a/_includes/comments.html b/_includes/comments.html
new file mode 100644
index 0000000..1f3e808
--- /dev/null
+++ b/_includes/comments.html
@@ -0,0 +1,16 @@
+{% if site.include_comments %}
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'cpp-tips'; // required: replace example with your forum shortname
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+{% endif %}
+ \ No newline at end of file
diff --git a/_includes/footer.html b/_includes/footer.html
new file mode 100644
index 0000000..3bfc5a2
--- /dev/null
+++ b/_includes/footer.html
@@ -0,0 +1,23 @@
+ </div>
+ </div>
+ <div class="block">
+ <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-mutex"><small>This project is licensed under the terms of the MIT License. See <a href="https://github.com/egor-tensin/egor-tensin.github.io#licensing">Licensing</a> for details.</small></div>
+ </div>
+ <div style="display: table-cell;">
+ <div class="text-right text-muted"><small>This blog was last updated on: {{ site.time | date_to_long_string }}.</small></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </footer>
+ </div>
+ </div>
+ <script src="//code.jquery.com/jquery-1.11.0.js"></script>
+ <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.js"></script>
+ </body>
+</html>
diff --git a/_includes/header.html b/_includes/header.html
new file mode 100644
index 0000000..e3a9158
--- /dev/null
+++ b/_includes/header.html
@@ -0,0 +1,25 @@
+<!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.0">
+ <title>{{ page.title }}</title>
+ <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.css">
+
+ <link rel="stylesheet" href="{{ site.baseurl }}/css/syntax.css">
+ <link rel="stylesheet" href="{{ site.baseurl }}/css/footer.css">
+
+ <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
+ <!--[if lt IE 9]>
+ <script src="//oss.maxcdn.com/html5shiv/3.7.2/html5shiv.js"></script>
+ <script src="//oss.maxcdn.com/respond/1.4.2/respond.js"></script>
+ <![endif]-->
+ </head>
+ <body>
+ <div class="wrapper">
+ <div class="block">
+ {% include navbar.html %}
+ </div>
+ <div class="block push">
+ <div class="container">
diff --git a/_includes/links.html b/_includes/links.html
new file mode 100644
index 0000000..70e643b
--- /dev/null
+++ b/_includes/links.html
@@ -0,0 +1,11 @@
+{% for node in page_list %}
+ {% if group == null or group == node.group %}
+ {% if page.url == node.url %}
+ <li class="active"><a href="{{ site.baseurl }}{{ node.url }}" class="active">{{ node.title }}</a></li>
+ {% else %}
+ <li><a href="{{ site.baseurl }}{{ node.url }}">{{ node.title }}</a></li>
+ {% endif %}
+ {% endif %}
+{% endfor %}
+{% assign page_list = nil %}
+{% assign group = nil %}
diff --git a/_includes/navbar.html b/_includes/navbar.html
new file mode 100644
index 0000000..f052baa
--- /dev/null
+++ b/_includes/navbar.html
@@ -0,0 +1,20 @@
+<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="/">Egor Tensin</a>
+ </div>
+ <div class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ {% assign page_list = site.pages %}
+ {% assign group = 'navigation' %}
+ {% include links.html %}
+ </ul>
+ </div>
+ </div>
+</nav>
diff --git a/_includes/pagination.html b/_includes/pagination.html
new file mode 100644
index 0000000..aa2f034
--- /dev/null
+++ b/_includes/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/sidebar.html b/_includes/sidebar.html
new file mode 100644
index 0000000..1a1f9a4
--- /dev/null
+++ b/_includes/sidebar.html
@@ -0,0 +1,16 @@
+<h4>About the project</h4>
+<p>Thoughts on C++ and life. Feel free to contribute or contact me.</p>
+<div class="list-group" style="max-width: 400px;">
+ <a class="list-group-item" href="//github.com/egor-tensin/cpp_tips"><span class="glyphicon glyphicon-home"></span>&nbsp;GitHub repository</a>
+ <a class="list-group-item" href="mailto:Egor.Tensin@gmail.com"><span class="glyphicon glyphicon-envelope"></span>&nbsp;Egor.Tensin@gmail.com</a>
+</div>
+<h4>Latest posts</h4>
+{% if site.posts.size == 0 %}
+ <p>Sorry, there're no posts yet.</p>
+{% else %}
+ <div class="list-group">
+ {% 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 %}