Browse Source

add templates to example blog

Oz N Tiram 9 years ago
parent
commit
e23872e08a

+ 14 - 0
example/templates/archive_index.html

@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+{% block title %} Archive » {{ site_url }} {% endblock %}
+{% block content %}
+<div class="archive index">
+<h2>This is an archive of everything posted here ...</h2>
+  {% for entry in entries %}
+    <p class="post">{{ entry.publish_date}} <a title="../{{ entry.permalink }}" href="../{{entry.permalink}}">{{entry.title }}</a></p>
+  {% endfor %}
+</div>
+{% endblock content %}
+{% block body %}
+{{ super() }}
+{% set static_prefix = "../../" %}
+{% endblock body %}

+ 23 - 0
example/templates/atom.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+<title>Oz's Blog</title>
+<subtitle>Oz's weblog</subtitle>
+<link href="http://oz123.github.com/atom.xml" rel="self" />
+<link href="http://oz123.github.com/" />
+<id>http://oz123.github.com/atom.xml</id>
+<updated>{{ last_build }}</updated>
+<author>
+  <name>Oz Nahum Tiram</name>
+  <email>nahumoz@gmail.com</email>
+</author>
+{% for entry in entries %}
+<entry>
+  <title>{{ entry.title }}</title>
+  <link href="{{ entry.permalink }}" />
+  <id>{{ entry.destination }}</id>
+  <content type="xhtml">
+    <div xmlns="http://www.w3.org/1999/xhtml">{{ entry.summary_atom }}</div>
+  </content>
+  </entry>
+{% endfor %}
+</feed>

+ 62 - 0
example/templates/base.html

@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<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>{% block title %}{% endblock title %}</title>
+<link rel="stylesheet" type="text/css" href="/media/css/bootstrap.min.css"/>
+<link rel="stylesheet" type="text/css" href="/media/css/style.css" />
+<link rel="stylesheet" type="text/css" href="/media/css/pygments_style.css" media="screen" />
+<link rel="stylesheet" type="text/css" href="/media/css/site.css" media="screen" />
+<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />
+<body>
+	<div class="container-fluid">
+		<div class="row" style="padding-top: 10px">
+			<div class="col-lg-1 col-md-1"></div>
+			<div class="col-lg-1 col-md-1 col-sm-2">
+			{% block navbar %}
+				<div class="sidebar-nav">
+					<div class="navbar navbar-default" role="navigation">
+						<div class="navbar-header">
+							<button type="button" class="navbar-left navbar-toggle" data-toggle="collapse" data-target=".sidebar-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>
+							<span class="visible-xs navbar-brand">menu</span>
+						</div><!--navbar-header-->
+						<div id="menu">
+							<div class="navbar-collapse collapse sidebar-navbar-collapse">
+								<div id="profile"><img src="/media/img/me.png"></div>				
+								<a title="Home" href="/">home</a>
+								<a title="About" class="about" href="/about.html">about</a>
+								<a title="Archive" class="archive" href="/archive">archive</a>
+								<a title="Atom feeds" href="/atom.xml">atom</a>
+								<a title="Twitter" href="https://twitter.com/#!/OzNTiram">twitter</a>
+								<a title="Stackoverflow" href="http://stackoverflow.com/users/492620/oz123">stackoverflow</a>
+								<a title="Github" href="https://github.com/oz123">github</a>
+								</div><!--/.nav-collapse -->
+							</div><!-- menu -->
+						</div><!--navbar-->
+				</div><!--sidebar-->
+				{% endblock navbar %}
+			</div> <!-- end of colum -->
+			<div class="col-lg-7 col-md-7 col-sm-10">
+			{% block content %}
+			{% endblock content %}
+			<div id="footer"><p>&copy; Oz Nahum Tiram 2016. Some Rights Reserved</p></div>
+			</div><!-- end column-->
+		<div class="col-lg-3"></div>
+	</div><!--end row-->
+	</div><!--end container-->
+	{% block scripts %}
+	<script src="/media/js/jquery.min.js"></script>
+	<script src="/media/js/bootstrap.min.js"></script>
+	<script src="/media/js/scripts.js"></script>
+	{% endblock scripts %}
+	</body>
+</html>
+

+ 25 - 0
example/templates/entry.html

