From 38122e0102e7a03c47575342e5edb75c15912fef Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 14 Apr 2019 13:57:23 -0500 Subject: added html to preamble --- app/essays/migrations/0007_auto_20190414_1455.py | 18 ++++++++++++++++++ app/essays/models.py | 2 ++ design/sass/_details.scss | 1 + design/sass/_fonts.scss | 3 --- design/templates/essays/essay_detail.html | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 app/essays/migrations/0007_auto_20190414_1455.py 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 @@
{% if object.preamble %}
- {{object.preamble|smartypants|safe}} + {{object.preamble_html|smartypants|safe}}
{%endif%} {{object.body_html|safe|smartypants}}
-- cgit v1.2.3