RSS cleanup, exif to definition list, style additions for favs & stuff

This commit is contained in:
Peter Molnar 2017-06-12 14:19:09 +00:00
parent 2db8720fc3
commit ae7932a75b
7 changed files with 97 additions and 57 deletions

View file

@ -33,11 +33,11 @@
<meta name="DC.Title" content="{{ title }}" /> <meta name="DC.Title" content="{{ title }}" />
<meta name="DC.Creator" content="{{ site.author.name }}" /> <meta name="DC.Creator" content="{{ site.author.name }}" />
<meta name="DC.Description" content="{{ taxonomy.description|default(title) }}" /> <meta name="DC.Description" content="{{ taxonomy.description|default(title) }}" />
<meta name="DC.Date" content="{{ posts[0].published|date("%Y-%m-%d") }}" /> <meta name="DC.Date" content="{{ posts[0].published|date('%Y-%m-%d') }}" />
<meta name="DC.Type" content="collection" /> <meta name="DC.Type" content="collection" />
<meta name="DC.Language" content="{{ site.lang }}" /> <meta name="DC.Language" content="{{ site.lang }}" />
<meta name="DC.Source" content="{{ turl }}" /> <meta name="DC.Source" content="{{ turl }}" />
<meta name="DC.Rights" content="Copyright {{ posts[0].published|date("%Y") }}, {{ site.author.name }} <{{ site.author.email }}>. All rights reserved."> <meta name="DC.Rights" content="Copyright {{ posts[0].published|date('%Y') }}, {{ site.author.name }} <{{ site.author.email }}>. All rights reserved.">
{% include 'block_header_close.html' %} {% include 'block_header_close.html' %}
@ -95,8 +95,8 @@
<aside class="pubdate{% if post.bookmark or post.repost %} hide{% endif %}"> <aside class="pubdate{% if post.bookmark or post.repost %} hide{% endif %}">
<a class="u-url u-uuid" href="{{ site.url}}/{{ post.slug }}/"></a> <a class="u-url u-uuid" href="{{ site.url}}/{{ post.slug }}/"></a>
<a title="{{ post.title }}" href="{{ site.url }}/{{ post.slug }}"> <a title="{{ post.title }}" href="{{ site.url }}/{{ post.slug }}">
<time class="dt-published" datetime="{{ post.published|date("c") }}"> <time class="dt-published" datetime="{{ post.published|date('c') }}">
{{ post.published|date("%Y-%m-%d %H:%M") }} {{ post.published|date('%Y-%m-%d %H:%M') }}
</time> </time>
</a> </a>
</aside> </aside>
@ -109,7 +109,7 @@
<img src="{{ post.thumbnail }}" alt="{{ post.title }}" class="alignleft" /> <img src="{{ post.thumbnail }}" alt="{{ post.title }}" class="alignleft" />
{% else %} {% else %}
<svg class="icon large"><use xlink:href="#icon-{{ post.category }}" /></svg> <svg class="icon large"><use xlink:href="#icon-{{ post.category }}" /></svg>
{% endif %} {{ post.summary }} {% endif %} {{ post.sumhtml }}
<span class="more"> <span class="more">
<a href="{{ site.url }}/{{ post.slug }}" title="{{ post.title }}"></a> <a href="{{ site.url }}/{{ post.slug }}" title="{{ post.title }}"></a>
</span> </span>

View file

