From 5559f4614a030f7a926da0eda9d3fa2e5857e8e7 Mon Sep 17 00:00:00 2001 From: systers Date: Mon, 28 Jun 2021 14:53:23 +0200 Subject: [PATCH] Small updates: changing style, loading the pagedjs in the same iframe --- start.py | 8 ++++---- static/main.css | 2 +- templates/base.html | 8 ++++---- templates/html.html | 2 +- templates/pad.html | 2 +- templates/pagedjs.html | 5 +++++ templates/pandoc-template-pagedjs.html | 2 +- templates/stylesheet.html | 2 +- 8 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 templates/pagedjs.html diff --git a/start.py b/start.py index dddc8cb..c90fe5e 100755 --- a/start.py +++ b/start.py @@ -11,8 +11,8 @@ APP = flask.Flask(__name__) #The following three lines are the variables that need to be changed when making a new project. PROJECTNAME = 'dsn' -DIR_PATH = '/home/systers/dsn-documentation' │·························· -PORTNUMBER = 5599 +DIR_PATH = '/home/systers/dsn-documentation' +PORTNUMBER = 5123 # --- @@ -38,7 +38,7 @@ def pagedjs(): # generate html page with the pandoc template (with paged.js inserted in the header) os.system(f'pandoc -f markdown -t html -c { PROJECTNAME }.css --toc --toc-depth=1 --template { DIR_PATH }/templates/pandoc-template-pagedjs.html --standalone { DIR_PATH }/static/{ PROJECTNAME }.md -o { DIR_PATH }/static/{ PROJECTNAME }.pagedjs.html') - return open('static/{ PROJECTNAME }.pagedjs.html', 'r').read() + return flask.render_template('pagedjs.html') @APP.route('/html/', methods=['GET', 'POST']) def html(): @@ -55,4 +55,4 @@ def stylesheet(): if __name__ == '__main__': APP.debug=True - APP.run(port={ PORTNUMBER }) + APP.run(port=f'{ PORTNUMBER }') diff --git a/static/main.css b/static/main.css index f8a97d7..a4f8f46 100644 --- a/static/main.css +++ b/static/main.css @@ -1,5 +1,5 @@ body{ - background-color: lightgreen; + background-color: #eaa0f9; margin: 1vh 5vw 2vh 5vw; } div#nav{ diff --git a/templates/base.html b/templates/base.html index c6f50ae..4dd0aca 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,16 +2,16 @@ - RDI + DSN documentation -

RDI documentation

+

DSN documentation

{% block content %} diff --git a/templates/html.html b/templates/html.html index b60fa48..3fba955 100644 --- a/templates/html.html +++ b/templates/html.html @@ -1,5 +1,5 @@ {% extends "base.html" %} {% block content %} - + {% endblock %} diff --git a/templates/pad.html b/templates/pad.html index 6e5c256..fad05ea 100644 --- a/templates/pad.html +++ b/templates/pad.html @@ -1,5 +1,5 @@ {% extends "base.html" %} {% block content %} - + {% endblock %} diff --git a/templates/pagedjs.html b/templates/pagedjs.html new file mode 100644 index 0000000..790afaf --- /dev/null +++ b/templates/pagedjs.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} + +{% endblock %} diff --git a/templates/pandoc-template-pagedjs.html b/templates/pandoc-template-pagedjs.html index 3e41a4d..22141b1 100644 --- a/templates/pandoc-template-pagedjs.html +++ b/templates/pandoc-template-pagedjs.html @@ -4,7 +4,7 @@ - + diff --git a/templates/stylesheet.html b/templates/stylesheet.html index aaf3d7c..f8d1fe4 100644 --- a/templates/stylesheet.html +++ b/templates/stylesheet.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% block content %} - + {% endblock %}