@@ -0,0 +1,25 @@
+{% extends "base.html" %}
+{% block title %} {{ entry.title }} {% endblock %}
+{% block content %}
+<div class="index">
+	<div id="header" class="published"><a href="{{site_url}}">{{ entry.author }}</a> &ndash; {{ entry.publish_date }}</div>
+	<h1>{{ entry.title }}</h1>
+	{{ entry.body_html }}
+	<div class="tags">
+	<p>This entry was tagged:
+	{% for tag in entry.tags %}<a class="tag" href="/tags/{{ tag.slug }}"><span>{{ tag.name }}</span></a>{% if not loop.last %}, {% endif %}{% endfor %}
+	</div>
+	<div id="social-btns" style="margin-top: 50px; margin-bottom: 0px">
+		<h4>Share this post:</h4>
+		<a href="https://www.linkedin.com/shareArticle?mini=true&url={{site_url}}{{entry.permalink}}&title={{entry.title}}&source={{site_url}}" onclick="javascript:window.open(this.href, 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><i class="fa fa-linkedin-square fa-2x"></i></a>
+		<a href="http://www.facebook.com/sharer/sharer.php?u={{site_url}}{{entry.permalink}}&title={{entry.title}}" onclick="javascript:window.open(this.href, 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><i class="fa fa-facebook-square fa-2x"></i></a>
+		<a class="tweet" href="{{site_url}}/{{entry.permalink}}" title="{{entry.title}}" target="_blank"><i class="fa fa-twitter-square fa-2x"></i></a>
+		<a href="https://plus.google.com/share?url={{site_url}}{{entry.permalink}}" onclick="javascript:window.open(this.href, 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><i class="fa fa-google-plus-square fa-2x"></i></a>
+		<a href="mailto:?subject={{site_url}}{{entry.permalink}}&body={{entry.title}}" onclick="javascript:window.open(this.href, 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><i class="fa fa-envelope-square fa-2x"></i></a>
+	</div>
+	<div id="underpost">
+		<h3>Discussions/Feedback.</h3>
+		{% include 'discuss.html' %}
+	</div>
+</div>
+{% endblock content %}

+ 23 - 0
example/templates/entry_index.html

@@ -0,0 +1,23 @@
+{% extends "base.html" %}
+{% block content %}
+<div class="index">
+  {% for entry in entries %}
+  <div class="clearfix entry">
+	 <h2><a title="Goes to &rarr; {{ entry.permalink }}" href="{{ entry.permalink }}">{{ entry.title }}</a></h2>
+	<div class="clearfix">
+    <div class="date-published">{{ entry.publish_date }}</div>
+		<div class="tags">tagged:
+		  {% for tag in entry.tags %}
+		   <a class="tag" href="/tags/{{ tag.slug }}"><span>{{ tag.name }}</span></a>{% if not loop.last %}, {% endif %}
+		   {% endfor %}
+		</div>
+     </div>
+     <p>{{ entry.summary }}</p>
+
+	<div class="link-url"><p><a href="{{ entry.permalink }}">continue reading ...</a></p></div>
+	<div class="permalink"><a title="Permalink to: {{ entry.title }}" href="{{ entry.permalink }}"><span>&para;</span></a></div>
+
+   </div>
+   {% endfor %}
+</div>
+{% endblock %}

+ 15 - 0
example/templates/includes/discuss.html

@@ -0,0 +1,15 @@
+{% block disqus %}
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'oz123githubcom'; // 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 = 'http://' + 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="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+{% endblock %}

+ 11 - 0
example/templates/includes/google_analytics.html

@@ -0,0 +1,11 @@
+<script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-36587163-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+</script>

+ 22 - 0
example/templates/includes/sidebar.html

@@ -0,0 +1,22 @@
+
+<div id="nav">
+  <div><img src="/media/img/me.png"></div>
+  <a title="Home" href="/">home</a>
+  <a title="About" class="about" href="/about.html">about</a>
+  <a title="Archive" class="archive" href="/archive">archive</a>
+  <a title="Atom feeds" href="/atom.xml">atom</a>
+  <a title="Twitter" href="https://twitter.com/#!/OzNTiram">twitter</a>
+  <a title="Stackoverflow" href="http://stackoverflow.com/users/492620/oz123">stackoverflow</a>
+  <a title="Github" href="https://github.com/oz123">github</a>
+  <script type="text/javascript"><!--
+      google_ad_client = "ca-pub-2570499281263620";
+      /* new_tower_for_oz123githubcom */
+      google_ad_slot = "8107518414";
+      google_ad_width = 120;
+      google_ad_height = 600;
+      //-->
+  </script>
+  <script type="text/javascript"
+      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+  </script>
+</div>

+ 8 - 0
example/templates/pages/about.html

@@ -0,0 +1,8 @@
+{% extends "../base.html" %}
+{% block title %} {{ entry.title }} {% endblock %}
+{% block content %}
+<div class="index">
+<h1>{{ entry.title }}</h1>
+  {{ entry.body_html }}
+</div>
+{% endblock content %}

+ 7 - 0
example/templates/tag_index.html

@@ -0,0 +1,7 @@
+{% extends "entry_index.html" %}
+{% block page_title %}tag: {{tag.name}} {% endblock %}
+{% block header %}
+<h1 class="tag_name">
+tag: {{ tag.name }}<sup>[<a class="tag_feed_icon" title="Atom feed for {{tag.name}} tag" href="/tags/{{ tag.slug }}/atom.xml">atom feeds</a>]</sup>
+</h1>
+{% endblock %}