From bbd9cdd6cd1289de10666bdac9d1b636dec7fe7f Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 28 Feb 2019 15:51:14 -0600 Subject: added rich text snippets to page --- app/jrnl/models.py | 2 +- design/sass/_details.scss | 5 +++- design/templates/jrnl/entry_detail.html | 43 +++++++++++++++++++++++++++------ design/templates/lib/img_picwide.html | 6 ++--- 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/app/jrnl/models.py b/app/jrnl/models.py index ef25a40..beb0723 100644 --- a/app/jrnl/models.py +++ b/app/jrnl/models.py @@ -113,7 +113,7 @@ class Entry(models.Model): def get_featured_image(self): if self.featured_image: - return self.featured_image.image.url + return "%s%s" % (settings.IMAGES_URL, self.featured_image.image.url[14:]) else: return self.image.url diff --git a/design/sass/_details.scss b/design/sass/_details.scss index 2ddcc85..e6aeb47 100644 --- a/design/sass/_details.scss +++ b/design/sass/_details.scss @@ -181,8 +181,11 @@ h4.post-source { } } } - .post-location { + h3 { + display: inline; + @include fontsize(14); + } a { color: $secondary_link_color; text-decoration: none; diff --git a/design/templates/jrnl/entry_detail.html b/design/templates/jrnl/entry_detail.html index 4e84103..b615982 100644 --- a/design/templates/jrnl/entry_detail.html +++ b/design/templates/jrnl/entry_detail.html @@ -16,19 +16,46 @@ - + - + - + - - + {%endblock%} {%block htmlclass%}{% with object.template_name as t %} class="detail {%if t == 1 or t == 3 or t == 5 %}double{%else%}single{%endif%}{%if t == 2 or t == 3 %} dark{%endif%}{%if t == 4 or t == 5 %} black{%endif%}"{%endwith%}{%endblock%} @@ -36,14 +63,16 @@ class="detail {%if t == 1 or t == 3 or t == 5 %}double{%else%}single{%endif%}{%i {% block primary %}
-
+

{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}

+

{{object.subtitle|smartypants|safe}}

+
{{object.body_html|safe|smartypants}} diff --git a/design/templates/lib/img_picwide.html b/design/templates/lib/img_picwide.html index 21b325b..5e78c72 100644 --- a/design/templates/lib/img_picwide.html +++ b/design/templates/lib/img_picwide.html @@ -1,9 +1,9 @@ {% load get_image_by_size %} {% if caption or exif or image.photo_credit_source %} {%else%}{%if not is_cluster %}
{%endif%}{%endif%} - - {{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%} + + {{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%} -{% if caption or exif or image.photo_credit_source %}
{% endif %}{% if caption %}{{image.caption|safe}}{% endif %}{% if exif %} | Camera: {{image.exif_make}} {{image.exif_model}} with {{image.exif_lens}}{% endif %}{% if image.photo_credit_source %}{%if caption or exif %} | {%endif%}image by {% if image.photo_credit_url %}{%endif%}{{image.photo_credit_source}}{% if image.photo_credit_url %}{%endif%}{%endif%}{% if caption or exif or image.photo_credit_source %}
+{% if caption or exif or image.photo_credit_source %}
{% endif %}{% if caption %}{{image.caption|safe}}{% endif %}{% if exif %} | Camera: {{image.exif_make}} {{image.exif_model}} with {{image.exif_lens}}{% endif %}{% if image.photo_credit_source %}{%if caption or exif %} | {%endif%}image by {% if image.photo_credit_url %}{%endif%}{%endif%}{% if caption or exif or image.photo_credit_source %}
{%else%}{%if not is_cluster %}
{%endif%} {% endif %} -- cgit v1.2.3