crossword wip

master
km0 2 years ago
parent fbd3c32bb6
commit 73d369d723

File diff suppressed because one or more lines are too long

@ -14,26 +14,37 @@ def dump():
with open(f"{path}/{folder}/contents.md", "r", encoding="utf8") as f:
metadata, body = frontmatter.parse(f.read())
for content in metadata["contents"]:
if type(content) == dict and "img" in content:
if type(content) == dict:
if "img" in content:
postit = {
"title": metadata["title"],
"description": content["alt"],
"img": content["img"],
"slug": folder,
}
postit = {
"title": metadata["title"],
"description": content["alt"],
"img": content["img"],
"slug": folder,
}
elif type(content) == dict and "card" in content:
postit = {
"title": metadata["title"],
"card": content["card"],
"quote": content["quote"],
"motivation": content["motivation"],
"vision": content["vision"],
"emphaty": content["emphaty"],
"positivity": content["positivity"],
"slug": folder,
}
elif "card" in content:
postit = {
"title": metadata["title"],
"card": content["card"],
"quote": content["quote"],
"motivation": content["motivation"],
"vision": content["vision"],
"empathy": content["empathy"],
"positivity": content["positivity"],
"slug": folder,
}
elif "word" in content:
postit = {
"title": metadata["title"],
"definition": content['definition'],
"category": content['category'],
"start": content['start'],
"word": content['word'],
"direction": content['direction'],
"slug": folder
}
else:
postit = {
"title": metadata["title"],

@ -1 +1 @@
Subproject commit d7d6e9bc2f9c5dde5a35625afc6d1410e819e2f0
Subproject commit 999aa859b8884c3f8d75200a8b2013086bf5a2ea

@ -41,16 +41,22 @@ img {
}
.title {
font-size: 18px;
text-align: center;
position: absolute;
bottom: 0;
/* text-align: center; */
margin: 4mm;
color: #aaa;
font-weight: normal;
text-transform: uppercase;
font-size: 14px;
}
.description {
display: inline-block;
margin: 4mm;
font-size: 24px;
font-size: 28px;
line-height: 1.2;
white-space: pre-line;
margin-top: -1em;
}
figcaption {
@ -69,3 +75,7 @@ a {
color: #ddd;
font-size: 12px;
}
.description.long-text {
font-size: 21px;
}

@ -27,8 +27,8 @@
<dt>Motivation</dt>
<dd>{{content['motivation']}}</dd>
<dt>Emphaty</dt>
<dd>{{content['emphaty']}}</dd>
<dt>Empathy</dt>
<dd>{{content['empathy']}}</dd>
<dt>Vision</dt>
<dd>{{content['vision']}}</dd>
@ -37,9 +37,24 @@
<dd>{{content['positivity']}}</dd>
</dl>
{%elif content['definition']%}
<h2 class="title">{{content['title']}}</h2>
<p
class="description {% if content['definition']|length > 200 %} long-text {%endif%}"
>
{{content['definition']}}
</p>
<div class="category">{{content['category']}} - {{content['start']}}</div>
{%else%}
<h2 class="title">{{content['title']}}</h2>
<p class="description">{{content['description']}}</p>
<p
class="description {% if content['description']|length > 200 %} long-text {%endif%}"
>
{{content['description']}}
</p>
{%endif%}
</div>
{% endfor %}

Loading…
Cancel
Save