diff --git a/app/blueprints/blog_routes.py b/app/blueprints/blog_routes.py
index f177468..0c12723 100644
--- a/app/blueprints/blog_routes.py
+++ b/app/blueprints/blog_routes.py
@@ -1,7 +1,10 @@
from flask import Blueprint, render_template, abort
-from main import cache, entries
+from main import cache
+from utilities import prepare_blogs
import urllib.parse
+# get blogs
+entries = prepare_blogs("https://medium.com/feed/@transinformed")
blog_bp = Blueprint('blog', __name__)
@@ -17,11 +20,11 @@ def blog(title):
for rss_blog in entries:
if rss_blog.url_title == urllib.parse.quote_plus(title):
blog_number = entries.index(rss_blog)
- # return 404 if failed to match blog
+ # return 404 if failed to match blog
try:
blog = entries[blog_number]
except NameError:
abort(404)
- return render_template("blog.html", blog=blog)
+ return render_template(f"blogs/{blog.title}.html", blog=blog)
diff --git a/app/compilescss.bash b/app/compilescss.bash
new file mode 100644
index 0000000..4797164
--- /dev/null
+++ b/app/compilescss.bash
@@ -0,0 +1,8 @@
+#!/bin/bash
+sass ./static/scss/base.scss:./static/css/base.css --style compressed
+sass ./static/scss/blog.scss:./static/css/blog.css --style compressed
+sass ./static/scss/blogs.scss:./static/css/blogs.css --style compressed
+sass ./static/scss/sources.scss:./static/css/sources.css --style compressed
+sass ./static/scss/resources.scss:./static/css/resources.css --style compressed
+sass ./static/scss/about.scss:./static/css/about.css --style compressed
+sass ./static/scss/index.scss:./static/css/index.css --style compressed
\ No newline at end of file
diff --git a/app/forms/GICs.json b/app/forms/GICs.json
index 8cfd72e..15e872a 100644
--- a/app/forms/GICs.json
+++ b/app/forms/GICs.json
@@ -1 +1 @@
-{"GICs": [["Y-England", "National Referral Support Service - Wait time: 5 years"], ["Y-Wales", "National Referral Support Service - Wait time: 5 years"], ["Wales", "Welsh Gender Service - Cardiff - Wait time (months): 15"], ["Scotland", "Edinburgh Chalmers Centre - Wait time (months): 23"], ["England", "Nottingham Centre for Transgender Health - Wait time (months): 23"], ["Y-Northern Ireland", "Belfast KOI - Wait time (months): 24"], ["Scotland", "Grampian - Wait time (months): 24"], ["Scotland", "Inverness Highland Sexual Health - Wait time (months): 29"], ["Y-Scotland", "Glasgow Youth Sandyford - Wait time (months): 42"], ["England", "Northants Northamptonshire Healthcare Trust - Wait time (months): 53"], ["Scotland", "Glasgow Sandyford - Wait time (months): 55"], ["England", "Leeds and York Partnership Trust - Wait time (months): 57"], ["Northern Ireland", "Belfast Brackenburn Clinic - Wait time (months): 59"], ["England", "London Tavistock and Portman Trust - Wait time (months): 60"], ["England", "Sheffield Porterbrook Clinic - Wait time (months): 62"], ["England", "Exeter Devon Partnership Trust - Wait time (months): 87"]]}
+{"GICs": [["Y-England", "National Referral Support Service - Wait time: 5 years"], ["Y-Wales", "National Referral Support Service - Wait time: 5 years"], ["Wales", "Welsh Gender Service - Cardiff - Wait time (months): 15"], ["Scotland", "Edinburgh Chalmers Centre - Wait time (months): 23"], ["Y-Northern Ireland", "Belfast KOI - Wait time (months): 24"], ["Scotland", "Grampian - Wait time (months): 24"], ["England", "Nottingham Centre for Transgender Health - Wait time (months): 27"], ["Scotland", "Inverness Highland Sexual Health - Wait time (months): 29"], ["England", "Northants Northamptonshire Healthcare Trust - Wait time (months): 53"], ["Y-Scotland", "Glasgow Youth Sandyford - Wait time (months): 58"], ["England", "Leeds and York Partnership Trust - Wait time (months): 58"], ["England", "London Tavistock and Portman Trust - Wait time (months): 61"], ["Scotland", "Glasgow Sandyford - Wait time (months): 65"], ["England", "Sheffield Porterbrook Clinic - Wait time (months): 65"], ["Northern Ireland", "Belfast Brackenburn Clinic - Wait time (months): 75"], ["England", "Exeter Devon Partnership Trust - Wait time (months): 88"]]}
\ No newline at end of file
diff --git a/app/main.py b/app/main.py
index f2281f3..8ef1e1d 100644
--- a/app/main.py
+++ b/app/main.py
@@ -65,11 +65,6 @@ def handle_error(error):
return make_response(render_template("error.html", name=error.name ,code=error.code, description=error.description), error.code)
# add header rows on blog posts before each heading and style images
-@app.template_filter('stylish')
-def stylish(text):
- text = text.replace("
", "\n
\n")
- text = text.replace("", " ", 1)
+ blog_content = blog_content.replace("", "