page numbers

master
km0 3 years ago
parent 73d369d723
commit 8b55f51004

File diff suppressed because one or more lines are too long

@ -1,6 +1,7 @@
import json
import frontmatter
import os
import string
def dump():
@ -45,6 +46,32 @@ def dump():
"direction": content['direction'],
"slug": folder
}
if content['word']:
start = (string.ascii_uppercase.index(content['start'][0]),int(content['start'][1:]))
print(start)
for i in range(len(content['word'])):
if content['direction'] == 'H':
# increase number
start_f = f"{string.ascii_uppercase[start[0]]}{start[1] + i}"
# print(start_f)
pass
else:
# increase letter
start_f = f"{string.ascii_uppercase[start[0] + i]}{start[1]}"
# print(start_f)
pass
contents.append({
"title": metadata["title"],
"definition": " ",
"category": content['category'],
"start": start_f,
"word": content['word'],
"direction": content['direction'],
"slug": folder
})
else:
postit = {
"title": metadata["title"],

@ -1 +1 @@
Subproject commit 999aa859b8884c3f8d75200a8b2013086bf5a2ea
Subproject commit 6ec639f124cce053cb7abac640a2188a71b1c354

@ -49,5 +49,14 @@
.crosswords .category {
font-size: 14px;
margin: 4mm;
text-transform: uppercase;
position: absolute;
bottom: calc(4mm + 1em);
}
.crosswords .description {
font-size: 21px;
}
.crosswords .description.long-text {
font-size: 18px;
}

@ -43,7 +43,6 @@ img {
.title {
position: absolute;
bottom: 0;
/* text-align: center; */
margin: 4mm;
font-weight: normal;
text-transform: uppercase;
@ -56,7 +55,7 @@ img {
font-size: 28px;
line-height: 1.2;
white-space: pre-line;
margin-top: -1em;
margin-top: calc(4mm - 1em);
}
figcaption {
@ -79,3 +78,10 @@ a {
.description.long-text {
font-size: 21px;
}
.page-number {
position: absolute;
right: 4mm;
bottom: 4mm;
font-size: 14px;
}

@ -46,10 +46,11 @@
{{content['definition']}}
</p>
<div class="category">{{content['category']}} - {{content['start']}}</div>
<div class="category">{{content['start']}} {{content['category']}}</div>
{%else%}
<h2 class="title">{{content['title']}}</h2>
<div class="page-number">{{loop.index}}/{{contents|length}}</div>
<p
class="description {% if content['description']|length > 200 %} long-text {%endif%}"
>

Loading…
Cancel
Save