Initial commit - Begun rewrite of website generator
This commit is contained in:
80
templates/base.html
Normal file
80
templates/base.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="light red">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
|
||||
<title>
|
||||
Thomas Lovén - {% if page %}{{ page.title }}{% endif %}
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="/src/solarized.css">
|
||||
<link rel="stylesheet" type="text/css" href="/src/fonts/dejavuserif/stylesheet.css">
|
||||
<link rel="stylesheet" type="text/css" href="/src/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="/src/site-solarized.css">
|
||||
<link rel="stylesheet" type="text/css" href="/src/codestyle.css">
|
||||
|
||||
<!-- <script type="text/javascript" src="/src/prettify.js"></script> -->
|
||||
<!-- <script type="text/javascript" src="/src/lang-tex.js"></script> -->
|
||||
<!-- <script type="text/javascript" src="/src/lang-nasm.js"></script> -->
|
||||
<!-- <script type="text/javascript" src="/src/lang-betyg.js"></script> -->
|
||||
|
||||
<!-- <script type="text/x-mathjax-config"> -->
|
||||
<!-- MathJax.Hub.Config({ -->
|
||||
<!-- tex2jax: { -->
|
||||
<!-- skipTags: ["script","noscript","style","textarea","code"], -->
|
||||
<!-- ignoreClass: ".*", -->
|
||||
<!-- processClass: "latex" -->
|
||||
<!-- } -->
|
||||
<!-- }); -->
|
||||
<!-- MathJax.Hub.Queue( function() { -->
|
||||
<!-- var all = MathJax.Hub.getAllJax(), i; -->
|
||||
<!-- for(i=0; i < all.length; i += 1) { -->
|
||||
<!-- all[i].SourceElement().parentNode.className += ' has-jax'; -->
|
||||
<!-- } -->
|
||||
<!-- }); -->
|
||||
<!-- </script> -->
|
||||
<!-- <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script> -->
|
||||
|
||||
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
|
||||
|
||||
<script src="/src/blankwin.js" type="text/javascript"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<!-- <body onload="$('pre').not('.nopretty').not('.latex').addClass('prettyprint'); prettyPrint(); blankwin(); $('body').width($('body').width()+1).width('auto')"> -->
|
||||
<body>
|
||||
|
||||
<div id="wrap">
|
||||
<div id="header">
|
||||
<div id="title">
|
||||
<h2>ThomasLovén.com</h2>
|
||||
</div><!--title-->
|
||||
<div id="links">
|
||||
<a href="/">Home</a>
|
||||
-
|
||||
<a href="/blog/">Blog</a>
|
||||
-
|
||||
<a href="/photos/">Photos</a>
|
||||
-
|
||||
<a href="/about/">About</a>
|
||||
</div><!--links-->
|
||||
</div><!--header-->
|
||||
|
||||
<div id="contents">
|
||||
{% block page %}
|
||||
{% endblock page %}
|
||||
|
||||
</div><!--contents-->
|
||||
|
||||
</div><!--wrap-->
|
||||
|
||||
<div id="bottom">
|
||||
© 2012
|
||||
<a href="mailto:thomasloven@gmail.com">Thomas Lovén</a>
|
||||
-
|
||||
<a href="http://twitter.com/thomasloven">@thomasloven</a>
|
||||
-
|
||||
<a href="http://github.com/thomasloven">GitHub</a>
|
||||
</div><!--bottom-->
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
37
templates/blog.html
Normal file
37
templates/blog.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block page %}
|
||||
<div id="categories">
|
||||
<a href="{{url_for("blog_default")}}">All</a>
|
||||
{% for tag in tags %}
|
||||
-
|
||||
<a href="{{url_for("tag", tag=tag)}}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% if title %}
|
||||
{{ title }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="content">
|
||||
<ol class="content-list">
|
||||
{% for post in posts %}
|
||||
<li class="content">
|
||||
<h3 class="postTitle"><a href="{{ post.url }}">{{ post.title }}</a></h3><p class="postDate">{{ post.datestr }}</p><p class="postSubTitle">{{ post.subtitle }}<br>
|
||||
<a href="{{ post.url }}#disqus_thread" data-disqus-identifier="{{ post.url[:-1] }}"></a></p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = 'thomasloven'; // required: replace example with your forum shortname
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
</script>
|
||||
{% endblock page %}
|
||||
8
templates/page.html
Normal file
8
templates/page.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block page %}
|
||||
<h1> {{ page.title }} </h1>
|
||||
|
||||
{{ page }}
|
||||
|
||||
{% endblock page %}
|
||||
28
templates/post.html
Normal file
28
templates/post.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block page %}
|
||||
<h1> {{ page.title }} </h1>
|
||||
<div id="subtitle">
|
||||
<p>{{ page.datestr }}</p>
|
||||
</div>
|
||||
<div id="post-text">
|
||||
{{ page }}
|
||||
<h2 id="comment">Comments</h2>
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = 'thomasloven'; // required: replace example with your forum shortname
|
||||
var disqus_identifier = '{{ page.url[:-1] }}';
|
||||
|
||||
/* * * 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>
|
||||
|
||||
</div>
|
||||
{% endblock page %}
|
||||
Reference in New Issue
Block a user