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
Template: pages/index
Show_recent: true
Status: hidden
Date: 2022-07-09 11:00
---
title: Index
save_as: index.html
template: pages/index
show_recent: true
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.

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
Tags: homebrew
Description: None of this is set in stone! Let's work out the setting together.<br> - evilchili
---
title: On Genre, Theme, and Mechanics
date: 2022-07-09 11:00
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.

View File

@ -131,7 +131,6 @@ h6 { font-size: 1.25em; }
float: left;
margin: 0px;
margin-top: -0.25em;
margin-bottom: -0.5em;
padding: 0px;
padding-right: 5px;
color: #692F28;
@ -146,6 +145,24 @@ h6 { font-size: 1.25em; }
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 {
font-style: italic;
margin-bottom: 1em;
@ -813,6 +830,10 @@ table.auto, table.auto tr, table.auto th, table.auto td {
text-align: left;
}
.container .box p:first-of-type::first-letter {
margin-bottom: -0.5em;
}
/* enable fancy star decorations */
ul.nav li:first-child:before,ul.nav li:after {
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;
border-radius: 0 0 120px 120px / 0 0 6px 6px;
padding: 1em;
margin: 2em 10px 4em;
margin: 2em 0px;
background: #fff;
-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;

View File

@ -1,12 +1,11 @@
{% extends "base.html" %}
{% import "macros.html" as macros %}
{% block title %}{{ article.title|capitalize }} - {{SITENAME}}{% endblock title %}
{% block key_image %}{{ macros.key_image(article) }}{% endblock key_image %}
{% block content %}
<section id="content">
<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>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }}
<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 %}
@ -18,5 +17,5 @@
<hr>
{% include "bottom-nav.html" %}
</div>
</section>
{% endblock %}
</section>
{% endblock content %}

View File

@ -6,9 +6,9 @@
<meta charset="utf-8" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<link href="{{ SITEURL }}/theme/deadsands/css/style.css" rel="stylesheet" />
{% if FAVICON %}
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON }}" type="image/x-icon" />
{% endif %}
{% if FAVICON %}
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON }}" type="image/x-icon" />
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
{% endblock head %}
</head>
@ -18,7 +18,6 @@
<div class="header">
<div class='sun'></div>
<div class='title'><h1><a href="/">{{ SITENAME }}</a></h1></div>
<ul class="nav">
{% for category, articles in categories %}
<li><a href="{{ SITEURL }}/{{ category.name }}">{{ category }}</a></li>
@ -31,7 +30,10 @@
</div>
</div>
<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">
<nav class="pull-right bottom-nav">
<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" %}
{% 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 %}
<div class='box curled'>
<h2>{{ page.title }}</h2>
<hr>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(page) }}
{{ page.content }}
<hr>
{% if page.metadata['show_recent'] %}
<div class='column'>
<div class='signs'>
<h3>Recent Sessions</h3>
{% with count=10, key='category', values=['sessions', 'test'] %}{% include "signs.html" %}{% endwith %}
<section id="content">
<div class='box curled'>
<h2>{{ page.title }}</h2>
<hr>
{{ page.content }}
<hr>
</div>
</div>
<div class='column'>
<h3>Recent Lore</h3>
<div class='signs'>
{% with count=10, key='category', values=['lore', 'dm'] %}{% include "signs.html" %}{% endwith %}
{% if page.show_recent %}
<div class='column'>
<div class='signs'>
<h3>Recent Sessions</h3>
{% with count=10, key='category', values=['sessions', 'test'] %}{% include "signs.html" %}{% endwith %}
</div>
</div>
<div class='column'>
<h3>Recent Lore</h3>
<div class='signs'>
{% with count=10, key='category', values=['lore', 'dm'] %}{% include "signs.html" %}{% endwith %}
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}
</section>
{% 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)
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}"'])
clean()
@ -143,8 +143,10 @@ def new(
category = 'beastiary'
case 'region':
category = 'regions'
case 'page':
category = 'pages'
case _:
category = content_type
category = content_type.value
click.edit(filename=create(content_type.value, title, template_dir,
category, template or content_type.value))