summaryrefslogtreecommitdiff
path: root/design
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-02-28 15:51:14 -0600
committerluxagraf <sng@luxagraf.net>2019-02-28 15:51:14 -0600
commitbbd9cdd6cd1289de10666bdac9d1b636dec7fe7f (patch)
treeb7d48b29bb19059ef4f402983e28cc8adbf1badd /design
parent92aa5dab7435f83dd08f2d3c21462dc55e7a9b50 (diff)
added rich text snippets to page
Diffstat (limited to 'design')
-rw-r--r--design/sass/_details.scss5
-rw-r--r--design/templates/jrnl/entry_detail.html43
-rw-r--r--design/templates/lib/img_picwide.html6
3 files changed, 43 insertions, 11 deletions
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 @@
<meta property="og:url" content="https://luxagraf.net{{object.get_absolute_url}}" />
<meta property="og:description" content="{{object.meta_description}}" />
<meta property="article:published_time" content="{{object.pub_date|date:'c'}}" />
- <meta property="article:author" content="Luxagraf" />
+ <meta property="article:author" content="Scott Gilbertson" />
<meta property="og:site_name" content="Luxagraf" />
- <meta property="og:image" content="{{self.get_featured_image}}" />
+ <meta property="og:image" content="{{object.get_featured_image}}" />
<meta property="og:locale" content="en_US" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:description" content="{{object.meta_description}}"/>
<meta name="twitter:title" content="{{object.title|safe}}"/>
<meta name="twitter:site" content="@luxagraf"/>
<meta name="twitter:domain" content="luxagraf"/>
- <meta name="twitter:image:src" content="{{object.get_image_url}}"/>
+ <meta name="twitter:image:src" content="{{object.get_featured_image}}"/>
<meta name="twitter:creator" content="@luxagraf"/>
-
-
+<script type="application/ld+json">
+{
+ "@context": "https://schema.org",
+ "@type": "BlogPosting",
+ "mainEntityOfPage": {
+ "@type": "WebPage",
+ "@id": "https://luxagraf.net{{object.get_absolute_url}}"
+ },
+ "headline": "{{object.title}}",
+ "image": [
+ "https://media.luxagraf.net/original/2019/2019-02-16_191512_around-sma.jpg "
+ ],
+ "datePublished": "{{object.pub_date|date:'c'}}+04:00",
+ "dateModified": "{{object.pub_date|date:'c'}}+04:00",
+ "author": {
+ "@type": "Person",
+ "name": "Scott Gilbertson"
+ },
+ "publisher": {
+ "@type": "Organization",
+ "name": "Luxagraf",
+ "logo": {
+ "@type": "ImageObject",
+ "url": "https://luxagraf.net/media/img/logo-white.jpg"
+ }
+ },
+ "description": "{{object.meta_description}}"
+}
+</script>
{%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 %}
<main>
- <article class="h-entry hentry {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %} post--article--double{%endif%}{%endwith%}" itemscope itemType="http://schema.org/Article">
+ <article class="h-entry hentry {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %} post--article--double{%endif%}{%endwith%}" itemscope itemType="http://schema.org/BlogPosting">
<header id="header" class="post-header {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %}post--header--double{%endif%}{%endwith%}">
<h1 class="p-name entry-title post-title" itemprop="headline">{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}</h1>
+ <h2 class="post-subtitle">{{object.subtitle|smartypants|safe}}</h2>
<aside class="p-location h-adr adr post-location" itemprop="contentLocation" itemscope itemtype="http://schema.org/Place">
- {% if object.location.country_name == "United States" %}<span class="p-locality locality">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.state_name|safe}}</a>, <span class="p-country-name">U.S.</span>{%else%}<span class="p-region">{{object.location.name|smartypants|safe}}</span>, <a class="p-country-name country-name" href="/jrnl/{{object.location.country_slug}}/" title="travel writing from {{object.location.country_name}}">{{object.location.country_name|safe}}</a>{%endif%}
+ <h3 class="h-adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">{% if object.location.country_name == "United States" %}<span class="p-locality locality" itemprop="addressLocality">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.state_name|safe}}</a>, <span class="p-country-name" itemprop="addressCountry">U.S.</span>{%else%}<span class="p-region" itemprop="addressRegion">{{object.location.name|smartypants|safe}}</span>, <a class="p-country-name country-name" href="/jrnl/{{object.location.country_slug}}/" title="travel writing from {{object.location.country_name}}"><span itemprop="addressCountry">{{object.location.country_name|safe}}</span></a>{%endif%}</h3>
{% with object.get_template_name_display as t %}{%if t == "single" or t == "single-dark" %} &ndash;&nbsp;<a href="" onclick="showMap({{object.latitude}}, {{object.longitude}}, { type:'point', lat:'{{object.latitude}}', lon:'{{object.longitude}}'}); return false;" title="see a map">Map</a>{%endif%}{%endwith%}
</aside>
<time class="dt-published published dt-updated post-date" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time>
+ <span class="hide" itemprop="author" itemscope itemtype="http://schema.org/Person">by <a class="p-author h-card" href="/about"><span itemprop="name">Scott Gilbertson</span></a></span>
</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">
{{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 %}
<figure{%if not is_cluster %} class="picwide"{%endif%}>{%else%}{%if not is_cluster %}<div class="picwide">{%endif%}{%endif%}
- <a href="{%get_image_by_size image "original"%} " title="view larger image">
- <img sizes="(max-width: 1439px) 100vw, (min-width: 1440px) 1440px" srcset="{% for size in image.sizes.all%}{% get_image_by_size image size.name %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%}{% for size in image.sizes.all%}{%if not forloop.first and not forloop.last%} src="{% get_image_by_size image size.name%}"{%endif%}{%endfor%} alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%}" data-jslghtbx="{%get_image_by_size image "original"%}" data-jslghtbx-group="group" {% if caption%}data-jslghtbx-caption="{{image.caption}}"{%endif%}>
+ <a itemscope itemtype="http://schema.org/ImageObject" href="{%get_image_by_size image "original"%} " title="view larger image">
+ <img itemprop="contentUrl" sizes="(max-width: 1439px) 100vw, (min-width: 1440px) 1440px" srcset="{% for size in image.sizes.all%}{% get_image_by_size image size.name %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%}{% for size in image.sizes.all%}{%if not forloop.first and not forloop.last%} src="{% get_image_by_size image size.name%}"{%endif%}{%endfor%} alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%}" data-jslghtbx="{%get_image_by_size image "original"%}" data-jslghtbx-group="group" {% if caption%}data-jslghtbx-caption="{{image.caption}}"{%endif%}>
</a>
-{% if caption or exif or image.photo_credit_source %}<figcaption>{% endif %}{% if caption %}{{image.caption|safe}}{% endif %}{% if exif %} | <small>Camera: {{image.exif_make}} {{image.exif_model}} with {{image.exif_lens}}</small>{% endif %}{% if image.photo_credit_source %}{%if caption or exif %} | {%endif%}image by {% if image.photo_credit_url %}<a href="{{image.photo_credit_url}}">{%endif%}{{image.photo_credit_source}}{% if image.photo_credit_url %}</a>{%endif%}{%endif%}{% if caption or exif or image.photo_credit_source %}</figcaption>
+{% if caption or exif or image.photo_credit_source %}<figcaption>{% endif %}{% if caption %}{{image.caption|safe}}{% endif %}{% if exif %} | <small>Camera: {{image.exif_make}} {{image.exif_model}} with {{image.exif_lens}}</small>{% endif %}{% if image.photo_credit_source %}{%if caption or exif %} | {%endif%}image by {% if image.photo_credit_url %}<a href="{{image.photo_credit_url}}" itemprop="author">{%endif%}{{image.photo_credit_source}}{% if image.photo_credit_url %}</a>{%endif%}{%endif%}{% if caption or exif or image.photo_credit_source %}</figcaption>
</figure>{%else%}{%if not is_cluster %}</div>{%endif%}
{% endif %}