Cleanup and building static site

This commit is contained in:
2016-10-22 20:42:17 +02:00
parent a27daafa0a
commit 6c27c1d3f4
93 changed files with 166 additions and 5439 deletions

View File

@@ -1,80 +1,53 @@
<!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">
<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/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">
</head>
<!-- <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> -->
<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="/about/">About</a>
</div><!--links-->
</div><!--header-->
<!-- <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> -->
<div id="contents">
{% block page %}
{% endblock page %}
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</div><!--contents-->
<script src="/src/blankwin.js" type="text/javascript"></script>
</div><!--wrap-->
</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">
&copy; 2012
<a href="mailto:thomasloven@gmail.com">Thomas Lovén</a>
<div id="bottom">
&copy; 2012
<a href="mailto:thomasloven@gmail.com">Thomas Lovén</a>
-
<a href="http://twitter.com/thomasloven">@thomasloven</a>
<a href="http://twitter.com/thomasloven">@thomasloven</a>
-
<a href="http://github.com/thomasloven">GitHub</a>
</div><!--bottom-->
</div><!--bottom-->
</body>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="/src/blankwin.js" type="text/javascript"></script>
<script>
blankwin();
$('body').width($('body').width()+1).width('auto');
</script>
{% block morescripts %}
{% endblock morescripts %}
</body>
</html>

View File

@@ -1,43 +0,0 @@
{% extends "base.html" %}
{% block page %}
<div id="categories">
{% if title %}
<a href="{{url_for("blog_default")}}">All</a>
{% else %}
All
{% endif %}
{% for tag in tags %}
{% if tag == title %}
-
{{ tag }}
{% else %}
-
<a href="{{url_for("tag", tag=tag)}}">{{ tag }}</a>
{% endif %}
{% endfor %}
</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 %}

View File

@@ -0,0 +1,43 @@
{% extends "base.html" %}
{% block page %}
<div id="categories">
{% if title %}
<a href="{{url_for("blog_listing")}}">All</a>
{% else %}
All
{% endif %}
{% for tag in tags %}
{% if tag == title %}
- {{ tag }}
{% else %}
- <a href="{{url_for("blog_listing", tag=tag)}}">{{ tag }}</a>
{% endif %}
{% endfor %}
</div>
<div class="content">
<ol class="content-list">
{% for post in posts %}
<li class="content">
<h3 class="postTitle"><a href="{{ url_for("permalink",
path=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>
{% endblock page %}
{% block morescripts %}
<script type="text/javascript">
var disqus_shortname = 'thomasloven';
/* * * 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 morescripts %}

28
templates/blog_post.html Normal file
View 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 %}

View File

@@ -1,28 +0,0 @@
{% 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 %}