-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #308 from beawitcht/development
Trans informed redesign
- Loading branch information
Showing
71 changed files
with
3,006 additions
and
684 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"]]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from pathlib import Path | ||
from utilities import prepare_blogs | ||
|
||
path = Path(__file__).parent.parent.resolve() | ||
output = path / "templates" / "blogs" | ||
|
||
# get blogs | ||
entries = prepare_blogs("https://medium.com/feed/@transinformed") | ||
|
||
for blog in entries: | ||
# set as html | ||
blog_content = blog.content[0].value | ||
|
||
# modify with classes - should be done here as much as possible to minimise adjustments needed | ||
blog_content = blog_content.replace("<h4>", " <h4 class=\"blog-description description-text\">", 1) | ||
blog_content = blog_content.replace("<h3>", "<h3 class=\"blog-header\">") | ||
blog_content = blog_content.replace("<img", "<img class=\"blog-image-container blog-image\"") | ||
blog_content = blog_content.replace("<figcaption>", "<figcaption class=\"blog-image-caption\">") | ||
blog_content = blog_content.replace("<p>", "<p class=\"blog-paragraph\">") | ||
blog_content = blog_content.replace("<em>", "<em class=\"blog-disclaimer\">") | ||
blog_content = blog_content.replace("<blockquote>", "<blockquote class=\"blog-quote\">") | ||
blog_content = blog_content.replace("<h4>", " <h4 class=\"blog-subheading blog-subheading-layout\">") | ||
|
||
|
||
blog_file_path = output / f"{blog.title}.html" | ||
if not blog_file_path.is_file(): | ||
with open(blog_file_path, 'w+') as f: | ||
# output to html file with inheritance of blog.html - allows for modifying HTML directly for formatting | ||
# when articles are updated, they will need to be manually deleted and re-created | ||
f.write("{% extends 'blog.html' %}\n{{ super() }}\n{% block blog_body %}\n" + blog_content + "\n{% endblock %}\n{% block ad %}\n{{ super() }}\n{% endblock %}") | ||
|
||
print(f"{blog.title} added!") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.