@ -1,49 +1,56 @@
<aside class="exif"> <aside class="exif">
<ul> <dl>
{% if post.exif.camera %} {% if post.exif.camera %}
<li> <dt>Camera</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-camera" /></svg> <svg class="icon"><use xlink:href="#icon-camera" /></svg>
{{ post.exif.camera }} {{ post.exif.camera }}
</li> </dd>
{% endif %} {% endif %}
{% if post.exif.aperture %} {% if post.exif.aperture %}
<li> <dt>Aperture</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-aperture" /></svg> <svg class="icon"><use xlink:href="#icon-aperture" /></svg>
f/{{ post.exif.aperture }} f/{{ post.exif.aperture }}
</li> </dd>
{% endif %} {% endif %}
{% if post.exif.shutter_speed %} {% if post.exif.shutter_speed %}
<li> <dt>Shutter speed</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-clock" /></svg> <svg class="icon"><use xlink:href="#icon-clock" /></svg>
{{ post.exif.shutter_speed }} sec {{ post.exif.shutter_speed }} sec
</li> </dd>
{% endif %} {% endif %}
{% if post.exif.focal_length %} {% if post.exif.focal_length %}
<li> <dt>Focal length (as set)</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-focallength" /></svg> <svg class="icon"><use xlink:href="#icon-focallength" /></svg>
{{ post.exif.focal_length }}{% if not post.exif.focal_length|search( 'mm' ) %} mm{% endif %} {{ post.exif.focal_length }}{% if not post.exif.focal_length|search( 'mm' ) %} mm{% endif %}
</li> </dd>
{% endif %} {% endif %}
{% if post.exif.iso %} {% if post.exif.iso %}
<li> <dt>Sensitivity</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-sensitivity" /></svg> <svg class="icon"><use xlink:href="#icon-sensitivity" /></svg>
ISO {{ post.exif.iso }} ISO {{ post.exif.iso }}
</li> </dd>
{% endif %} {% endif %}
{% if post.exif.lens %} {% if post.exif.lens %}
<li> <dt>Lens</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-lens" /></svg> <svg class="icon"><use xlink:href="#icon-lens" /></svg>
{{ post.exif.lens }} {{ post.exif.lens }}
</li> </dd>
{% endif %} {% endif %}
{% if (post.exif.geo_latitude) and (post.exif.geo_longitude) %} {% if (post.exif.geo_latitude) and (post.exif.geo_longitude) %}
<li> <dt>Coordinates</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-location" /></svg> <svg class="icon"><use xlink:href="#icon-location" /></svg>
<a class="h-geo geo p-location" href="https://www.bing.com/maps?cp={{ post.exif.geo_latitude}}~{{ post.exif.geo_longitude }}&v=2&lvl=16&sty=a&sp=point.{{ post.exif.geo_latitude}}_{{ post.exif.geo_longitude }}_{{ site.url|urlencode() ~ '/' ~ post.slug|urlencode() }}"> <a class="h-geo geo p-location" href="https://www.bing.com/maps?cp={{ post.exif.geo_latitude}}~{{ post.exif.geo_longitude }}&v=2&lvl=16&sty=a&sp=point.{{ post.exif.geo_latitude}}_{{ post.exif.geo_longitude }}_{{ site.url|urlencode() ~ '/' ~ post.slug|urlencode() }}">
<span class="p-latitude">{{ post.exif.geo_latitude }}</span> <span class="p-latitude">{{ post.exif.geo_latitude }}</span>
<span class="p-longitude">{{ post.exif.geo_longitude }}</span> <span class="p-longitude">{{ post.exif.geo_longitude }}</span>
</a> </a>
</li> </dd>
{% endif %} {% endif %}
</ul> </dl>
</aside> </aside>

View file

@ -33,7 +33,7 @@
<dt>RSS feed</dt> <dt>RSS feed</dt>
<dd> <dd>
<svg class="icon"><use xlink:href="#icon-rss" /></svg> <svg class="icon"><use xlink:href="#icon-rss" /></svg>
<a title="RSS feed" href="{{ site.rss_url }}">RSS</a> <a title="RSS feed" href="{{ site.url }}/feed/">RSS</a>
</dd> </dd>
</dl> </dl>
</nav> </nav>

View file

