adding key image support

This commit is contained in:
evilchili 2022-08-04 21:34:47 -07:00
parent 468d9dedf0
commit 49971ae270
12 changed files with 111 additions and 46 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 KiB

View File

@ -1,10 +1,11 @@
Title: Index ---
Save_as: index.html title: Index
Template: pages/index save_as: index.html
Show_recent: true template: pages/index
Status: hidden show_recent: true
Date: 2022-07-09 11:00 status: hidden
date: 2022-07-09 11:00
---
The Second Era ended in fire. The Empire of Yanrin Didan -- "Glowing Sands" in the common tongue -- spanned half the continent of Vosh, from the Sea of Storms in the south and across the jungles of Dewa Q'Asos to the peaks of Hoard's Vault. Its civilization stood unchallenged for an age, until a great power swept aside their magics, destroyed their cities, and scorched the earth leaving behind only dry, dead rock. No one knows just what caused destruction on such a scale, for it is said that not one soul survived the cataclysm and now, a thousand years later, their name and thousands of miles of desert are all that remain. The Empire's arcane wonders, their secrets, and their doom all lie buried under the dead sands of the Sahwat. The Second Era ended in fire. The Empire of Yanrin Didan -- "Glowing Sands" in the common tongue -- spanned half the continent of Vosh, from the Sea of Storms in the south and across the jungles of Dewa Q'Asos to the peaks of Hoard's Vault. Its civilization stood unchallenged for an age, until a great power swept aside their magics, destroyed their cities, and scorched the earth leaving behind only dry, dead rock. No one knows just what caused destruction on such a scale, for it is said that not one soul survived the cataclysm and now, a thousand years later, their name and thousands of miles of desert are all that remain. The Empire's arcane wonders, their secrets, and their doom all lie buried under the dead sands of the Sahwat.

View File

@ -0,0 +1,13 @@
---
# pages/maps.md
title: Maps
author: evilchili
tags: page
date: 2022-08-03 23:20:02.243922
key_image:
src: '/images/dewa_qasos.png'
alt: "Hand-drawn map of the Dewa Q'Asos"
---
Map men map men map map map men men men ...men.

View File

@ -1,7 +1,10 @@
Title: On Genre, Theme, and Mechanics ---
Date: 2022-07-09 11:00 title: On Genre, Theme, and Mechanics
Tags: homebrew date: 2022-07-09 11:00
Description: None of this is set in stone! Let's work out the setting together.<br> - evilchili tags: homebrew
description: None of this is set in stone! Let's work out the setting together.<br> - evilchili
---
The Dead Sands is a **post-apocalyptic gold rush weird western**. A millenia ago the Empire of Yanrin Didan, a great civilization in an era of high magic was destroyed, devastating the land and creating a vast desert. The desert was uninhabitable for centuries as fierce, unpredictable magical storms scoured the land. All trace of the peoples that once lived there was lost. Over time, nature slowly reasserted itself and desert plants, beasts, and things much stranger than beasts adapted to the harsh conditions, and the desert, while still deadly and weird, is no longer as empty as it once was. The Dead Sands is a **post-apocalyptic gold rush weird western**. A millenia ago the Empire of Yanrin Didan, a great civilization in an era of high magic was destroyed, devastating the land and creating a vast desert. The desert was uninhabitable for centuries as fierce, unpredictable magical storms scoured the land. All trace of the peoples that once lived there was lost. Over time, nature slowly reasserted itself and desert plants, beasts, and things much stranger than beasts adapted to the harsh conditions, and the desert, while still deadly and weird, is no longer as empty as it once was.

View File

@ -131,7 +131,6 @@ h6 { font-size: 1.25em; }
float: left; float: left;
margin: 0px; margin: 0px;
margin-top: -0.25em; margin-top: -0.25em;
margin-bottom: -0.5em;
padding: 0px; padding: 0px;
padding-right: 5px; padding-right: 5px;
color: #692F28; color: #692F28;
@ -146,6 +145,24 @@ h6 { font-size: 1.25em; }
color: inherit; color: inherit;
} }
img {
width:100%;
}
.key_image {
display: block;
margin: 0px auto;
max-width: calc(100% - 1em);
height: auto;
box-shadow: inset 0px 0px 40px 0px rgba(0,0,0,1);
border: 10px solid black;
}
.key_image img {
background-color:#FFF;
position: relative;
z-index: -1;
}
article.recent { article.recent {
font-style: italic; font-style: italic;
margin-bottom: 1em; margin-bottom: 1em;
@ -813,6 +830,10 @@ table.auto, table.auto tr, table.auto th, table.auto td {
text-align: left; text-align: left;
} }
.container .box p:first-of-type::first-letter {
margin-bottom: -0.5em;
}
/* enable fancy star decorations */ /* enable fancy star decorations */
ul.nav li:first-child:before,ul.nav li:after { ul.nav li:first-child:before,ul.nav li:after {
display: inherit; display: inherit;
@ -841,7 +862,7 @@ table.auto, table.auto tr, table.auto th, table.auto td {
-moz-border-radius: 0 0 120px 120px / 0 0 6px 6px; -moz-border-radius: 0 0 120px 120px / 0 0 6px 6px;
border-radius: 0 0 120px 120px / 0 0 6px 6px; border-radius: 0 0 120px 120px / 0 0 6px 6px;
padding: 1em; padding: 1em;
margin: 2em 10px 4em; margin: 2em 0px;
background: #fff; background: #fff;
-webkit-box-shadow: 0 1px 4px rgb(0 0 0 / 60%), 0 0 40px rgb(0 0 0 / 30%) inset; -webkit-box-shadow: 0 1px 4px rgb(0 0 0 / 60%), 0 0 40px rgb(0 0 0 / 30%) inset;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 0, 0, 0.3) inset; -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 0, 0, 0.3) inset;

View File

@ -1,12 +1,11 @@
{% extends "base.html" %} {% extends "base.html" %}
{% import "macros.html" as macros %}
{% block title %}{{ article.title|capitalize }} - {{SITENAME}}{% endblock title %} {% block title %}{{ article.title|capitalize }} - {{SITENAME}}{% endblock title %}
{% block key_image %}{{ macros.key_image(article) }}{% endblock key_image %}
{% block content %} {% block content %}
<section id="content"> <section id="content">
<div class='box curled'> <div class='box curled'>
<h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }}
<hr> <hr>
<div class='byline'> <div class='byline'>
<span class='date'>{{ article.locale_date }}</span>&nbsp;{% if article.tags %}{% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}{% endif %} <span class='date'>{{ article.locale_date }}</span>&nbsp;{% if article.tags %}{% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}{% endif %}
@ -18,5 +17,5 @@
<hr> <hr>
{% include "bottom-nav.html" %} {% include "bottom-nav.html" %}
</div> </div>
</section> </section>
{% endblock %} {% endblock content %}

