initial commit
This commit is contained in:
commit
9a1fa6e8bd
20
generator.py
Normal file
20
generator.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
static = os.listdir("pages/static/")
|
||||||
|
posts = os.listdir("pages/posts")
|
||||||
|
|
||||||
|
templates = ["header","navbar","body","footer"]
|
||||||
|
|
||||||
|
for staticPage in static:
|
||||||
|
with open("site/" + staticPage, 'w+') as output:
|
||||||
|
for page in templates:
|
||||||
|
with open ("templates/" + page + ".htm") as template:
|
||||||
|
for line in template:
|
||||||
|
if "%Content%" in line:
|
||||||
|
line = ""
|
||||||
|
with open("pages/static/" + staticPage) as content:
|
||||||
|
for line1 in content:
|
||||||
|
line += "\t\t\t" + line1
|
||||||
|
output.write(line)
|
||||||
|
|
||||||
|
|
2
pages/static/about.htm
Normal file
2
pages/static/about.htm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<h1>About</h1>
|
||||||
|
|
2
pages/static/fun.htm
Normal file
2
pages/static/fun.htm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<h1>Fun</h1>
|
||||||
|
|
4
pages/static/index.htm
Normal file
4
pages/static/index.htm
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<h1>Index</h1>
|
||||||
|
|
||||||
|
<p>This is a website. I fucking hope...</p>
|
||||||
|
|
1
pages/static/links.htm
Normal file
1
pages/static/links.htm
Normal file
@ -0,0 +1 @@
|
|||||||
|
<h1>Links</h1>
|
2
pages/static/trek.htm
Normal file
2
pages/static/trek.htm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<h1>Star Trek</h1>
|
||||||
|
|
24
site/about.htm
Normal file
24
site/about.htm
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>J4YC33</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<a href="index.htm"><img src="images/banner.png" alt="J4YC33 Banner"/></a>
|
||||||
|
</header>
|
||||||
|
<nav>
|
||||||
|
<a class="navbar" href="about.htm">About</a> |
|
||||||
|
<a class="navbar" href="fun.htm">Fun</a> |
|
||||||
|
<a class="navbar" href="links.htm">Links</a> |
|
||||||
|
<a class="navbar" href="trek.htm">Star Trek</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<content>
|
||||||
|
<h1>About</h1>
|
||||||
|
|
||||||
|
</content>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
24
site/fun.htm
Normal file
24
site/fun.htm
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>J4YC33</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<a href="index.htm"><img src="images/banner.png" alt="J4YC33 Banner"/></a>
|
||||||
|
</header>
|
||||||
|
<nav>
|
||||||
|
<a class="navbar" href="about.htm">About</a> |
|
||||||
|
<a class="navbar" href="fun.htm">Fun</a> |
|
||||||
|
<a class="navbar" href="links.htm">Links</a> |
|
||||||
|
<a class="navbar" href="trek.htm">Star Trek</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<content>
|
||||||
|
<h1>Fun</h1>
|
||||||
|
|
||||||
|
</content>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
26
site/index.htm
Normal file
26
site/index.htm
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>J4YC33</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<a href="index.htm"><img src="images/banner.png" alt="J4YC33 Banner"/></a>
|
||||||
|
</header>
|
||||||
|
<nav>
|
||||||
|
<a class="navbar" href="about.htm">About</a> |
|
||||||
|
<a class="navbar" href="fun.htm">Fun</a> |
|
||||||
|
<a class="navbar" href="links.htm">Links</a> |
|
||||||
|
<a class="navbar" href="trek.htm">Star Trek</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<content>
|
||||||
|
<h1>Index</h1>
|
||||||
|
|
||||||
|
<p>This is a website. I fucking hope...</p>
|
||||||
|
|
||||||
|
</content>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
22
site/links.htm
Normal file
22
site/links.htm
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>J4YC33</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<a href="index.htm"><img src="images/banner.png" alt="J4YC33 Banner"/></a>
|
||||||
|
</header>
|
||||||
|
<nav>
|
||||||
|
<a class="navbar" href="about.htm">About</a> |
|
||||||
|
<a class="navbar" href="fun.htm">Fun</a> |
|
||||||
|
<a class="navbar" href="links.htm">Links</a> |
|
||||||
|
<a class="navbar" href="trek.htm">Star Trek</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<content>
|
||||||
|
<h1>Links</h1> </content>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
24
site/trek.htm
Normal file
24
site/trek.htm
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>J4YC33</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<a href="index.htm"><img src="images/banner.png" alt="J4YC33 Banner"/></a>
|
||||||
|
</header>
|
||||||
|
<nav>
|
||||||
|
<a class="navbar" href="about.htm">About</a> |
|
||||||
|
<a class="navbar" href="fun.htm">Fun</a> |
|
||||||
|
<a class="navbar" href="links.htm">Links</a> |
|
||||||
|
<a class="navbar" href="trek.htm">Star Trek</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<content>
|
||||||
|
<h1>Star Trek</h1>
|
||||||
|
|
||||||
|
</content>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
4
templates/body.htm
Normal file
4
templates/body.htm
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
<content>
|
||||||
|
%Content%
|
||||||
|
</content>
|
4
templates/footer.htm
Normal file
4
templates/footer.htm
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
9
templates/header.htm
Normal file
9
templates/header.htm
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>J4YC33</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<a href="index.htm"><img src="images/banner.png" alt="J4YC33 Banner"/></a>
|
||||||
|
</header>
|
6
templates/navbar.htm
Normal file
6
templates/navbar.htm
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<nav>
|
||||||
|
<a class="navbar" href="about.htm">About</a> |
|
||||||
|
<a class="navbar" href="fun.htm">Fun</a> |
|
||||||
|
<a class="navbar" href="links.htm">Links</a> |
|
||||||
|
<a class="navbar" href="trek.htm">Star Trek</a>
|
||||||
|
</nav>
|
0
templates/sidebar.htm
Normal file
0
templates/sidebar.htm
Normal file
Loading…
x
Reference in New Issue
Block a user