relative urls, step 1

This commit is contained in:
Peter Molnar 2017-08-17 11:33:54 +00:00
parent e9899b3e33
commit 49d80eda95
9 changed files with 165 additions and 182 deletions

View file

@ -20,7 +20,7 @@
<meta property="og:site_name" content="{{ site.name }}" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:type" content="website" />
<meta name="og:updated_time" content="{{ posts[0].published|date("c") }}" />
<meta name="og:updated_time" content="{{ posts[0].published|date('c') }}" />
<meta property="og:url" content="{{ turl }}" />
<meta property="og:image" content="{{ site.url }}/favicon.png"/>
@ -88,7 +88,7 @@
{% include 'block_reaction.html' %}
{% elif post.title|length %}
<h2>
<a href="{{ site.url }}/{{ post.slug }}" title="{{ post.title }}">
<a href="/{{ post.slug }}" title="{{ post.title }}">
<span class="p-name entry-title">
{{ post.title }}
</span>
@ -98,7 +98,7 @@
<aside class="pubdate{% if post.bookmark or post.repost %} hide{% endif %}">
<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="/{{ post.slug }}">
<time class="dt-published" datetime="{{ post.published|date('c') }}">
{{ post.published|date('%Y-%m-%d %H:%M') }}
</time>
@ -111,7 +111,7 @@
<div class="e-summary entry-summary">
{{ post.sumhtml }}
<span class="more">
<a href="{{ site.url }}/{{ post.slug }}" title="{{ post.title }}"></a>
<a href="/{{ post.slug }}" title="{{ post.title }}"></a>
</span>
<br class="clear" />
</div>
@ -121,11 +121,18 @@
{% include 'block_photo.html' %}
{% endif %}
{% if ( post.exif ) %}
{% include 'block_exif.html' %}
{% endif %}
{{ post.html }}
</div>
{% endif %}
<footer class="hide">
{% include 'block_author.html' %}
</footer>
</article>
@ -140,10 +147,10 @@
{% if taxonomy.paged > 1 %}
{% set prev = taxonomy.paged - 1 %}
<li>
<a rel="prev" href="{{ site.url}}{{ taxonomy.url }}page/{{ prev }}">«</a>
<a rel="prev" href="{{ taxonomy.url }}page/{{ prev }}">«</a>
</li>
<li>
<a rel="prev" href="{{ site.url}}{{ taxonomy.url }}">1</a>
<a rel="prev" href="{{ taxonomy.url }}">1</a>
</li>
{% endif %}
@ -156,7 +163,7 @@
{% if ( taxonomy.paged - 1 > 1 ) %}
<li>
<a href="{{ site.url}}{{ taxonomy.url }}page/{{ taxonomy.paged - 1 }}">{{ taxonomy.paged - 1 }}</a>
<a href="{{ taxonomy.url }}page/{{ taxonomy.paged - 1 }}">{{ taxonomy.paged - 1 }}</a>
</li>
{% endif %}
@ -168,7 +175,7 @@
{% if ( taxonomy.paged + 1 <= taxonomy.total -1 ) %}
<li>
<a href="{{ site.url}}{{ taxonomy.url }}page/{{ taxonomy.paged + 1 }}">{{ taxonomy.paged + 1 }}</a>
<a href="{{ taxonomy.url }}page/{{ taxonomy.paged + 1 }}">{{ taxonomy.paged + 1 }}</a>
</li>
{% endif %}
@ -182,14 +189,14 @@
{% if taxonomy.paged != taxonomy.total %}
<li>
<a href="{{ site.url}}{{ taxonomy.url }}page/{{ taxonomy.total }}">{{ taxonomy.total }}</a>
<a href="{{ taxonomy.url }}page/{{ taxonomy.total }}">{{ taxonomy.total }}</a>
</li>
{% endif %}
{% if taxonomy.paged < taxonomy.total %}
{% set next = taxonomy.paged + 1 %}
<li>
<a rel="next" href="{{ site.url}}{{ taxonomy.url }}page/{{ next }}">»</a>
<a rel="next" href="{{ taxonomy.url }}page/{{ next }}">»</a>
</li>
{% endif %}
</ul>

View file

