aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabui2020-11-26 18:13:00 +0300
committerAlexander Kabui2020-11-26 18:13:00 +0300
commitda73052c84d5566bf3d221d90f93688db125181d (patch)
treeedcab775c0fc36b3e1f49076de5c1dc6dc99bce3
parent41988f8e92ea5a273e22a7176481cf2f4bd88b5b (diff)
downloadgenenetwork2-da73052c84d5566bf3d221d90f93688db125181d.tar.gz
add facilities page
-rw-r--r--wqflask/wqflask/markdown_routes.py10
-rw-r--r--wqflask/wqflask/templates/facilities.html21
2 files changed, 29 insertions, 2 deletions
diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py
index 073370c7..7765af36 100644
--- a/wqflask/wqflask/markdown_routes.py
+++ b/wqflask/wqflask/markdown_routes.py
@@ -13,6 +13,7 @@ references_blueprint = Blueprint("references_blueprint", __name__)
environments_blueprint = Blueprint("environments_blueprint", __name__)
links_blueprint = Blueprint("links_blueprint", __name__)
policies_blueprint = Blueprint("policies_blueprint", __name__)
+facilities_blueprint=Blueprint("facilities",__name__)
#for debug
github_url = ("https://raw.githubusercontent.com/"
@@ -36,8 +37,8 @@ def render_markdown_table(file_name,github_url="https://raw.githubusercontent.co
def render_markdown(file_name,github_url="https://raw.githubusercontent.com/Alexanderlacuna/gn-docs/feature/add-markdown-pages/"):
- github_url = ("https://raw.githubusercontent.com/"
- "genenetwork/gn-docs/master/")
+ # github_url = ("https://raw.githubusercontent.com/"
+ # "genenetwork/gn-docs/master/")
md_content=requests.get(f"{github_url}{file_name}")
"""Try to fetch the file name from Github and if that fails, try to
@@ -92,3 +93,8 @@ def policies():
return render_template(
"links.html",
rendered_markdown=render_markdown("general/policies/policies.md")), 200
+
+
+@facilities_blueprint.route("/")
+def facilities():
+ return render_template("facilities",rendered_markdown=render_markdown("general/policies/policies.md")), 200 \ No newline at end of file
diff --git a/wqflask/wqflask/templates/facilities.html b/wqflask/wqflask/templates/facilities.html
new file mode 100644
index 00000000..5be0c96d
--- /dev/null
+++ b/wqflask/wqflask/templates/facilities.html
@@ -0,0 +1,21 @@
+{% extends "base.html" %}
+
+{% block title %}Facilities{% endblock %}
+
+{% block css %}
+<!-- <link rel="stylesheet" type="text/css" href="/static/new/css/markdown.css" /> -->
+{% endblock %}
+
+{% block content %}
+
+ <div class="github-btn">
+ <a href="https://github.com/genenetwork/gn-docs">Edit on Github</a>
+ </div>
+
+<div id="markdown" class="container">
+ {{ rendered_markdown|safe }}
+
+</div>
+
+<link rel="stylesheet" type="text/css" href="/static/new/css/markdown.css" />
+{% endblock %} \ No newline at end of file