summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-04-14 13:57:23 -0500
committerluxagraf <sng@luxagraf.net>2019-04-14 13:57:23 -0500
commit38122e0102e7a03c47575342e5edb75c15912fef (patch)
tree4544f1507159cb6770db3f25f2b227859bfd5151
parent471498bafcfa2e7d2d00e0672b83c7ad41edb557 (diff)
added html to preamble
-rw-r--r--app/essays/migrations/0007_auto_20190414_1455.py18
-rw-r--r--app/essays/models.py2
-rw-r--r--design/sass/_details.scss1
-rw-r--r--design/sass/_fonts.scss3
-rw-r--r--design/templates/essays/essay_detail.html2
5 files changed, 22 insertions, 4 deletions
diff --git a/app/essays/migrations/0007_auto_20190414_1455.py b/app/essays/migrations/0007_auto_20190414_1455.py
new file mode 100644
index 0000000..a5242cb
--- /dev/null
+++ b/app/essays/migrations/0007_auto_20190414_1455.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.1.7 on 2019-04-14 14:55
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('essays', '0006_auto_20190303_1625'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='essay',
+ name='preamble_html',
+ field=models.TextField(blank=True),
+ ),
+ ]
diff --git a/app/essays/models.py b/app/essays/models.py
index 5a29667..c75f72d 100644
--- a/app/essays/models.py
+++ b/app/essays/models.py
@@ -25,6 +25,7 @@ class Essay(models.Model):
sub_title = models.CharField(max_length=200, blank=True)
dek = models.TextField(blank=True)
preamble = models.TextField(blank=True)
+ preamble_html = models.TextField(blank=True)
slug = models.SlugField(unique_for_date='pub_date')
body_html = models.TextField(blank=True)
body_markdown = models.TextField()
@@ -74,6 +75,7 @@ class Essay(models.Model):
md = render_images(self.body_markdown)
self.body_html = markdown_to_html(md)
self.afterword_html = markdown_to_html(self.afterword)
+ self.preamble_html = markdown_to_html(self.preamble)
super(Essay, self).save()
diff --git a/design/sass/_details.scss b/design/sass/_details.scss
index 41afd04..f70c086 100644
--- a/design/sass/_details.scss
+++ b/design/sass/_details.scss
@@ -403,6 +403,7 @@ h4.post-source {
p {
font-size: 1rem;
line-height: 1.4;
+ margin-top: 0 !important;
}
hr {display: none;}
ol {
diff --git a/design/sass/_fonts.scss b/design/sass/_fonts.scss
index 77f6f7c..9bdc94c 100644
--- a/design/sass/_fonts.scss
+++ b/design/sass/_fonts.scss
@@ -8,7 +8,6 @@
font-style: normal;
}
-
@font-face {
font-family: 'mffweb';
src: url('/media/fonts/ffmpb.woff2') format('woff2');
@@ -23,8 +22,6 @@
font-weight: 400;
font-style: italic;
}
-
-
@font-face {
font-family: 'mffnweb';
src: url('/media/fonts/ffmn.woff2') format('woff2');
diff --git a/design/templates/essays/essay_detail.html b/design/templates/essays/essay_detail.html
index 436004a..d1931e7 100644
--- a/design/templates/essays/essay_detail.html
+++ b/design/templates/essays/essay_detail.html
@@ -48,7 +48,7 @@
</header>
<div id="article" class="e-content entry-content post--body post--body--{% with object.template_name as t %}{%if t == 0 or t == 2 %}single{%endif%}{%if t == 1 or t == 3 %}double{%endif%}{%endwith%}" itemprop="articleBody">
{% if object.preamble %}<div class="afterward">
- {{object.preamble|smartypants|safe}}
+ {{object.preamble_html|smartypants|safe}}
</div>{%endif%}
{{object.body_html|safe|smartypants}}
</div>