@ -1,67 +0,0 @@
<section class="comments h-feed">
{% if post.replies|length > 0 %}
<h6 class="comments-replies"><a name="replies"></a>Replies</h6>
<ol>
{% for reply in post.replies %}
<li class="h-entry p-comment">
<a class="u-url u-uuid" href="{{ site.url }}/{{ site.commentspath }}/{{ reply.fname }}/" name="{{ reply.fname }}"></a>
<header>
<p class="p-author h-card">
{% if reply.author.url %}
<a class="url u-url" href="{{ reply.author.url }}">
<span class="p-name fn">{{ reply.author.name }}</span>
</a>
{% else %}
<span class="p-name fn">{{ reply.author.name }}</span>
{% endif %}
</p>
<p>
<time class="dt-published" datetime="{{ reply.published|date('c') }}">
{{ reply.published|date('%Y-%m-%d %H:%M') }}
</time>
{% if reply.source|length > 0 %}
<a href="{{ reply.source }}" class="u-repost-of">{{ reply.source }}</a>
{% endif %}
</p>
</header>
<div class="e-content">
{{ reply.html }}
</div>
</li>
{% endfor %}
</ol>
{% endif %}
{% if post.reacjis|length > 0 %}
<h6 class="comments-reacji"><a name="reacji"></a>Reactions</h6>
<dl>
{% for reacji, replies in post.reacjis.items() %}
<dt><a name="{{ reacji }}"></a>{{ reacji }}</dt>
<dd>
<ul>
{% for reply in replies %}
<li class="p-comment h-entry ">
<a class="u-url u-uuid" href="{{ site.url }}/{{ site.commentspath }}/{{ reply.fname }}/" name="{{ reply.fname }}"></a>
<time class="dt-published" datetime="{{ reply.published|date('c') }}">
{{ reply.published|date('%Y-%m-%d %H:%M') }}
</time>
<span class="p-author h-card">
{% if reply.author.url %}
<a class="url u-url" href="{{ reply.author.url }}">
<span class="p-name fn">{{ reply.author.name }}</span>
</a>
{% else %}
<span class="p-name fn">{{ reply.author.name }}</span>
{% endif %}
</span>
<a href="{{ reply.source }}" class="u-repost-of" title="{{ reply.source }}">
<svg class="icon"><use xlink:href="#icon-link" /></svg>
</a>
</li>
{% endfor %}
</ul>
</dd>
{% endfor %}
</dl>
{% endif %}
</section>

View file

@ -2,12 +2,12 @@
<footer class="content-footer" id="main-footer">
<div class="limit">
<nav class="footer-contact p-author h-card vcard">
<img class="photo avatar u-photo u-avatar" src="{{ site.url }}/{{ site.author.avatar }}" alt="Photo of {{ site.author.name }}" />
<img class="photo avatar u-photo u-avatar" src="{{ site.author.avatar }}" alt="Photo of {{ site.author.name }}" />
<dl>
<dt>name</dt>
<dd>
<a class="fn p-name url u-url u-uid" href="{{ site.author.url }}">{{ site.author.name }}</a>
<a class="fn p-name url u-url u-uid" href="{{ site.author.url }}/about">{{ site.author.name }}</a>
</dd>
<dt>email</dt>
<dd>
@ -26,14 +26,15 @@
<a rel="me" class="u-{{ silo }} url u-url" href="{{ url }}">{{ silo }}</a>
</dd>
{% endfor %}
<dt>copyright notes</dt>
<dd>
<a rel="license" href="{{ site.url }}/licence" title="Licence"><span class="icon">©</span> copyright notes</a>
</dd>
<dt>RSS feed</dt>
<dt>Feed</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-rss" /></svg>
<a title="RSS feed" href="{{ site.url }}/feed/">RSS</a>
<a title="Feed" href="{{ site.url }}/feed/">Feed</a>
</dd>
<dt>CV</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-note" /></svg>
<a class="u-url u-resume" href="{{ site.author.url }}/cv">CV</a>
</dd>
<dt>Donation</dt>
<dd>

View file

