diff --git a/.ghci b/.ghci
new file mode 100644
index 0000000..a882c32
--- /dev/null
+++ b/.ghci
@@ -0,0 +1,4 @@
+:set -isrc
+:set -hide-package MonadCatchIO-mtl
+:set -hide-package monads-fd
+:set -XOverloadedStrings
diff --git a/.gitignore b/.gitignore
index d8d3b96..b242d98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
*.scssc
*.swp
*.bak
+*venv*
diff --git a/; b/;
new file mode 100644
index 0000000..b9a4f2f
--- /dev/null
+++ b/;
@@ -0,0 +1,59 @@
+from __future__ import with_statement
+from fabric.api import *
+from fabric.contrib.console import confirm
+from fabric.contrib.project import rsync_project
+import fabric.operations as op
+
+env.hosts = ["wes@mgoal.ca:444"]
+
+@task
+def buildTags():
+ with lcd("./build"):
+ local("riot ../src/tags scripts/tags.min.js")
+
+@task
+def buildScss():
+ with lcd("./build"):
+ local("sassc ../src/styles/riotblog.scss > styles/riotblog.min.css")
+
+@task
+def minifyJS():
+ with lcd("./build"):
+ local("uglifyjs ../src/scripts/riotblog.js > scripts/riotblog.min.js")
+
+@task
+def buildVenv():
+ local("virtualenv -p $(which python3) ./venv")
+ with prefix("source ./venv/bin/activate"):
+ local("pip3 install -r requirements.txt")
+ local("mv venv ./build/")
+
+@task
+def copyFiles():
+ local("cp ./{blog.ini,blog.service} ./build/")
+ local("cp ./src/*py ./build/")
+ local("cp ./src/styles/*.css ./build/styles/")
+ local("cp -r ./src/templates ./build/templates")
+
+@task
+def upload():
+ run("mkdir -p ~/build")
+ rsync_project(local_dir="./build/", remote_dir="~/build/", delete=True, exclude=[".git"])
+
+@task
+def serveUp():
+ sudo("cp -r /home/wes/build /srv/riotblog")
+ sudo("cp /home/wes/build/blog.service /etc/systemd/system/blog.service")
+ sudo("systemctl enable blog.service")
+
+@task(default=True)
+def build():
+ local("rm -r ./build")
+ local("mkdir -p build/{scripts,styles}")
+ buildTags()
+ buildScss()
+ minifyJS()
+ buildVenv()
+ copyFiles()
+ upload()
+ serveUp()
diff --git a/Makefile b/Makefile
deleted file mode 100644
index a41de63..0000000
--- a/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-default:
- sass blog.scss > styles/blog.min.css
- riot tags/ scripts/tags.js
-
-watch:
- while true; do make ; inotifywait -qre close_write .; done
diff --git a/blog.ini b/blog.ini
new file mode 100755
index 0000000..7ead0a7
--- /dev/null
+++ b/blog.ini
@@ -0,0 +1,17 @@
+[uwsgi]
+wsgi_file = /srv/http/riotblog/website.py
+chdir = /srv/http/riotblog/
+module = website
+callable = app
+virtualenv = /srv/http/riotblog/venv
+uid = http
+gid = http
+
+master = true
+processes = 5
+
+socket = /tmp/blog.sock
+chown-socket = http:http
+chmod-socket = 660
+vacuum = true
+die-on-term = true
diff --git a/blog.scss b/blog.scss
deleted file mode 100644
index 1d25d1f..0000000
--- a/blog.scss
+++ /dev/null
@@ -1,69 +0,0 @@
-@mixin responsive-block($bw) {
- @media (max-width: 700px) {
- max-width: $bw+20%;
- }
- @media (max-width: 500px) {
- max-width: $bw+40%;
- }
-}
-
-.post-text {
- text-align: center;
-}
-
-.blog-title {
- @extend .post-text;
-}
-
-.post {
- @extend .post-text;
-}
-
-.post-content {
- max-width: 50%;
- text-align: justify;
- font-size: 1.5em;
- @include responsive-block(50);
-}
-
-.comment-block {
- max-width: 30%;
- @include responsive-block(30);
-}
-
-.comments {
- margin-top: 5%;
- @extend .comment-block;
-}
-
-.comment {
- margin-top: 2%;
- max-width: 40%;
- @include responsive-block(45);
-}
-
-.comments-loader {
- margin-top: 2%;
-}
-
-.comment-body {
- margin-left: 10px;
- margin-right: 10px;
-}
-
-.postnav {
- @extend .post-text;
-}
-
-.rounded-button {
- border-radius: 13px;
-}
-
-.maxinput {
- background-color: grey;
-}
-
-.maxwarn {
- margin-top: 15px;
- @extend .comment-block;
-}
diff --git a/blog.service b/blog.service
new file mode 100644
index 0000000..d67ad3b
--- /dev/null
+++ b/blog.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=My Blargh
+After=network.target
+
+[Service]
+User=http
+Group=http
+WorkingDirectory=/srv/http/riotblog
+ExecStart=/usr/bin/uwsgi --ini /srv/http/riotblog/blog.ini
+
+[Install]
+WantedBy=multi.user.target
diff --git a/build/blog.ini b/build/blog.ini
new file mode 100755
index 0000000..7ead0a7
--- /dev/null
+++ b/build/blog.ini
@@ -0,0 +1,17 @@
+[uwsgi]
+wsgi_file = /srv/http/riotblog/website.py
+chdir = /srv/http/riotblog/
+module = website
+callable = app
+virtualenv = /srv/http/riotblog/venv
+uid = http
+gid = http
+
+master = true
+processes = 5
+
+socket = /tmp/blog.sock
+chown-socket = http:http
+chmod-socket = 660
+vacuum = true
+die-on-term = true
diff --git a/build/blog.service b/build/blog.service
new file mode 100644
index 0000000..d67ad3b
--- /dev/null
+++ b/build/blog.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=My Blargh
+After=network.target
+
+[Service]
+User=http
+Group=http
+WorkingDirectory=/srv/http/riotblog
+ExecStart=/usr/bin/uwsgi --ini /srv/http/riotblog/blog.ini
+
+[Install]
+WantedBy=multi.user.target
diff --git a/comment.py b/build/comment.py
similarity index 100%
rename from comment.py
rename to build/comment.py
diff --git a/posts.py b/build/posts.py
similarity index 100%
rename from posts.py
rename to build/posts.py
diff --git a/build/scripts/riotblog.min.js b/build/scripts/riotblog.min.js
new file mode 100644
index 0000000..a1e129b
--- /dev/null
+++ b/build/scripts/riotblog.min.js
@@ -0,0 +1 @@
+riot.mount("post",{creator:"wes",title:"A cool post here"});riot.mount("bbutton");
\ No newline at end of file
diff --git a/scripts/tags.js b/build/scripts/tags.min.js
similarity index 100%
rename from scripts/tags.js
rename to build/scripts/tags.min.js
diff --git a/build/styles/riotblog.min.css b/build/styles/riotblog.min.css
new file mode 100644
index 0000000..8fc1a5d
--- /dev/null
+++ b/build/styles/riotblog.min.css
@@ -0,0 +1,57 @@
+.post-text, .blog-title, .post, .postnav {
+ text-align: center; }
+
+.post-content {
+ max-width: 50%;
+ text-align: justify;
+ font-size: 1.5em; }
+
+@media (max-width: 700px) {
+ .post-content {
+ max-width: 70%; } }
+
+@media (max-width: 500px) {
+ .post-content {
+ max-width: 90%; } }
+
+.comment-block, .comments, .maxwarn {
+ max-width: 30%; }
+
+@media (max-width: 700px) {
+ .comment-block, .comments, .maxwarn {
+ max-width: 50%; } }
+
+@media (max-width: 500px) {
+ .comment-block, .comments, .maxwarn {
+ max-width: 70%; } }
+
+.comments {
+ margin-top: 5%; }
+
+.comment {
+ margin-top: 2%;
+ max-width: 40%; }
+
+@media (max-width: 700px) {
+ .comment {
+ max-width: 65%; } }
+
+@media (max-width: 500px) {
+ .comment {
+ max-width: 85%; } }
+
+.comments-loader {
+ margin-top: 2%; }
+
+.comment-body {
+ margin-left: 10px;
+ margin-right: 10px; }
+
+.rounded-button {
+ border-radius: 13px; }
+
+.maxinput {
+ background-color: grey; }
+
+.maxwarn {
+ margin-top: 15px; }
diff --git a/styles/spectre.min.css b/build/styles/spectre.min.css
similarity index 100%
rename from styles/spectre.min.css
rename to build/styles/spectre.min.css
diff --git a/templates/index.html b/build/templates/index.html
similarity index 80%
rename from templates/index.html
rename to build/templates/index.html
index 4ebb71e..01e6b40 100644
--- a/templates/index.html
+++ b/build/templates/index.html
@@ -2,7 +2,7 @@
- Null Quantification
+ blog
{% endblock %}
@@ -25,7 +25,7 @@
{% block styles %}
-
+
{% endblock %}
@@ -34,8 +34,8 @@
-
-
+
+
{% endblock %}