@ -1,11 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" <rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> >
{%- if taxonomy.name -%} {%- if taxonomy.name -%}
@ -16,37 +12,43 @@
<channel> <channel>
<title>{{ title }}</title> <title>{{ title }}</title>
<atom:link href="{{ site.url}}{{ taxonomy.url }}feed/" rel="self" type="application/rss+xml" />
<link>{{ site.url }}{{ taxonomy.url }}feed/</link> <link>{{ site.url }}{{ taxonomy.url }}feed/</link>
<description>{{ description }}</description> <description></description>
<language>{{ site.lang }}</language> <webMaster>{{ site.author.email }} ({{ site.author.name }})</webMaster>
<sy:updatePeriod>daily</sy:updatePeriod> <managingEditor>{{ site.author.email }} ({{ site.author.name }})</managingEditor>
<sy:updateFrequency>1</sy:updateFrequency> <lastBuildDate>{{ taxonomy.lastmod|date("%a, %d %b %Y %T %z") }}</lastBuildDate>
{% if taxonomy.url|length > 0 %} <copyright>Copyright {{ taxonomy.lastmod|date("%Y") }} {{ site.author.name }}</copyright>
{% if taxonomy.url|length > 0 -%}
<!-- PubSubHubbub Discovery --> <!-- PubSubHubbub Discovery -->
<link rel="hub" href="{{ site.websuburl }}" xmlns="http://www.w3.org/2005/Atom" /> <link rel="hub" href="{{ site.websuburl }}" xmlns="http://www.w3.org/2005/Atom" />
<link rel="self" href="{{ site.url }}{{ taxonomy.url }}feed/" xmlns="http://www.w3.org/2005/Atom" /> <link rel="self" href="{{ site.url }}{{ taxonomy.url }}feed/" xmlns="http://www.w3.org/2005/Atom" />
<!-- End Of PubSubHubbub Discovery --> <!-- End Of PubSubHubbub Discovery -->
{% endif %} {%- endif %}
{% for post in posts %} {% for post in posts %}
<item> <item>
<title>{% if post.title %}{{ post.title }}{% endif%}</title> <title>{% if post.title %}{{ post.title }}{% endif%}</title>
<link>{{ site.url }}/{{ post.slug }}/</link> <link>{{ site.url }}/{{ post.slug }}/</link>
<pubDate>{{ post.published|date("%a, %d %b %Y %T %z") }}</pubDate> {%- if post.summary|length > 0 %}
<dc:creator><![CDATA[{{ post.author.name }}]]></dc:creator> <description><![CDATA[{{ post.sumhtml }}]]></description>
<guid isPermaLink="true">{{ site.url }}/{{ post.slug }}</guid>
<description><![CDATA[{{ post.summary }}]]></description>
<content:encoded><![CDATA[{{ post.html }}]]></content:encoded> <content:encoded><![CDATA[{{ post.html }}]]></content:encoded>
<language>{{ post.lang }}</language> {%- else %}
{% if post.tags %} <description><![CDATA[{{ post.html }}]]></description>
{% for tname in post.tags %} {% endif -%}
<category domain="{{ site.url }}/tag/{{ tname|slugify }}"><![CDATA[{{ tname }}]]></category> <author>{{ site.author.email }} ({{ site.author.name }})</author>
{% endfor %} <pubDate>{{ post.published|date("%a, %d %b %Y %T %z") }}</pubDate>
{% endif %} <guid>{{ site.url }}/{{ post.slug }}</guid>
{% if post.rssenclosure %} <dc:language>{{ post.lang }}</dc:language>
<enclosure url="{{ post.rssenclosure.url }}" type="{{ post.rssenclosure.mime }}" length="{{ post.rssenclosure.size }}" /> {%- if post.tags %}{% for tname in post.tags %}
{% endif %} <category>{{ tname }}></category>
{% endfor %}{% endif -%}
{%- if post.rssenclosure %}
<enclosure
url="{{ post.rssenclosure.url }}"
type="{{ post.rssenclosure.mime }}"
length="{{ post.rssenclosure.size }}"
/>
{% endif -%}
</item> </item>
{% endfor %} {% endfor %}
</channel> </channel>

View file

@ -67,7 +67,7 @@
{% if post.summary %} {% if post.summary %}
<div class="e-summary"> <div class="e-summary">
{{ post.summary }} {{ post.sumhtml }}
<br class="clear" /> <br class="clear" />
</div> </div>
{% endif %} {% endif %}

View file

@ -1,11 +1,9 @@
* { * {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
html, body, div, span, applet, object, iframe, html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code, a, abbr, acronym, address, big, cite, code,
@ -593,6 +591,7 @@ input[type=submit]:hover {
font-size: 0.8rem; font-size: 0.8rem;
} }
.favurl img,
.adaptimg { .adaptimg {
display: block; display: block;
max-height: 98vh; max-height: 98vh;
@ -604,6 +603,38 @@ input[type=submit]:hover {
outline: 1px solid #333; outline: 1px solid #333;
} }
.favurl,
.favurl:hover {
border: none;
position: relative;
display: block;
}
.favurl img {
z-index:1;
opacity: 0.7;
}
.favurl::after,
.favurl:hover::after {
display: block;
position: absolute;
opacity: 0.6;
right: 0;
left: 0;
bottom: 1rem;
content:attr(href);
padding: 0.5rem 1rem;
font-weight: bold;
color: #fff;
background-color: #000;
}
.favurl:hover::after {
opacity: 0.8;
}
.w25, .w25,
.w33 { .w33 {
display: inline-block; display: inline-block;
@ -637,14 +668,15 @@ input[type=submit]:hover {
font-size: 0.7rem; font-size: 0.7rem;
text-align:center; text-align:center;
} }
.exif ul { .exif dt {
list-style-type: none; display: none;
visibility: hidden;
} }
.exif ul li { .exif dd {
display: inline-block; display: inline-block;
margin: 0 0.3rem; margin: 0 0.3rem;
} }
.exif ul li i { .exif dd i {
margin-right: 0.3rem; margin-right: 0.3rem;
} }
@ -912,4 +944,3 @@ input[type=submit]:hover {
} }
} }