Small updates: changing style, loading the pagedjs in the same iframe

This commit is contained in:
systers 2021-06-28 14:53:23 +02:00
parent bc67c1819c
commit 5559f4614a
8 changed files with 18 additions and 13 deletions

View File

@ -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 }')

View File

@ -1,5 +1,5 @@
body{
background-color: lightgreen;
background-color: #eaa0f9;
margin: 1vh 5vw 2vh 5vw;
}
div#nav{

View File

@ -2,16 +2,16 @@
<html lang='en'>
<head>
<meta charset="utf-8" />
<title>RDI</title>
<title>DSN documentation</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='main.css')}}">
</head>
<body>
<h1>RDI documentation</h1>
<h1>DSN documentation</h1>
<div id="nav">
<a href="/">pad</a>: <input type="text" name="pad" value="https://pad.vvvvvvaria.org/RDI.md">,
<a href="/">pad</a>: <input type="text" name="pad" value="https://pad.vvvvvvaria.org/DSN.md">,
<a href="/html/">html</a>,
<a href="/pagedjs/">pagedjs</a>,
<a href="/stylesheet/">stylesheet</a>: <input type="text" name="pad" value="https://pad.vvvvvvaria.org/RDI.css">,
<a href="/stylesheet/">stylesheet</a>: <input type="text" name="pad" value="https://pad.vvvvvvaria.org/DSN.css">,
</div>
<div id="wrapper">
{% block content %}

View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% block content %}
<iframe src="{{ url_for('static', filename='RDI.html')}}"></iframe>
<iframe src="{{ url_for('static', filename='dsn.html')}}"></iframe>
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% block content %}
<iframe src="https://pad.vvvvvvaria.org/RDI.md"></iframe>
<iframe src="https://pad.vvvvvvaria.org/dsn.md"></iframe>
{% endblock %}

5
templates/pagedjs.html Normal file
View File

@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block content %}
<iframe src="{{ url_for('static', filename='dsn.pagedjs.html')}}"></iframe>
{% endblock %}

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/static/RDI.css" rel="stylesheet" type="text/css">
<link href="/static/dsn.css" rel="stylesheet" type="text/css">
<script src="/static/paged.js" type="text/javascript"></script>
<script src="/static/paged.polyfill.js" type="text/javascript"></script>
<link href="/static/interface.css" rel="stylesheet" type="text/css">

View File

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% block content %}
<iframe src="https://pad.vvvvvvaria.org/RDI.css"></iframe>
<iframe src="https://pad.vvvvvvaria.org/dsn.css"></iframe>
{% endblock %}