Compare commits
2 Commits
6c0adcb745
...
2d3ea50106
Author | SHA1 | Date | |
---|---|---|---|
|
2d3ea50106 | ||
4463b447bc |
@ -26,6 +26,12 @@ for capitulum in capitula:
|
||||
def llpsi():
|
||||
return render_template('index.html', capitula=capitula)
|
||||
|
||||
@app.route('/llpsi/<path:capitulum_id>')
|
||||
def capitulum(capitulum_id):
|
||||
filename = app.root_path + '/templates/Capitula/' + capitulum_id + '.html'
|
||||
with open(filename, 'r') as file:
|
||||
return render_template('Capitulum.html', capitulum_title=capitulum_id.replace('_', ' '), capitulum_content=file.read())
|
||||
|
||||
@app.route('/llpsi/pensum/<path:pensum_id>')
|
||||
def pensum(pensum_id):
|
||||
filename = app.root_path + '/templates/Pensa/' + pensum_id + '.html'
|
||||
|
@ -30,10 +30,18 @@ h2 {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#pensum_content {
|
||||
.pensum_content {
|
||||
font-size: 2vw;
|
||||
}
|
||||
|
||||
.capitulum_content {
|
||||
font-size: 2vw;
|
||||
}
|
||||
|
||||
p.capitulum_content {
|
||||
text-indent: 1em;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/LLPSI.css') }}">
|
||||
<script type="text/javascript">
|
||||
function adjust_size() {
|
||||
const pensum = document.querySelector('#pensum_content');
|
||||
const pensum = document.querySelector('.pensum_content');
|
||||
const inputs = pensum.querySelectorAll('input');
|
||||
inputs.forEach((input) => {
|
||||
if (input.type=="text") {
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
function validate() {
|
||||
const pensum = document.querySelector('#pensum_content');
|
||||
const pensum = document.querySelector('.pensum_content');
|
||||
const inputs = pensum.querySelectorAll('input');
|
||||
|
||||
inputs.forEach((input) => {
|
||||
@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
function show_answers() {
|
||||
const pensum = document.querySelector('#pensum_content');
|
||||
const pensum = document.querySelector('.pensum_content');
|
||||
const inputs = pensum.querySelectorAll('input');
|
||||
|
||||
inputs.forEach((input) => {
|
||||
@ -99,7 +99,7 @@
|
||||
Quantitās: <input type="checkbox" id="vowel_length">
|
||||
</label>
|
||||
</header>
|
||||
<div id="pensum_content">
|
||||
<div class="pensum_content">
|
||||
<p>{{pensum_content|safe}}</p>
|
||||
<br>
|
||||
<button title="Check answers" onclick="return validate();">Mitte</button><button title="Show correct answers" onclick="return show_answers();">Responsa</button>
|
||||
|
Loading…
Reference in New Issue
Block a user