View File

@ -18,7 +18,6 @@
<div class="header"> <div class="header">
<div class='sun'></div> <div class='sun'></div>
<div class='title'><h1><a href="/">{{ SITENAME }}</a></h1></div> <div class='title'><h1><a href="/">{{ SITENAME }}</a></h1></div>
<ul class="nav"> <ul class="nav">
{% for category, articles in categories %} {% for category, articles in categories %}
<li><a href="{{ SITEURL }}/{{ category.name }}">{{ category }}</a></li> <li><a href="{{ SITEURL }}/{{ category.name }}">{{ category }}</a></li>
@ -31,7 +30,10 @@
</div> </div>
</div> </div>
<div id='background'> <div id='background'>
<div class="container">{% block content %}{% endblock %}</div> <div class="container">
{% block key_image %}{% endblock %}
{% block content %}{% endblock %}
</div>
<footer id="contentinfo" class="footer"> <footer id="contentinfo" class="footer">
<nav class="pull-right bottom-nav"> <nav class="pull-right bottom-nav">
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">RSS</a> <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">RSS</a>

View File

@ -0,0 +1,7 @@
{% macro key_image(ref) %}
{% if ref.key_image %}
<a class='key_image' href="{{ ref.key_image.src }}">
<img src="{{ ref.key_image.src|replace('.','_thumb.') }}" alt="{{ ref.key_image.alt}}">
</a>
{% endif %}
{% endmacro %}

View File

@ -1,26 +1,29 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ page.title }} - {{SITENAME}}{%endblock%} {% import "macros.html" as macros %}
{% block title %}{{ page.title }} - {{SITENAME}}{% endblock title %}
{% block key_image %}{{ macros.key_image(page) }}{% endblock key_image %}
{% block content %} {% block content %}
<div class='box curled'> <section id="content">
<h2>{{ page.title }}</h2> <div class='box curled'>
<hr> <h2>{{ page.title }}</h2>
{% import 'translations.html' as translations with context %} <hr>
{{ translations.translations_for(page) }} {{ page.content }}
{{ page.content }} <hr>
<hr> </div>
{% if page.metadata['show_recent'] %}
<div class='column'> {% if page.show_recent %}
<div class='column'>
<div class='signs'> <div class='signs'>
<h3>Recent Sessions</h3> <h3>Recent Sessions</h3>
{% with count=10, key='category', values=['sessions', 'test'] %}{% include "signs.html" %}{% endwith %} {% with count=10, key='category', values=['sessions', 'test'] %}{% include "signs.html" %}{% endwith %}
</div> </div>
</div> </div>
<div class='column'> <div class='column'>
<h3>Recent Lore</h3> <h3>Recent Lore</h3>
<div class='signs'> <div class='signs'>
{% with count=10, key='category', values=['lore', 'dm'] %}{% include "signs.html" %}{% endwith %} {% with count=10, key='category', values=['lore', 'dm'] %}{% include "signs.html" %}{% endwith %}
</div> </div>
</div> </div>
{% endif %} {% endif %}
</div> </section>
{% endblock %} {% endblock content %}

View File

@ -0,0 +1,14 @@
<div class='box curled'>
<h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
<hr>
<div class='byline'>
<span class='date'>{{ article.locale_date }}</span>&nbsp;{% if article.tags %}{% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}{% endif %}
</div>
{% if article.description %}
<div class='scrap'><div class='note'>{{ article.description }}</div></div>
{% endif %}
{{ article.content }}
<hr>
{% include "bottom-nav.html" %}
</div>

View File

@ -65,7 +65,7 @@ def serve() -> None:
url = 'http://{host}:{port}/'.format(**CONFIG) url = 'http://{host}:{port}/'.format(**CONFIG)
def cached_build(): def cached_build():
pelican_run(['-e', 'CACHE_CONTENT=true', 'LOAD_CONTENT_CACHE=true', pelican_run(['-ve', 'CACHE_CONTENT=true', 'LOAD_CONTENT_CACHE=true',
'SHOW_DRAFTS=true', f'SITEURL="{url}"']) 'SHOW_DRAFTS=true', f'SITEURL="{url}"'])
clean() clean()
@ -143,8 +143,10 @@ def new(
category = 'beastiary' category = 'beastiary'
case 'region': case 'region':
category = 'regions' category = 'regions'
case 'page':
category = 'pages'
case _: case _:
category = content_type category = content_type.value
click.edit(filename=create(content_type.value, title, template_dir, click.edit(filename=create(content_type.value, title, template_dir,
category, template or content_type.value)) category, template or content_type.value))