summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/bupa4
-rw-r--r--src/style.css6
-rw-r--r--src/templates/entry.html2
-rw-r--r--src/templates/journal.html2
4 files changed, 9 insertions, 5 deletions
diff --git a/scripts/bupa b/scripts/bupa
index f2a810b..5fd1952 100755
--- a/scripts/bupa
+++ b/scripts/bupa
@@ -24,6 +24,10 @@ class Page(object):
self.meta_desc = page_dict['description']
if 'keywords' in page_dict:
self.meta_keywords = page_dict['keywords']
+ if 'dropcap' in page_dict:
+ self.dropcap = (page_dict['dropcap'] == 'True')
+ else:
+ self.dropcap = True
self.body = page_dict['body'][0]
def reST_to_html(s, id_prefix='id'):
diff --git a/src/style.css b/src/style.css
index 31904a5..405b187 100644
--- a/src/style.css
+++ b/src/style.css
@@ -89,7 +89,7 @@ header h1 {
margin-top: -0.75rem;
margin-bottom: 0.5rem;
}
-.entry > p.sc:first-of-type:first-letter {
+.entry.dropcap > p:first-of-type:first-letter {
float: left;
color: #903;
font-size: 44px;
@@ -100,7 +100,7 @@ header h1 {
font-family: 'Fontin';
}
@media (max-width: 767px) {
- .entry > p.sc:first-of-type:first-letter {
+ .entry.dropcap > p:first-of-type:first-letter {
padding-top: 0.2rem;
padding-right: 0.2rem;
font-size: 2.5rem;
@@ -108,7 +108,7 @@ header h1 {
}
/* Firefox-specific hack to make spacing work properly */
@media all and (min--moz-device-pixel-ratio:0) and (min-resolution: 3e1dpcm) {
- .entry > p:first-of-type:first-letter {
+ .entry.dropcap > p:first-of-type:first-letter {
font-size: 44px;
padding-top: 0.3rem;
}
diff --git a/src/templates/entry.html b/src/templates/entry.html
index 2355310..83dad5a 100644
--- a/src/templates/entry.html
+++ b/src/templates/entry.html
@@ -13,7 +13,7 @@
{% block content %}
<article itemscope itemtype="http://schema.org/Article"
- class="entry" id="entry:{{ page.id }}">
+ class="entry{% if page.dropcap %} dropcap{% endif %}" id="entry:{{ page.id }}">
<h2 itemprop="name" class="title">{{ page.title }}</h2>
diff --git a/src/templates/journal.html b/src/templates/journal.html
index 2b2794f..36abb93 100644
--- a/src/templates/journal.html
+++ b/src/templates/journal.html
@@ -7,7 +7,7 @@
{% block content %}
{% for entry in entries %}
<article itemscope itemtype="http://schema.org/Article"
- class="entry" id="entry:{{ entry.id }}">
+ class="entry{% if entry.dropcap %} dropcap{% endif %}" id="entry:{{ entry.id }}">
<h2 itemprop="name" class="title"><a href="#entry:{{ entry.id }}">{{ entry.title }}</a></h2>