From 60447282a0f0063513ab10251945df3ab2c2dbfd Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 00:03:07 +0300 Subject: add reference markdown and github button --- wqflask/wqflask/templates/reference.html | 1541 +----------------------------- 1 file changed, 53 insertions(+), 1488 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/reference.html b/wqflask/wqflask/templates/reference.html index d95d22e3..78469d39 100644 --- a/wqflask/wqflask/templates/reference.html +++ b/wqflask/wqflask/templates/reference.html @@ -1,1497 +1,62 @@ {% extends "base.html" %} -{% block title %}References{% endblock %} -{% block content %} - -

 Papers and References to GeneNetwork

- -
- - -Highlighted References | -Key References | -Background References | - - -

- -2020 | -2019 | -2018 | -2017 | -2016 | -2015 | -2014 | -2013 | -2012 | -2011 | -2010 | -2009 | -2008 | -2007 | -2006 | -2005 | -2004 | -2003 | - -
- - - Google Scholar search for "genenetwork" OR "webqtl" generated: -
    -
  1. 1430 hits on 2016/09/08 -
  2. 1730 hits on 2017/10/17 -
  3. 2020 hits on 2019/05/13) -
- -Google Scholar search for "genenetwork.org" generated: - -
    -
  1. 1030 hits on 2019/05/13 -
  2. 105 hits from 2018/01/01 to 2019/05/13 -