@ -10,45 +10,45 @@
<nav class="content-navigation">
<ul>
<li>
<a title="home" href="{{ site.url }}/" class="{% if ( not post or post.url == '' ) and ( taxonomy.name == '' ) %} active{% endif %}">
<a title="home" href="/" class="{% if ( not post or post.url == '' ) and ( taxonomy.name == '' ) %} active{% endif %}">
<svg class="icon"><use xlink:href="#icon-home" /></svg>
home
</a>
</li>
<li>
<a title="photos" href="{{ site.url }}/category/photo/" class="{% if (post and post.category == 'photo' ) or ( taxonomy.slug == 'photo' ) %} active{% endif %}">
<a title="photos" href="/category/photo/" class="{% if (post and post.category == 'photo' ) or ( taxonomy.slug == 'photo' ) %} active{% endif %}">
<svg class="icon"><use xlink:href="#icon-photo" /></svg>
photos
</a>
</li>
<li>
<a title="journal" href="{{ site.url }}/category/journal/" class="{% if ( post and post.category == 'journal' ) or ( post and 'journal' in post.tags ) or ( taxonomy.slug == 'journal' ) %} active{% endif %}">
<a title="journal" href="/category/journal/" class="{% if ( post and post.category == 'journal' ) or ( post and 'journal' in post.tags ) or ( taxonomy.slug == 'journal' ) %} active{% endif %}">
<svg class="icon"><use xlink:href="#icon-journal" /></svg>
journal
</a>
</li>
<li>
<a title="IT" href="{{ site.url }}/category/article/" class="{% if ( post and post.category == 'article' ) or ( post and 'IT' in post.tags ) or ( ( taxonomy.slug == 'article' ) or ( taxonomy.slug == 'it' ) ) %} active{% endif %}">
<a title="IT" href="/category/article/" class="{% if ( post and post.category == 'article' ) or ( post and 'IT' in post.tags ) or ( ( taxonomy.slug == 'article' ) or ( taxonomy.slug == 'it' ) ) %} active{% endif %}">
<svg class="icon"><use xlink:href="#icon-article" /></svg>
IT
</a>
</li>
<li>
<a title="notes" href="{{ site.url }}/category/note/" class="{% if ( post and 'Note' in post.tags ) or ( taxonomy.slug == 'note' ) %} active{% endif %}">
<a title="notes" href="/category/note/" class="{% if ( post and 'Note' in post.tags ) or ( taxonomy.slug == 'note' ) %} active{% endif %}">
<svg class="icon"><use xlink:href="#icon-note" /></svg>
notes
</a>
</li>
{#
<li>
<a title="replies" href="{{ site.url }}/category/reply/" class="{% if ( post and 'Reply' in post.tags ) or ( taxonomy.slug == 'reply' ) %} active{% endif %}">
<a title="replies" href="/category/reply/" class="{% if ( post and 'Reply' in post.tags ) or ( taxonomy.slug == 'reply' ) %} active{% endif %}">
<svg class="icon"><use xlink:href="#icon-reply" /></svg>
re:
</a>
</li>
#}
<li>
<a title="bookmarks" href="{{ site.url }}/category/bookmark/" class="{% if ( post and post.category == 'bookmark' ) or ( post and 'Bookmark' in post.tags ) or ( taxonomy.slug == 'bookmark' ) %} active{% endif %}">
<a title="bookmarks" href="/category/bookmark/" class="{% if ( post and post.category == 'bookmark' ) or ( post and 'Bookmark' in post.tags ) or ( taxonomy.slug == 'bookmark' ) %} active{% endif %}">
<svg class="icon"><use xlink:href="#icon-bookmark" /></svg>
bookmarks
</a>

View file

@ -4,51 +4,4 @@
<img src="{{ post.photo.fallback }}" title="{{ post.photo.title }}" alt="{{ post.photo.alt }}" class="adaptimg" />
</a>
</p>
<aside class="exif">
<dl>
{% if post.exif.camera %}
<dt>Camera</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-camera" /></svg>
{{ post.exif.camera }}
</dd>
{% endif %}
{% if post.exif.aperture %}
<dt>Aperture</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-aperture" /></svg>
f/{{ post.exif.aperture }}
</dd>
{% endif %}
{% if post.exif.shutter_speed %}
<dt>Shutter speed</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-clock" /></svg>
{{ post.exif.shutter_speed }} sec
</dd>
{% endif %}
{% if post.exif.focal_length %}
<dt>Focal length (as set)</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-focallength" /></svg>
{{ post.exif.focal_length }}{% if not post.exif.focal_length|search( 'mm' ) %} mm{% endif %}
</dd>
{% endif %}
{% if post.exif.iso %}
<dt>Sensitivity</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-sensitivity" /></svg>
ISO {{ post.exif.iso }}
</dd>
{% endif %}
{% if post.exif.lens %}
<dt>Lens</dt>
<dd>
<svg class="icon"><use xlink:href="#icon-lens" /></svg>
{{ post.exif.lens }}
</dd>
{% endif %}
</dl>
</aside>
</section>

View file

@ -1,5 +0,0 @@
<aside class="syndicate hide">
{% for url in post.syndicate %}
<a href="{{ url }}" class="u-syndication"></a>
{% endfor %}
</aside>

View file

@ -6,7 +6,7 @@
{% include 'block_header_open.html' %}
{% if post.title %}
<title>{{ post.title }} | {{ site.domain }}</title>
<title>{{ post.title|e }} | {{ site.domain }}</title>
{% else %}
<title>{{ post.slug }} | {{ site.domain }}</title>
{% endif %}
@ -16,9 +16,9 @@
<meta name="author" content="{{ post.author.name }}">
<meta name="keywords" content="{{ post.tags|join(',') }}">
<meta name="description" content="{{ post.excerpt|default(post.title) }}">
<meta name="description" content="{{ post.summary|e }}">
<meta property="og:description" content="{{ post.excerpt|striptags }}" />
<meta property="og:description" content="{{ post.summary|e }}" />
<meta property="og:locale" content="{{ post.lang|default(site.lang) }}" />
<meta property="og:site_name" content="{{ site.name }}" />
<meta property="og:title" content="{{ post.title }}" />
@ -26,28 +26,30 @@
{% if post.modified %}<meta name="og:updated_time" content="{{ post.modified|date("c") }}" />{%endif%}
<meta property="og:url" content="{{ site.url }}/{{ post.shortslug }}/" />
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" >
<meta name="DC.Format" content="text/html" />
<meta name="DC.Title" content="{{ post.title }}">
<meta name="DC.Title" content="{{ post.title|e }}">
<meta name="DC.Creator" content="{{ post.author.name }}">
<meta name="DC.Description" content="{{ post.excerpt|default(post.title) }}">
<meta name="DC.Description" content="{{ post.summary|e }}">
<meta name="DC.Date" content="{{ post.published|date("%Y-%m-%d") }}">
<meta name="DC.Type" content="{{ dctype }}">
<meta name="DC.Identifier" content="{{ site.url }}/{{ post.slug }}/">
<meta name="DC.Source" content="{{ site.url }}/{{ post.slug }}/">
<meta name="DC.Language" content="{{ post.lang|default(site.lang) }}">
<meta name="DC.Rights" content="Copyright {{ post.published|date("%Y") }}, {{ post.author.name }} <{{ post.author.email }}>. All rights reserved.">
<link rel="license" href="{{ post.license.url }}" />
<meta name="DC.Rights" content="{{ post.license.text }} by {{ post.author.name }}">
{% include 'block_header_close.html' %}
<section class="content-body">
<article class="h-entry hentry singular"{% if post and post.lang %} lang="{{ post.lang }}"{% endif %}>
<header>
<p class="hide"><a class="u-url u-uuid" rel="bookmark" href="{{ site.url}}/{{ post.slug }}/"></a></p>
{% if post.reactions %}
<h1 class="reaction">{% include 'block_reaction.html' %}</h1>
{% elif post.title|length %}
<h1>
<a href="{{ site.url }}/{{ post.slug }}/" title="{{ post.title }}">
<a href="/{{ post.slug }}/" title="{{ post.title }}">
<span class="entry-title p-name">{{ post.title }}</span>
</a>
</h1>
@ -75,23 +77,27 @@
<div class="e-content entry-content">
<div class="content-inner">
{% if ( post.photo ) %}
{% include 'block_photo.html' %}
{% endif %}
{% if ( post.photo ) %}
{% include 'block_photo.html' %}
{% endif %}
{% if ( post.exif ) %}
{% include 'block_exif.html' %}
{% endif %}
{{ post.html }}
{% if ( post.syndicate ) %}
{% include 'block_syndicate.html' %}
<aside class="syndicate hide">
{% for url in post.syndicate %}
<a href="{{ url }}" class="u-syndication"></a>
{% endfor %}
</aside>
{% endif %}
</div>
</div>
{% if ( post.comments ) %}
{% include 'block_comments.html' %}
{% endif %}
<footer>
<p class="published">
<time class="dt-published"
@ -110,25 +116,108 @@
{% if post.tags %}
<p class="tags">
{% for tname in post.tags %}
#<a href="{{ site.url }}/tag/{{ tname|slugify }}" rel="tag" class="p-category">{{ tname }}</a>
#<a href="/tag/{{ tname|slugify }}" rel="tag" class="p-category">{{ tname }}</a>
{% endfor %}
</p>
{% endif %}
<p class="shorturl">
<a href="{{ site.url }}/{{ post.shortslug }}">{{ site.url }}/{{ post.shortslug }}</a>
<a href="/{{ post.shortslug }}">{{ site.url }}/{{ post.shortslug }}</a>
</p>
{% include 'block_author.html' %}
<p class="hide">
<a class="u-url u-uuid" rel="bookmark" href="{{ site.url}}/{{ post.slug }}/"></a>
</p>
</footer>
{% if ( post.comments ) %}
<section class="comments h-feed">
{% if post.replies|length > 0 %}
<h6 class="comments-replies"><a name="replies"></a>Replies</h6>
<ol>
{% for reply in post.replies %}
<li class="h-entry p-comment">
<a class="u-url u-uuid" href="{{ site.url }}/{{ site.commentspath }}/{{ reply.fname }}/" name="{{ reply.fname }}"></a>
<header>
<p class="p-author h-card">
{% if reply.author.url %}
<a class="url u-url" href="{{ reply.author.url }}">
<span class="p-name fn">{{ reply.author.name }}</span>
</a>
{% else %}
<span class="p-name fn">{{ reply.author.name }}</span>
{% endif %}
</p>
<p>
<time class="dt-published" datetime="{{ reply.published|date('c') }}">
{{ reply.published|date('%Y-%m-%d %H:%M') }}
</time>
{% if reply.source|length > 0 %}
<a href="{{ reply.source }}" class="u-repost-of">{{ reply.source }}</a>
{% endif %}
</p>
</header>
<div class="e-content">
{{ reply.html }}
</div>
</li>
{% endfor %}
</ol>
{% endif %}
{% if post.reacjis|length > 0 %}
<h6 class="comments-reacji"><a name="reacji"></a>Reactions</h6>
<dl>
{% for reacji, replies in post.reacjis.items() %}
<dt><a name="{{ reacji }}"></a>{{ reacji }}</dt>
<dd>
<ul>
{% for reply in replies %}
<li class="p-comment h-entry ">
<a class="u-url u-uuid" href="/{{ site.commentspath }}/{{ reply.fname }}/" name="{{ reply.fname }}"></a>
<time class="dt-published" datetime="{{ reply.published|date('c') }}">
{{ reply.published|date('%Y-%m-%d %H:%M') }}
</time>
<span class="p-author h-card">
{% if reply.author.url %}
<a class="url u-url" href="{{ reply.author.url }}">
<span class="p-name fn">{{ reply.author.name }}</span>
</a>
{% else %}
<span class="p-name fn">{{ reply.author.name }}</span>
{% endif %}
</span>
<a href="{{ reply.source }}" class="u-repost-of" title="{{ reply.source }}">
<svg class="icon"><use xlink:href="#icon-link" /></svg>
</a>
</li>
{% endfor %}
</ul>
</dd>
{% endfor %}
</dl>
{% endif %}
</section>
{% endif %}
</article>
<aside class="content-note">
<hr />
<p class="license">
<a rel="license" href="{{ post.license.url }}" class="hide u-license">{{ post.license.text }}</a>
<svg class="icon"><use xlink:href="#icon-creative-commons" /></svg>
{{ post.license.description }}
</p>
<p>Want to leave a comment or get in touch? Reply with your own blog using
<a href="http://indiewebcamp.com/webmention">Webmentions</a> or send an
<a href="mailto:{{ post.author.email }}?subject=RE: {{ post.title }}"
>email</a>.
</p>
</aside>
</section>

View file

@ -1,5 +1,4 @@
* {
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
@ -92,6 +91,15 @@ table {
border-spacing: 0;
}
td, th {
padding: 0.3rem;
border: 1px solid #333;
}
th {
font-weight: bold;
}
hr {
display: block;
height: 1px;
@ -152,19 +160,25 @@ h3 {
opacity: 0.8;
}
.h-entry footer p {
padding: 0.3rem 0;
}
.h-entry footer .vcard img {
height: 1rem;
vertical-align: text-bottom;
}
.published, .updated {
display: inline;
}
.shorturl,
.tags {
padding: 0.3rem 0;
}
.content-note a,
.e-content a {
color:#115394;
}
.content-note a:hover,
.e-content a:hover {
color:#004283;
}
@ -431,7 +445,6 @@ input[type=submit]:hover {
border-bottom: 3px solid #fefefe;
}
/* above is mobile first; this is the desktop */
@media all and (min-width: 50rem) {
.content-navigation ul li a {
@ -565,7 +578,7 @@ time {
}
.comments ol .u-repost-of:before {
content: '';
content: '\2022';
margin: 0 0.3rem;
}
@ -666,7 +679,6 @@ time {
font-size: 0.9rem;
}
@media print {
* {
background-color: #fff !important;
@ -718,6 +730,7 @@ time {
page-break-inside: avoid !important;
}
.e-content .adaptive img {
page-break-inside: avoid !important;
max-width: 100%;
@ -749,4 +762,3 @@ time {
line-height: 1rem;
}
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 14 KiB