summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2017-09-19 19:30:22 +0930
committerdaniel-Jones <daniel@danieljon.es>2017-09-19 19:30:22 +0930
commitb0fce1f82059837a68f47f28a8b903a8a09cbdfe (patch)
tree0947c56f2eba2184015f49e739475221c90c0d7b
parent0c41ff1395cbbcc13618985f54b3f2e570af7167 (diff)
downloadwebsite-b0fce1f82059837a68f47f28a8b903a8a09cbdfe.tar.gz
website-b0fce1f82059837a68f47f28a8b903a8a09cbdfe.zip
fixed a bunch of HTML compliance issues and general changes
-rw-r--r--generatesite.py6
-rw-r--r--settings.cfg4
-rw-r--r--template.txt31
3 files changed, 21 insertions, 20 deletions
diff --git a/generatesite.py b/generatesite.py
index e2972cf..1851658 100644
--- a/generatesite.py
+++ b/generatesite.py
@@ -38,13 +38,13 @@ def generateindex():
def generatepagebar(currentpage, pagecount):
print("generating page bar for {} total {}".format(currentpage, pagecount));
- pages = "<center>page ";
+ pages = "<div class='middle'>page ";
for x in range(1, int(pagecount)+1):
if x == int(currentpage):
pages += "<strong><i><a href=" + str(x) + ">" + str(x) + "</a></i></strong> ";
else:
pages += "<a href=" + str(x) + ">" + str(x) + "</a> ";
- pages += "</center>";
+ pages += "</div>";
return pages;
def generateportfolio():
@@ -117,7 +117,7 @@ def generateblog():
if count < postcount + 1:
with open(blogsrc + "/final/" + str(x) + ".txt") as contentfile:
content = contentfile.read();
- page += "<div id='" + str(total_count) + "'> <a href='" + str(cpage) + ".html#" + str(total_count) + "' name='" + str(total_count) + "'>#" + str(total_count) + "</a>" + content + "<hr>";
+ page += "<div id='" + str(total_count) + "'> <a href='" + str(cpage) + ".html#" + str(total_count) + "'>#" + str(total_count) + "</a>" + content + "</div><hr>";
count += 1;
total_count -= 1;
if cpage <= pagecount:
diff --git a/settings.cfg b/settings.cfg
index 406352a..f3446b5 100644
--- a/settings.cfg
+++ b/settings.cfg
@@ -2,7 +2,7 @@
template = template.txt
dir = output
[index]
-title = interesting stuff
+title = index
header = <h1>Index</h1>
src = content/index.txt
[portfolio]
@@ -11,7 +11,7 @@ header = <h1>Portfolio</h1>
src = content/portfolio.txt
[blog]
title = daniel's blog
-header = <h1>Blog</h1> Rambles about myself and programming
+header = <h1>Blog</h1> Rambles about myself and programming <br> <br>
# blog directory
dir = blog
srcdir = content/blog
diff --git a/template.txt b/template.txt
index 2a8299a..8fd03a9 100644
--- a/template.txt
+++ b/template.txt
@@ -1,32 +1,33 @@
-<html>
+<!DOCTYPE html>
+<html lang="en">
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
-<meta content="utf-8" http-equiv="encoding">
<meta name="keywords" content="Programming, C++, C, Blog">
<meta name="description" content="Personal blog/portfolio/site for Daniel Jones">
<meta name="author" content="Daniel Jones">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<link rel="icon" type="image/png" href="https://danieljon.es/favicon.png">
<title>{TITLE}</title>
-<style>
-img
-{
- max-width: 100%;
- max-height: 100%;
- overflow: hidden;
-}
+<style type="text/css">
+body{background-color:#222; color: #eee;}
+a:link{color: #3F51B5;}
+a:visited{#3F51B5;}
+img{max-width: 100%; max-height: 100%; overflow: hidden;}
+.middle{text-align: center;}
+#gentag{text-align: center; font-size: 75%;}
</style>
</head>
-<body bgcolor="#222" text="#eee" link="#3F51B5" vlink="#3F51B5">
-<center>
+<body>
+<div class="middle">
<h1>danieljon.es</h1>
-<a href="/">index</a> <a href="/blog">blog</a> <a href="/portfolio.html">portfolio</a> </font> <br /> <br />
+<a href="https://danieljon.es">index</a> <a href="https://danieljon.es/blog">blog</a> <a href="https://danieljon.es/portfolio.html">portfolio</a> <br> <br>
<a href="https://reddit.com/u/daniel_j-">reddit</a>
-<a href="http://steamcommunity.com/id/imnotstraightatall/">steam</a>
+<a href="https://steamcommunity.com/id/imnotstraightatall/">steam</a>
<a href="https://github.com/daniel-Jones">github</a>
{INFO}
-</center>
+</div>
{CONTENT}
-<center><br /><font size="2"> page generated on {TIME} </font></center>
+<br> <br> <div id="gentag">page generated on {TIME} using <a href="https://github.com/daniel-Jones/sitegenerator">sitegenerator</a></div>
</body>
</html>