- -
- - -
- Highlighted References -
- -Please send us citations to articles that we may have missed. - -
    - -
  1. Mulligan MK, Mozhui K, Prins P, Williams RW (2017) GeneNetwork: A Toolbox for Systems Genetics. In Systems Genetics, Methods in Molecular Biology 1488:75-120 -[An updated primer in using GeneNetwork for molecular analysis of mouse and human cohorts.] -PDF version - -
    -
    - -
  2. Williams RW, Williams EG (2017) Resources for Systems Genetics. In Systems Genetics, Methods in Molecular Biology 1488:3-29. -[This review is intended to help you when making the hard choices about types of resources to use in system genetic studies. The short answer: embrace diversity in your resources. The computational barriers to joint analysis are now minimal.] -PDF version - -
    -
    - -
  3. Williams RW (2009) Herding cats: the sociology of data integration. Frontier in Neuroscience 3(2):154-6. -[An short but amusing commentary on predictive (someday perhaps even precision) medicine and how to get there using genetic reference populations such as the BXD and Collaborative Cross families.] -PDF version - -
    -
    - - -
  4. -Pinelli M, Carissimo A, Cutillo L, Lai CH, Mutarelli M, Moretti MN, Singh MV, Karali M, Carrella D, Pizzo M, Russo F, Ferrari S, Ponzin D, Angelini C, Banfi S, di Bernardo D (2016) An atlas of gene expression and gene co-regulation in the human retina.Nucleic Acids Res. 2016 Jul 8;44(12):5773-84 -RETINA database, and see the PDF. These data are now in GeneNetwork (Species = Human, Group = Retina). - - -
    -
    - - -
  5. -Williams EG, Wu Y, Pooja J, Dubuis S, Blattmann P, Argmann CA, Houten SM, Amariuta T, Wolski W, Zamboni N, Aebersold R, Auwerx J (2016) Systems proteomics and trans-omic integration illuminate new mechanisms in mitochondrial function. Science 352(6291):aad0189 -HTML version, PDF - -
    -
    - - - -
  6. -Sloan Z, Arends D, Broman KW, Centeno A, Furlotte N, Nijveen H, Yan L, Zhou X, Williams RW, Prins P (2016) GenetNetwork: framework for web-based genetics. The Journal of Open Source Software http://joss.theoj.org/papers/10.21105/joss.00025 (http://dx.doi.org/10.21105/joss.00025) -HTML version - -
    -
    - -
  7. Alam G, Miller DB, O'Callaghan JP, Lu L, Williams RW, Jones BC (2016) MPTP neurotoxicity is highly concordant between the sexes among BXD recombinant inbred mouse strains. Neurotoxicology in press -PDF version - -
    -
    - - -
  8. Merkwirth C, Jovaisaite V, Durieux J, Matilainen O, Jordan SD, Quiros PM, Steffen KK, Williams EG, Mouchiroud L, Tronnes SU, Murillo V, Wolff SC, Shaw RJ, Auwerx J, Dillin A (2016) Two conserved histone demethylases regulate mitochondrial stress-induced longevity. Cell 165:1209-1223 -
    -
    - - -
  9. Wang X, Pandey AK, Mulligan MK, Williams EG, Mozhui K, Li Z, Jovaisaite V, Quarles LD, Xiao Z, Huang J, Capra JA, Chen Z, Taylor WL, Bastarache L, Niu X, Pollard KS, Ciobanu DC, Reznik AO, Tishkov AV, Zhulin IB, Peng J, Nelson SF, Denny JC, Auwerx J, Lu L, Williams RW (2016). Joint mouse-human phenome-wide association to test gene function and disease risk. Nature Communications 7:10464 -[Best reference on the BXD family of strains and the wide range of phenotypes that have been generated over the past 40 years.] - -PDF version and the - -Supplementary Tables in one Excel file - - -
    -
    - - -
  10. Xue Y, Li J, Yan L, Lu L, Liao FF (2015) Genetic variability to diet-induced hippocampal dysfunction in BXD recombinant inbred (RI) mouse strains. Behav Brain Res 292:83-94 -
    -
    - -
  11. Chaum E, Winborn CS, Bhattacharya S (2015) Multilayered genetic and omics dissection of mitochondrial activity in a mouse reference population. Mamm Genome 26:210-221 -
    -
    - -
  12. Cheng Q, Seltzer Z, Sima C, Lakschevitz FS, Glogauer M. (2015) Quantitative Trait Loci and Candidate Genes for Neutrophil Recruitment in Sterile Inflammation Mapped in AXB-BXA Recombinant Inbred Mice. PLoS One 10:e0124117 -
    -
    - -
  13. Scott RE, Ghule PN, Stein JL, Stein GS (2015) Cell cycle gene expression networks discovered using systems biology: Significance in carcinogenesis. J Cell Physiol 230:2533-42 -
    -
    - -
  14. Williams EG, Auwerx J (2015) The convergence of systems and reductionist approaches in complex trait analysis. Cell 162:23-32. -
    -
    -
  15. Wu Y, Williams EG, Dubuis S, Mottis A, Jovaisaite V, Houten SM, Argmann CA, Faridi P, Wolski W, Kutalik Z, Zamboni N, Auwerx J, Aebersold R (2014) Multilayered genetic and omics dissection of mitochondrial activity in a mouse reference population. Cell 158:1415-1430 -
    -
    +{% block title %}Reference{% endblock %} -
  16. -Hayes SK, Hager R, Grencis RK (2014) Sex-dependent genetics effects on immune responses to parasitic nematodes. BMC Genomics 15:193 -
    -
    - -
  17. Harenza JL, Muldoon PP, De Biasi M, Damaj MI, Miles MF (2014) Genetic variation within the Chrna7 gene modulates nicotine reward-like phenotypes in mice. Genes Brain Behav 13:213-225 -
    -
    - - -
  18. -Ye R, Carneiro AM, Airey D, Sanders-Bush E, Williams RW, Lu L, Wang J, Zhang B, Blakely RD (2014) Evaluation of heritable determinants of blood and brain serotonin homeostasis using recombinant inbred mice. Genes Brain Behav. 13:247-260 +{% block css %} + +{% endblock %} -
    -
    -
  19. -Houtkooper RH, Mouchiroud L, Ryu D, Moullan N, Katsyuba E, Knott G, Williams RW, Auwerx J (2013) Mitonuclear protein imbalance as a conserved longevity mechanism. Nature 497:451-457 PDF version +{% block content %} -
    -
    + + +
    + {{ rendered_markdown|safe }} + + + +
    + + {% endblock %} + -- cgit v1.2.3 From 2681d11a9c39a3291db03521e5b7f73ed672533c Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 00:04:22 +0300 Subject: register references blueprint --- wqflask/wqflask/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py index 874cde17..39a36fa3 100644 --- a/wqflask/wqflask/__init__.py +++ b/wqflask/wqflask/__init__.py @@ -7,6 +7,7 @@ from flask import g from flask import Flask from utility import formatting from wqflask.markdown_routes import glossary_blueprint +from wqflask.markdown_routes import references_blueprint app = Flask(__name__) @@ -19,6 +20,7 @@ app.jinja_env.globals.update( # Registering blueprints app.register_blueprint(glossary_blueprint, url_prefix="/glossary") +app.register_blueprint(references_blueprint,url_prefix="/references") @app.before_request def before_request(): @@ -39,4 +41,4 @@ from wqflask import db_info from wqflask import user_login from wqflask import user_session -import wqflask.views +import wqflask.views -- cgit v1.2.3 From 23d27c88bcc085bac3fb14b534cf1d4a7f11f22a Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 00:07:01 +0300 Subject: modify references links --- wqflask/wqflask/markdown_routes.py | 33 ++++++++++++++++++++++++++++++++- wqflask/wqflask/templates/base.html | 2 +- wqflask/wqflask/views.py | 5 ----- 3 files changed, 33 insertions(+), 7 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 7a9fac41..60d4374c 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -9,7 +9,10 @@ from flask import Blueprint from flask import render_template glossary_blueprint = Blueprint('glossary_blueprint', __name__) - +references_blueprint=Blueprint("references_blueprint",__name__) +environments_blueprint=Blueprint("environments_blueprint",__name__) +links_blueprint=Blueprint("links_blueprint",__name__) +policies_blueprint=Blueprint("policies_blueprint",__name__) def render_markdown(file_name): """Try to fetch the file name from Github and if that fails, try to @@ -22,6 +25,7 @@ look for it inside the file system if md_content.status_code == 200: return markdown.Markdown().convert(md_content.content.decode("utf-8")) + # TODO: Add fallback on our git server by checking the mirror. # Content not available @@ -32,8 +36,35 @@ look for it inside the file system "Please reach out to the gn2 team to have a look at this") + + @glossary_blueprint.route('/') def glossary(): return render_template( "glossary.html", rendered_markdown=render_markdown("general/glossary/glossary.md")), 200 + + +@references_blueprint.route('/') +def references(): + return render_template( + "reference.html", + rendered_markdown=render_markdown("general/glossary/glossary.md")), 200 + + + +@environments_blueprint.route("/") +def references(): + return render_template("environments.html",rendered_markdown=render_markdown("general/environments/environments.md")) + + +@links_blueprint.route("/") +def links(): + return rendered_template("links.html",rendered_markdown=render_markdown("general/links/links.md")) + + +policies_blueprint.route("/") +def policies(): + return rendered_template("policies.html",rendered_markdown=rendered_markdown("general/policies/policies.md")) + + diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 0e572fcf..ca6c9d9b 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -64,7 +64,7 @@
  20. -- cgit v1.2.3 From 828cb4d0b327bcb441dc523f4d825f660f371e01 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 15:04:30 +0300 Subject: add policies page --- wqflask/wqflask/templates/policies.html | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/policies.html b/wqflask/wqflask/templates/policies.html index 83b6b3c0..ef481de2 100644 --- a/wqflask/wqflask/templates/policies.html +++ b/wqflask/wqflask/templates/policies.html @@ -1,18 +1,21 @@ {% extends "base.html" %} -{% block title %}Policies{% endblock %} + +{% block title %}Links{% endblock %} + +{% block css %} + +{% endblock %} + {% block content %} - - - -
    -

    WebQTL Conditions of Use

    - -

    -
    + + +
    + {{ rendered_markdown|safe }} + +
    + {% endblock %} \ No newline at end of file -- cgit v1.2.3 From 6ae545167f59b40ecd0cee2bebb1276b34fa7c5b Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 15:06:05 +0300 Subject: register view,policies blueprint --- wqflask/wqflask/__init__.py | 4 ++++ wqflask/wqflask/templates/references.html | 25 ++++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py index 39a36fa3..d7da3755 100644 --- a/wqflask/wqflask/__init__.py +++ b/wqflask/wqflask/__init__.py @@ -8,6 +8,8 @@ from flask import Flask from utility import formatting from wqflask.markdown_routes import glossary_blueprint from wqflask.markdown_routes import references_blueprint +from wqflask.markdown_routes import links_blueprint +from wqflask.markdown_routes import policies_blueprint app = Flask(__name__) @@ -21,6 +23,8 @@ app.jinja_env.globals.update( # Registering blueprints app.register_blueprint(glossary_blueprint, url_prefix="/glossary") app.register_blueprint(references_blueprint,url_prefix="/references") +app.register_blueprint(links_blueprint,url_prefix="/links") +app.register_blueprint(policies_blueprint,url_prefix="/policies") @app.before_request def before_request(): diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index 5e86d95b..c10576d8 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -3,13 +3,13 @@ {% block title %}Reference{% endblock %} {% block css %} - + {% endblock %} {% block content %}
    @@ -18,12 +18,23 @@
    -- cgit v1.2.3 From 2a346d94a978c8a7faf0d1435220816efc3c2c64 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 15:07:42 +0300 Subject: add edit button in glossary page --- wqflask/wqflask/templates/glossary.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/glossary.html b/wqflask/wqflask/templates/glossary.html index 146c7e86..395bcfea 100644 --- a/wqflask/wqflask/templates/glossary.html +++ b/wqflask/wqflask/templates/glossary.html @@ -8,9 +8,11 @@ {% block content %} +
    - - [Edit on Github] + {{ rendered_markdown|safe }}
    {% endblock %} -- cgit v1.2.3 From 416cb0cd272001651a3d9eb43500067ef524819d Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 15:09:37 +0300 Subject: add endpoint for polices,environments and policies --- wqflask/wqflask/markdown_routes.py | 51 ++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 60d4374c..5170fcf0 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -9,23 +9,31 @@ from flask import Blueprint from flask import render_template glossary_blueprint = Blueprint('glossary_blueprint', __name__) -references_blueprint=Blueprint("references_blueprint",__name__) -environments_blueprint=Blueprint("environments_blueprint",__name__) -links_blueprint=Blueprint("links_blueprint",__name__) -policies_blueprint=Blueprint("policies_blueprint",__name__) +references_blueprint = Blueprint("references_blueprint", __name__) +environments_blueprint = Blueprint("environments_blueprint", __name__) +links_blueprint = Blueprint("links_blueprint", __name__) +policies_blueprint = Blueprint("policies_blueprint", __name__) -def render_markdown(file_name): +#for debug +github_url = ("https://raw.githubusercontent.com/" + "genenetwork/gn-docs/master/general/glossary/glossary.md") + + + +def render_markdown(file_name,github_url="https://raw.githubusercontent.com/Alexanderlacuna/gn-docs/feature/add-markdown-pages/"): + + md_content=requests.get(f"{github_url}{file_name}") """Try to fetch the file name from Github and if that fails, try to look for it inside the file system - +po """ - github_url = ("https://raw.githubusercontent.com/" - "genenetwork/gn-docs/master/") - md_content = requests.get(f"{github_url}{file_name}") + # github_url = ("https://raw.githubusercontent.com/" + # "genenetwork/gn-docs/master/") + # md_content = requests.get(f"{github_url}{file_name}") if md_content.status_code == 200: + # print(md_content.content.decode("utf-8")) return markdown.Markdown().convert(md_content.content.decode("utf-8")) - # TODO: Add fallback on our git server by checking the mirror. # Content not available @@ -36,8 +44,6 @@ look for it inside the file system "Please reach out to the gn2 team to have a look at this") - - @glossary_blueprint.route('/') def glossary(): return render_template( @@ -48,23 +54,24 @@ def glossary(): @references_blueprint.route('/') def references(): return render_template( - "reference.html", - rendered_markdown=render_markdown("general/glossary/glossary.md")), 200 - + "references.html", + rendered_markdown=render_markdown("general/references/references.md")), 200 @environments_blueprint.route("/") -def references(): - return render_template("environments.html",rendered_markdown=render_markdown("general/environments/environments.md")) +def environments(): + return render_template("environments.html", rendered_markdown=render_markdown("general/links/links.md")) @links_blueprint.route("/") def links(): - return rendered_template("links.html",rendered_markdown=render_markdown("general/links/links.md")) + return render_template( + "links.html", + rendered_markdown=render_markdown("general/links/links.md")), 200 -policies_blueprint.route("/") +@policies_blueprint.route("/") def policies(): - return rendered_template("policies.html",rendered_markdown=rendered_markdown("general/policies/policies.md")) - - + return render_template( + "links.html", + rendered_markdown=render_markdown("general/policies/policies.md")), 200 -- cgit v1.2.3 From 52eea81494a507eb69751dea54f98270b53d9844 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 15:10:46 +0300 Subject: add links page --- wqflask/wqflask/templates/links.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 wqflask/wqflask/templates/links.html (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/links.html b/wqflask/wqflask/templates/links.html new file mode 100644 index 00000000..7b092839 --- /dev/null +++ b/wqflask/wqflask/templates/links.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block title %}Links{% endblock %} + +{% block css %} + +{% endblock %} + +{% block content %} + + + +
    + {{ rendered_markdown|safe }} + +
    + + +{% endblock %} \ No newline at end of file -- cgit v1.2.3 From c58751a8aa7ab0277096d91bb3e50c3ef0d62aab Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 15:18:04 +0300 Subject: add re-used css to markdown.css for easy maintenance and reusability --- wqflask/wqflask/templates/references.html | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index c10576d8..e05c8440 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -17,25 +17,5 @@ - {% endblock %} \ No newline at end of file -- cgit v1.2.3 From 8a0e79d3186e340bc438dd07b4c2992f81c3e6d7 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 17:09:43 +0300 Subject: add environment markdown --- wqflask/wqflask/templates/environment.html | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 wqflask/wqflask/templates/environment.html (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/environment.html b/wqflask/wqflask/templates/environment.html new file mode 100644 index 00000000..a331d494 --- /dev/null +++ b/wqflask/wqflask/templates/environment.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} + +{% block title %}Glossary{% endblock %} + +{% block css %} + +{% endblock %} + +{% block content %} + + +
    + +
    {{ rendered_markdown|safe }}
    +
    + + +{% endblock %} -- cgit v1.2.3 From b0c1d59d4e5a9580b4d15664a53845969db32d0a Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 17:11:55 +0300 Subject: remove environment from /wqflask/views.py --- wqflask/wqflask/templates/links.html | 2 +- wqflask/wqflask/views.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/links.html b/wqflask/wqflask/templates/links.html index 7b092839..ef481de2 100644 --- a/wqflask/wqflask/templates/links.html +++ b/wqflask/wqflask/templates/links.html @@ -9,7 +9,7 @@ {% block content %}
    diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index cc2dc341..6cdce248 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -321,10 +321,10 @@ def credits(): #return render_template("docs.html", **doc.__dict__) return render_template("credits.html") -@app.route("/environments") -def environments(): - doc = Docs("environments", request.args) - return render_template("docs.html", **doc.__dict__) +# @app.route("/environments") +# def environments(): +# doc = Docs("environments", request.args) +# return render_template("docs.html", **doc.__dict__) #return render_template("environments.html", **doc.__dict__) @app.route("/update_text", methods=('POST',)) -- cgit v1.2.3 From d8fb319272a4833ed3045cdc5ed46e0e204f78e1 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 17:13:24 +0300 Subject: add and register environments blueprint --- wqflask/wqflask/__init__.py | 2 ++ wqflask/wqflask/templates/base.html | 2 +- wqflask/wqflask/templates/references.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py index d7da3755..f44b4bfd 100644 --- a/wqflask/wqflask/__init__.py +++ b/wqflask/wqflask/__init__.py @@ -10,6 +10,7 @@ from wqflask.markdown_routes import glossary_blueprint from wqflask.markdown_routes import references_blueprint from wqflask.markdown_routes import links_blueprint from wqflask.markdown_routes import policies_blueprint +from wqflask.markdown_routes import environments_blueprint app = Flask(__name__) @@ -25,6 +26,7 @@ app.register_blueprint(glossary_blueprint, url_prefix="/glossary") app.register_blueprint(references_blueprint,url_prefix="/references") app.register_blueprint(links_blueprint,url_prefix="/links") app.register_blueprint(policies_blueprint,url_prefix="/policies") +app.register_blueprint(environments_blueprint,url_prefix="/environments") @app.before_request def before_request(): diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index fefb519c..8ba5d0d5 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -70,7 +70,7 @@
  21. FAQ
  22. Policies
  23. Links
  24. -
  25. Environments
  26. +
  27. Environments
  28. GN1 News
  29. diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index e05c8440..e2f152e3 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -9,7 +9,7 @@ {% block content %}
    -- cgit v1.2.3 From 66f4ab80a5dbfa8634c3a5df91a59a9119f57b2c Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 17:18:35 +0300 Subject: add table extension to support conversion of markdown tables to HTML --- wqflask/wqflask/markdown_routes.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 5170fcf0..073370c7 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -20,7 +20,24 @@ github_url = ("https://raw.githubusercontent.com/" + +def render_markdown_table(file_name,github_url="https://raw.githubusercontent.com/Alexanderlacuna/gn-docs/feature/add-markdown-pages/"): + + md_content=md_content=requests.get(f"{github_url}{file_name}") + if md_content.status_code==200: + return markdown.markdown(md_content.content.decode("utf-8"), extensions=['tables']) + return (f"\nContent for {file_name} not available. " + "Please check " + "(here to see where content exists)" + "[https://github.com/genenetwork/gn-docs]. " + "Please reach out to the gn2 team to have a look at this") + + + + 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/") md_content=requests.get(f"{github_url}{file_name}") """Try to fetch the file name from Github and if that fails, try to @@ -60,7 +77,7 @@ def references(): @environments_blueprint.route("/") def environments(): - return render_template("environments.html", rendered_markdown=render_markdown("general/links/links.md")) + return render_template("environment.html", rendered_markdown=render_markdown_table("general/environments/environments.md")),200 @links_blueprint.route("/") -- cgit v1.2.3 From 41988f8e92ea5a273e22a7176481cf2f4bd88b5b Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 17:22:44 +0300 Subject: delete environments html pagE --- wqflask/wqflask/templates/environments.html | 83 ----------------------------- 1 file changed, 83 deletions(-) delete mode 100644 wqflask/wqflask/templates/environments.html (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/environments.html b/wqflask/wqflask/templates/environments.html deleted file mode 100644 index 5ef91a95..00000000 --- a/wqflask/wqflask/templates/environments.html +++ /dev/null @@ -1,83 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Environments{% endblock %} - -{% block content %} -
    -

    System Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Operating System
    Ubuntu12.04.5 LTS 64-bithttp://www.ubuntu.com/Free software licenses (mainly GPL)
    Database
    MySQL5.5.40http://www.mysql.com/GPL (version 2) or proprietary
    Python
    Python2.7.3http://www.python.org/Python Software Foundation License
    Flask0.9http://flask.pocoo.org/BSD
    Jinja22.6http://jinja.pocoo.org/BSD
    NumPy1.7.0http://www.numpy.org/BSD-new
    SciPy0.11.0http://www.scipy.org/BSD-new
    JavaScript / CSS
    jQuery1.10.2http://jquery.com/MIT
    Bootstrap2.3.1http://getbootstrap.com/MIT License (Apache License 2.0 prior to 3.1.0)
    DataTables1.9.4http://www.datatables.net/MIT
    CKEditor4.4.5http://ckeditor.com/GPL, LGPL and MPL
    -
    -{% endblock %} -- cgit v1.2.3 From da73052c84d5566bf3d221d90f93688db125181d Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 18:13:00 +0300 Subject: add facilities page --- wqflask/wqflask/markdown_routes.py | 10 ++++++++-- wqflask/wqflask/templates/facilities.html | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 wqflask/wqflask/templates/facilities.html (limited to 'wqflask') 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 %} + +{% endblock %} + +{% block content %} + + + +
    + {{ rendered_markdown|safe }} + +
    + + +{% endblock %} \ No newline at end of file -- cgit v1.2.3 From 6ab58b529aca9c12bb26865a1d81a15aaad1fd5d Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 18:14:03 +0300 Subject: add and register facilities blueprint --- wqflask/wqflask/__init__.py | 2 ++ wqflask/wqflask/markdown_routes.py | 8 ++++---- wqflask/wqflask/templates/base.html | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py index f44b4bfd..0b69ec40 100644 --- a/wqflask/wqflask/__init__.py +++ b/wqflask/wqflask/__init__.py @@ -11,6 +11,7 @@ from wqflask.markdown_routes import references_blueprint from wqflask.markdown_routes import links_blueprint from wqflask.markdown_routes import policies_blueprint from wqflask.markdown_routes import environments_blueprint +from wqflask.markdown_routes import facilities_blueprint app = Flask(__name__) @@ -27,6 +28,7 @@ app.register_blueprint(references_blueprint,url_prefix="/references") app.register_blueprint(links_blueprint,url_prefix="/links") app.register_blueprint(policies_blueprint,url_prefix="/policies") app.register_blueprint(environments_blueprint,url_prefix="/environments") +app.register_blueprint(facilities_blueprint,url_prefix="/facilities") @app.before_request def before_request(): diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 7765af36..d00628b9 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -13,7 +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__) +facilities_blueprint=Blueprint("facilities_blueprint",__name__) #for debug github_url = ("https://raw.githubusercontent.com/" @@ -37,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 @@ -97,4 +97,4 @@ def policies(): @facilities_blueprint.route("/") def facilities(): - return render_template("facilities",rendered_markdown=render_markdown("general/policies/policies.md")), 200 \ No newline at end of file + return render_template("facilities.html",rendered_markdown=render_markdown("general/help/facilities.md")), 200 \ No newline at end of file diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 8ba5d0d5..faa59deb 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -70,6 +70,7 @@
  30. FAQ
  31. Policies
  32. Links
  33. +
  34. Facilities
  35. Environments
  36. GN1 News
  37. -- cgit v1.2.3 From 4f449007d7f4afe4b141851772fa694ced4e77e3 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 21:28:37 +0300 Subject: refactor render_markdown function in wqflask/markdown_routes.py --- wqflask/wqflask/markdown_routes.py | 45 +++++++---------------------- wqflask/wqflask/static/new/css/markdown.css | 17 ++++++----- 2 files changed, 19 insertions(+), 43 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index d00628b9..0445ded1 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -13,47 +13,22 @@ 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_blueprint",__name__) +facilities_blueprint = Blueprint("facilities_blueprint", __name__) -#for debug -github_url = ("https://raw.githubusercontent.com/" - "genenetwork/gn-docs/master/general/glossary/glossary.md") +# for debug +# https://raw.githubusercontent.com/Alexanderlacuna/gn-docs/feature/add-markdown-pages/ - - -def render_markdown_table(file_name,github_url="https://raw.githubusercontent.com/Alexanderlacuna/gn-docs/feature/add-markdown-pages/"): - - md_content=md_content=requests.get(f"{github_url}{file_name}") - if md_content.status_code==200: - return markdown.markdown(md_content.content.decode("utf-8"), extensions=['tables']) - return (f"\nContent for {file_name} not available. " - "Please check " - "(here to see where content exists)" - "[https://github.com/genenetwork/gn-docs]. " - "Please reach out to the gn2 team to have a look at this") - - - - -def render_markdown(file_name,github_url="https://raw.githubusercontent.com/Alexanderlacuna/gn-docs/feature/add-markdown-pages/"): +def render_markdown(file_name): 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 -look for it inside the file system -po - """ - # github_url = ("https://raw.githubusercontent.com/" - # "genenetwork/gn-docs/master/") - # md_content = requests.get(f"{github_url}{file_name}") + + md_content = requests.get(f"{github_url}{file_name}") if md_content.status_code == 200: - # print(md_content.content.decode("utf-8")) - return markdown.Markdown().convert(md_content.content.decode("utf-8")) + return markdown.markdown(md_content.content.decode("utf-8"), extensions=['tables']) + # return markdown.Markdown().convert(md_content.content.decode("utf-8")) # TODO: Add fallback on our git server by checking the mirror. - # Content not available return (f"\nContent for {file_name} not available. " "Please check " @@ -78,7 +53,7 @@ def references(): @environments_blueprint.route("/") def environments(): - return render_template("environment.html", rendered_markdown=render_markdown_table("general/environments/environments.md")),200 + return render_template("environment.html", rendered_markdown=render_markdown_table("general/environments/environments.md")), 200 @links_blueprint.route("/") @@ -97,4 +72,4 @@ def policies(): @facilities_blueprint.route("/") def facilities(): - return render_template("facilities.html",rendered_markdown=render_markdown("general/help/facilities.md")), 200 \ No newline at end of file + return render_template("facilities.html", rendered_markdown=render_markdown("general/help/facilities.md")), 200 diff --git a/wqflask/wqflask/static/new/css/markdown.css b/wqflask/wqflask/static/new/css/markdown.css index ad665835..6d76c190 100644 --- a/wqflask/wqflask/static/new/css/markdown.css +++ b/wqflask/wqflask/static/new/css/markdown.css @@ -35,7 +35,7 @@ /*background: #27407a;*/ background: blue; border-radius: 20px; - + /*text-align: center;*/ @@ -49,18 +49,19 @@ .container { -width:80vw; -margin: auto; -max-width:80vw; - + width: 80vw; + margin: auto; + max-width: 80vw; + } .container p { font-size: 17px; - word-spacing: 0.2em; + word-spacing: 0.2em; } -@media(max-width:650px){ - .container{ + +@media(max-width:650px) { + .container { width: 100vw; } } \ No newline at end of file -- cgit v1.2.3 From 001b10077517b24e0eecc16819c77f0eb3c31dc1 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 21:33:39 +0300 Subject: PEP8 format and remove unnecessary comments --- wqflask/wqflask/markdown_routes.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 0445ded1..093dffeb 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -15,10 +15,6 @@ links_blueprint = Blueprint("links_blueprint", __name__) policies_blueprint = Blueprint("policies_blueprint", __name__) facilities_blueprint = Blueprint("facilities_blueprint", __name__) -# for debug -# https://raw.githubusercontent.com/Alexanderlacuna/gn-docs/feature/add-markdown-pages/ - - def render_markdown(file_name): github_url = ("https://raw.githubusercontent.com/" "genenetwork/gn-docs/master/") -- cgit v1.2.3 From f900a574be30590cca0e9c962bfecf25121e4ab0 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 21:40:15 +0300 Subject: delete environment endpoint in wqflask/views.py --- wqflask/wqflask/views.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 6cdce248..91d0842c 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -321,12 +321,6 @@ def credits(): #return render_template("docs.html", **doc.__dict__) return render_template("credits.html") -# @app.route("/environments") -# def environments(): -# doc = Docs("environments", request.args) -# return render_template("docs.html", **doc.__dict__) - #return render_template("environments.html", **doc.__dict__) - @app.route("/update_text", methods=('POST',)) def update_page(): update_text(request.form) -- cgit v1.2.3 From 8a74593bfda0d9e5e681046044c262713073164b Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 22:55:39 +0300 Subject: pep8 format for blue_print,url_prefix --- wqflask/wqflask/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py index 0b69ec40..0564cfa7 100644 --- a/wqflask/wqflask/__init__.py +++ b/wqflask/wqflask/__init__.py @@ -24,11 +24,11 @@ app.jinja_env.globals.update( # Registering blueprints app.register_blueprint(glossary_blueprint, url_prefix="/glossary") -app.register_blueprint(references_blueprint,url_prefix="/references") -app.register_blueprint(links_blueprint,url_prefix="/links") -app.register_blueprint(policies_blueprint,url_prefix="/policies") -app.register_blueprint(environments_blueprint,url_prefix="/environments") -app.register_blueprint(facilities_blueprint,url_prefix="/facilities") +app.register_blueprint(references_blueprint, url_prefix="/references") +app.register_blueprint(links_blueprint, url_prefix="/links") +app.register_blueprint(policies_blueprint, url_prefix="/policies") +app.register_blueprint(environments_blueprint, url_prefix="/environments") +app.register_blueprint(facilities_blueprint, url_prefix="/facilities") @app.before_request def before_request(): -- cgit v1.2.3 From 63c90d88499c2cda1b3da0960e179856aaba05c9 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 23:00:53 +0300 Subject: add doc string for render_markdown in wqflask/markdown_routes.py --- wqflask/wqflask/markdown_routes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 093dffeb..7e6c7948 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -16,6 +16,8 @@ policies_blueprint = Blueprint("policies_blueprint", __name__) facilities_blueprint = Blueprint("facilities_blueprint", __name__) def render_markdown(file_name): + """Try to fetch the file name from Github and if that fails, try to +look for it inside the file system """ github_url = ("https://raw.githubusercontent.com/" "genenetwork/gn-docs/master/") -- cgit v1.2.3 From b86f0f6200cb435cea91077352d5d95f610162a6 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 23:35:00 +0300 Subject: use css block in templates and remove comments --- wqflask/wqflask/markdown_routes.py | 3 ++- wqflask/wqflask/static/new/css/markdown.css | 7 ------- wqflask/wqflask/templates/environment.html | 2 -- wqflask/wqflask/templates/facilities.html | 3 +-- wqflask/wqflask/templates/links.html | 4 +--- wqflask/wqflask/templates/policies.html | 4 +--- wqflask/wqflask/templates/references.html | 3 +-- 7 files changed, 6 insertions(+), 20 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 7e6c7948..25eabe66 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -15,6 +15,7 @@ links_blueprint = Blueprint("links_blueprint", __name__) policies_blueprint = Blueprint("policies_blueprint", __name__) facilities_blueprint = Blueprint("facilities_blueprint", __name__) + def render_markdown(file_name): """Try to fetch the file name from Github and if that fails, try to look for it inside the file system """ @@ -51,7 +52,7 @@ def references(): @environments_blueprint.route("/") def environments(): - return render_template("environment.html", rendered_markdown=render_markdown_table("general/environments/environments.md")), 200 + return render_template("environment.html", rendered_markdown=render_markdown("general/environments/environments.md")), 200 @links_blueprint.route("/") diff --git a/wqflask/wqflask/static/new/css/markdown.css b/wqflask/wqflask/static/new/css/markdown.css index 6d76c190..91b72cb8 100644 --- a/wqflask/wqflask/static/new/css/markdown.css +++ b/wqflask/wqflask/static/new/css/markdown.css @@ -15,8 +15,6 @@ margin-left: auto; } - - .github-btn { margin: 20px 10px; display: flex; @@ -32,13 +30,8 @@ transition-duration: 0.5s; padding: 8px 12px; color: #fff; - /*background: #27407a;*/ background: blue; border-radius: 20px; - - /*text-align: center;*/ - - } .github-btn a:hover { diff --git a/wqflask/wqflask/templates/environment.html b/wqflask/wqflask/templates/environment.html index a331d494..f378e0b8 100644 --- a/wqflask/wqflask/templates/environment.html +++ b/wqflask/wqflask/templates/environment.html @@ -19,7 +19,6 @@ {% endblock %} diff --git a/wqflask/wqflask/templates/facilities.html b/wqflask/wqflask/templates/facilities.html index 5be0c96d..63f110dd 100644 --- a/wqflask/wqflask/templates/facilities.html +++ b/wqflask/wqflask/templates/facilities.html @@ -3,7 +3,7 @@ {% block title %}Facilities{% endblock %} {% block css %} - + {% endblock %} {% block content %} @@ -17,5 +17,4 @@
    - {% endblock %} \ No newline at end of file diff --git a/wqflask/wqflask/templates/links.html b/wqflask/wqflask/templates/links.html index ef481de2..94d8eab7 100644 --- a/wqflask/wqflask/templates/links.html +++ b/wqflask/wqflask/templates/links.html @@ -3,7 +3,7 @@ {% block title %}Links{% endblock %} {% block css %} - + {% endblock %} {% block content %} @@ -16,6 +16,4 @@ {{ rendered_markdown|safe }} - - {% endblock %} \ No newline at end of file diff --git a/wqflask/wqflask/templates/policies.html b/wqflask/wqflask/templates/policies.html index ef481de2..94d8eab7 100644 --- a/wqflask/wqflask/templates/policies.html +++ b/wqflask/wqflask/templates/policies.html @@ -3,7 +3,7 @@ {% block title %}Links{% endblock %} {% block css %} - + {% endblock %} {% block content %} @@ -16,6 +16,4 @@ {{ rendered_markdown|safe }} - - {% endblock %} \ No newline at end of file diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index e2f152e3..8dcf4493 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -3,7 +3,7 @@ {% block title %}Reference{% endblock %} {% block css %} - + {% endblock %} {% block content %} @@ -17,5 +17,4 @@ - {% endblock %} \ No newline at end of file -- cgit v1.2.3 From cd27138b6cc963450851417ef06303027da51419 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 27 Nov 2020 00:15:18 +0300 Subject: remove commented code --- wqflask/wqflask/markdown_routes.py | 1 - 1 file changed, 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 25eabe66..601845d7 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -26,7 +26,6 @@ look for it inside the file system """ if md_content.status_code == 200: return markdown.markdown(md_content.content.decode("utf-8"), extensions=['tables']) - # return markdown.Markdown().convert(md_content.content.decode("utf-8")) # TODO: Add fallback on our git server by checking the mirror. # Content not available return (f"\nContent for {file_name} not available. " -- cgit v1.2.3 From e396706f5c2bbb1bef21bcc8180565015aee3fb0 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 27 Nov 2020 12:59:18 +0300 Subject: add edit image --- wqflask/wqflask/static/images/edit.png | Bin 0 -> 2452 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 wqflask/wqflask/static/images/edit.png (limited to 'wqflask') diff --git a/wqflask/wqflask/static/images/edit.png b/wqflask/wqflask/static/images/edit.png new file mode 100644 index 00000000..571b08cd Binary files /dev/null and b/wqflask/wqflask/static/images/edit.png differ -- cgit v1.2.3 From 5c4a2727f013785c8818864c0520321ef8d60dce Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 27 Nov 2020 13:00:47 +0300 Subject: add new github button and css --- wqflask/wqflask/static/new/css/markdown.css | 27 +++++++++++++-------------- wqflask/wqflask/templates/environment.html | 11 ++++++++--- wqflask/wqflask/templates/facilities.html | 12 ++++++++---- wqflask/wqflask/templates/glossary.html | 11 ++++++++--- wqflask/wqflask/templates/links.html | 11 ++++++++--- wqflask/wqflask/templates/policies.html | 12 ++++++++---- wqflask/wqflask/templates/references.html | 19 +++++++++---------- 7 files changed, 62 insertions(+), 41 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/static/new/css/markdown.css b/wqflask/wqflask/static/new/css/markdown.css index 91b72cb8..311962c1 100644 --- a/wqflask/wqflask/static/new/css/markdown.css +++ b/wqflask/wqflask/static/new/css/markdown.css @@ -15,29 +15,28 @@ margin-left: auto; } -.github-btn { +.github-btn-container { margin: 20px 10px; display: flex; width: 90vw; justify-content: flex-end; } -.github-btn a { - display: inline-block; - align-self: center; - text-decoration: none; - transition-property: all; - transition-duration: 0.5s; - padding: 8px 12px; - color: #fff; - background: blue; - border-radius: 20px; +.github-btn { + border: 3px solid #357ebd; + background: lightgrey; + padding: 6px 8px; + border-radius: 16px; } -.github-btn a:hover { - - background: #333; +.github-btn a { + font-weight: bold; + color: #357ebd; +} +.github-btn a img { + height: 40px; + width: 40px; } diff --git a/wqflask/wqflask/templates/environment.html b/wqflask/wqflask/templates/environment.html index f378e0b8..183518a5 100644 --- a/wqflask/wqflask/templates/environment.html +++ b/wqflask/wqflask/templates/environment.html @@ -8,9 +8,14 @@ {% block content %} - +
    {{ rendered_markdown|safe }}
    diff --git a/wqflask/wqflask/templates/facilities.html b/wqflask/wqflask/templates/facilities.html index 63f110dd..652746a7 100644 --- a/wqflask/wqflask/templates/facilities.html +++ b/wqflask/wqflask/templates/facilities.html @@ -8,10 +8,14 @@ {% block content %} - - +
    {{ rendered_markdown|safe }} diff --git a/wqflask/wqflask/templates/glossary.html b/wqflask/wqflask/templates/glossary.html index 395bcfea..f536d977 100644 --- a/wqflask/wqflask/templates/glossary.html +++ b/wqflask/wqflask/templates/glossary.html @@ -8,9 +8,14 @@ {% block content %} - +
    {{ rendered_markdown|safe }} diff --git a/wqflask/wqflask/templates/links.html b/wqflask/wqflask/templates/links.html index 94d8eab7..cf524496 100644 --- a/wqflask/wqflask/templates/links.html +++ b/wqflask/wqflask/templates/links.html @@ -8,9 +8,14 @@ {% block content %} - +
    {{ rendered_markdown|safe }} diff --git a/wqflask/wqflask/templates/policies.html b/wqflask/wqflask/templates/policies.html index 94d8eab7..420493ad 100644 --- a/wqflask/wqflask/templates/policies.html +++ b/wqflask/wqflask/templates/policies.html @@ -8,10 +8,14 @@ {% block content %} - - +
    {{ rendered_markdown|safe }} diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index 8dcf4493..caf87244 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -1,20 +1,19 @@ {% extends "base.html" %} - {% block title %}Reference{% endblock %} - {% block css %} {% endblock %} - {% block content %} - - - +
    - {{ rendered_markdown|safe }} - + {{ rendered_markdown|safe }}
    {% endblock %} \ No newline at end of file -- cgit v1.2.3 From a4842a8d54f891dcb59d29aa53a0e442f8f0e0c2 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 27 Nov 2020 13:33:47 +0300 Subject: update to edit text in static templates --- wqflask/wqflask/templates/environment.html | 2 +- wqflask/wqflask/templates/facilities.html | 2 +- wqflask/wqflask/templates/glossary.html | 2 +- wqflask/wqflask/templates/links.html | 2 +- wqflask/wqflask/templates/policies.html | 2 +- wqflask/wqflask/templates/references.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/environment.html b/wqflask/wqflask/templates/environment.html index 183518a5..94b31464 100644 --- a/wqflask/wqflask/templates/environment.html +++ b/wqflask/wqflask/templates/environment.html @@ -11,7 +11,7 @@
    diff --git a/wqflask/wqflask/templates/facilities.html b/wqflask/wqflask/templates/facilities.html index 652746a7..a022b657 100644 --- a/wqflask/wqflask/templates/facilities.html +++ b/wqflask/wqflask/templates/facilities.html @@ -11,7 +11,7 @@
    diff --git a/wqflask/wqflask/templates/glossary.html b/wqflask/wqflask/templates/glossary.html index f536d977..752c4b12 100644 --- a/wqflask/wqflask/templates/glossary.html +++ b/wqflask/wqflask/templates/glossary.html @@ -11,7 +11,7 @@
    diff --git a/wqflask/wqflask/templates/links.html b/wqflask/wqflask/templates/links.html index cf524496..072e8429 100644 --- a/wqflask/wqflask/templates/links.html +++ b/wqflask/wqflask/templates/links.html @@ -11,7 +11,7 @@
    diff --git a/wqflask/wqflask/templates/policies.html b/wqflask/wqflask/templates/policies.html index 420493ad..4e0985d3 100644 --- a/wqflask/wqflask/templates/policies.html +++ b/wqflask/wqflask/templates/policies.html @@ -11,7 +11,7 @@
    diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index caf87244..f723a1e8 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -7,7 +7,7 @@
    -- cgit v1.2.3 From 1cabb7810a8b2ab5171e1547e154244978fb37d4 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 27 Nov 2020 14:23:21 +0300 Subject: edit css for static page --- wqflask/wqflask/static/new/css/markdown.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/static/new/css/markdown.css b/wqflask/wqflask/static/new/css/markdown.css index 311962c1..dca3e31d 100644 --- a/wqflask/wqflask/static/new/css/markdown.css +++ b/wqflask/wqflask/static/new/css/markdown.css @@ -23,13 +23,17 @@ } .github-btn { + display: flex; + justify-content: center; border: 3px solid #357ebd; background: lightgrey; - padding: 6px 8px; + padding: 3px 4px; + width: 200px; border-radius: 16px; } .github-btn a { + align-self: center; font-weight: bold; color: #357ebd; } @@ -37,6 +41,7 @@ .github-btn a img { height: 40px; width: 40px; + padding-left:5px; } -- cgit v1.2.3