Skip to content

Commit

Permalink
Refine granularity of tpl:Blocks in dotty template set, will simplify…
Browse files Browse the repository at this point in the history
… inheritance and overload of themes
  • Loading branch information
franck-paul committed Jun 25, 2021
1 parent 974503f commit 3647f19
Show file tree
Hide file tree
Showing 23 changed files with 946 additions and 606 deletions.
43 changes: 30 additions & 13 deletions inc/public/default-templates/dotty/404.html
Expand Up @@ -9,21 +9,38 @@
<link rel="contents" title="{{tpl:lang Archives}}" href="{{tpl:BlogArchiveURL}}" />
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" />
</tpl:Block>
<tpl:Block name="body-tag">

<tpl:Block name="body-tag">
<body class="dc-404">
</tpl:Block>

<tpl:Block name="main-content">
<header id="content-info">
<h2>{{tpl:lang Document not found}}</h2>
<p>{{tpl:lang URL you've tried has typos, or the page has been deleted or moved.}}</p>
</header>
<div class="content-inner">
<h3>{{tpl:lang Suggestions:}}</h3>
<ul>
<li><a href="{{tpl:BlogURL}}">{{tpl:lang Go to homepage}}</a></li>
<li><a href="#search">{{tpl:lang Use search form}}</a></li>
<li><a href="{{tpl:BlogURL}}archive">{{tpl:lang Explore archives}}</a></li>
</ul>
</div> <!-- # End #content-inner -->
<tpl:Block name="main-content-before"></tpl:Block>
<tpl:Block name="content-info-header">
<header id="content-info">
<tpl:Block name="content-info-header-title">
<h2>{{tpl:lang Document not found}}</h2>
</tpl:Block>
<tpl:Block name="content-info-header-content">
<p>{{tpl:lang URL you've tried has typos, or the page has been deleted or moved.}}</p>
</tpl:Block>
</header>
</tpl:Block>
<tpl:Block name="content-inner">
<tpl:Block name="content-inner-before"></tpl:Block>
<div class="content-inner">
<tpl:Block name="content-inner-header">
<h3>{{tpl:lang Suggestions:}}</h3>
</tpl:Block>
<tpl:Block name="content-inner-content">
<ul>
<li><a href="{{tpl:BlogURL}}">{{tpl:lang Go to homepage}}</a></li>
<li><a href="#search">{{tpl:lang Use search form}}</a></li>
<li><a href="{{tpl:BlogURL}}archive">{{tpl:lang Explore archives}}</a></li>
</ul>
</tpl:Block>
</div> <!-- # End #content-inner -->
<tpl:Block name="content-inner-after"></tpl:Block>
</tpl:Block>
<tpl:Block name="main-content-after"></tpl:Block>
</tpl:Block>
2 changes: 2 additions & 0 deletions inc/public/default-templates/dotty/__layout.html
Expand Up @@ -64,6 +64,7 @@
</tpl:Block>
<section id="content">
<tpl:Block name="main-content">
<tpl:Block name="main-content-before"></tpl:Block>
<tpl:Entries>
<!-- # First page -->
<tpl:SysIf current_mode="default">
Expand All @@ -83,6 +84,7 @@
{{tpl:include src="_pagination.html"}}
</tpl:EntriesFooter>
</tpl:Entries>
<tpl:Block name="main-content-after"></tpl:Block>
</tpl:Block> <!-- # main-content -->
</section> <!-- # End #content -->
</tpl:Block> <!-- # wrapper-main -->
Expand Down
10 changes: 7 additions & 3 deletions inc/public/default-templates/dotty/_audio_player.html
@@ -1,3 +1,7 @@
<audio controls preload="auto">
<source src="{{tpl:MediaURL}}">
</audio>
<tpl:Block name="_audio_player-before"></tpl:Block>
<tpl:Block name="_audio_player-content">
<audio controls preload="auto">
<source src="{{tpl:MediaURL}}">
</audio>
</tpl:Block>
<tpl:Block name="_audio_player-after"></tpl:Block>
134 changes: 78 additions & 56 deletions inc/public/default-templates/dotty/_entry-content.html
@@ -1,58 +1,80 @@
<article class="post simple" id="p{{tpl:EntryID}}" role="article" lang="{{tpl:EntryLang}}">
<header>
<h2 class="post-title">{{tpl:EntryTitle encode_html="1"}}</h2>
<div class="post-meta">
<p class="post-info">
<span class="post-author">{{tpl:lang By}} {{tpl:EntryAuthorLink}}, </span>
<span class="post-date"><time datetime="{{tpl:EntryDate iso8601="1"}}">{{tpl:EntryDate}}</time>. </span>
<span class="post-permalink"><a href="{{tpl:EntryURL}}">{{tpl:lang Permalink}}</a></span>
<tpl:EntryIf has_category="1">
<span class="post-cat"><tpl:EntryCategoriesBreadcrumb><a
href="{{tpl:CategoryURL}}">{{tpl:CategoryTitle encode_html="1"}}</a></tpl:EntryCategoriesBreadcrumb><a
href="{{tpl:EntryCategoryURL}}">{{tpl:EntryCategory encode_html="1"}}</a></span>
<tpl:Block name="_entry-content-before"></tpl:Block>
<tpl:Block name="_entry-content-main">
<article class="post simple" id="p{{tpl:EntryID}}" role="article" lang="{{tpl:EntryLang}}">
<tpl:Block name="_entry-content-header">
<header>
<tpl:Block name="_entry-content-header-title">
<h2 class="post-title">{{tpl:EntryTitle encode_html="1"}}</h2>
</tpl:Block>
<tpl:Block name="_entry-content-header-info">
<div class="post-meta">
<p class="post-info">
<span class="post-author">{{tpl:lang By}} {{tpl:EntryAuthorLink}}, </span>
<span class="post-date"><time datetime="{{tpl:EntryDate iso8601="1"}}">{{tpl:EntryDate}}</time>. </span>
<span class="post-permalink"><a href="{{tpl:EntryURL}}">{{tpl:lang Permalink}}</a></span>
<tpl:EntryIf has_category="1">
<span class="post-cat"><tpl:EntryCategoriesBreadcrumb><a
href="{{tpl:CategoryURL}}">{{tpl:CategoryTitle encode_html="1"}}</a></tpl:EntryCategoriesBreadcrumb><a
href="{{tpl:EntryCategoryURL}}">{{tpl:EntryCategory encode_html="1"}}</a></span>
</tpl:EntryIf>
</p>
<tpl:EntryTags>
<tpl:TagsHeader>
<ul class="post-tags-list">
</tpl:TagsHeader>
<li class="post-tags-item"><a href="{{tpl:TagURL}}">{{tpl:TagID}}</a></li>
<tpl:TagsFooter>
</ul>
</tpl:TagsFooter>
</tpl:EntryTags>
</div>
</tpl:Block>
</header>
</tpl:Block>
<tpl:Block name="_entry-content-behavior-before-content">
<!-- # --BEHAVIOR-- publicEntryBeforeContent -->
{{tpl:SysBehavior behavior="publicEntryBeforeContent"}}
</tpl:Block>
<tpl:Block name="_entry-content-content">
<tpl:Block name="_entry-content-content-excerpt">
<!-- # Entry with an excerpt -->
<tpl:EntryIf extended="1">
<div class="post-excerpt">{{tpl:EntryExcerpt}}</div>
</tpl:EntryIf>
</p>
<tpl:EntryTags>
<tpl:TagsHeader>
<ul class="post-tags-list">
</tpl:TagsHeader>
<li class="post-tags-item"><a href="{{tpl:TagURL}}">{{tpl:TagID}}</a></li>
<tpl:TagsFooter>
</tpl:Block>
<tpl:Block name="_entry-content-content-main">
<div class="post-content">{{tpl:EntryContent}}</div>
</tpl:Block>
</tpl:Block>
<tpl:Block name="_entry-content-behavior-after-content">
<!-- # --BEHAVIOR-- publicEntryAfterContent -->
{{tpl:SysBehavior behavior="publicEntryAfterContent"}}
</tpl:Block>
<tpl:Block name="_entry-content-attachments">
<!-- # Attachments -->
<tpl:Attachments>
<tpl:AttachmentsHeader>
<footer class="post-attachments" id="attachments">
<h3 class="post-attachments-title">{{tpl:lang Attachments}}</h3>
<ul class="post-attachments-list">
</tpl:AttachmentsHeader>
<li class="post-attachments-item {{tpl:AttachmentType}}">
<tpl:AttachmentIf is_audio="1">
{{tpl:include src="_audio_player.html"}}
</tpl:AttachmentIf>
<tpl:AttachmentIf is_video="1">
{{tpl:include src="_video_player.html"}}
</tpl:AttachmentIf>
<tpl:AttachmentIf is_audio="0" is_video="0">
<a href="{{tpl:AttachmentURL}}" title="{{tpl:AttachmentFileName}} ({{tpl:AttachmentSize}})">{{tpl:AttachmentTitle}}</a>
</tpl:AttachmentIf>
</li>
<tpl:AttachmentsFooter>
</ul>
</tpl:TagsFooter>
</tpl:EntryTags>
</div>
</header>
<!-- # --BEHAVIOR-- publicEntryBeforeContent -->
{{tpl:SysBehavior behavior="publicEntryBeforeContent"}}
<!-- # Entry with an excerpt -->
<tpl:EntryIf extended="1">
<div class="post-excerpt">{{tpl:EntryExcerpt}}</div>
</tpl:EntryIf>
<div class="post-content">{{tpl:EntryContent}}</div>
<!-- # --BEHAVIOR-- publicEntryAfterContent -->
{{tpl:SysBehavior behavior="publicEntryAfterContent"}}
<!-- # Attachments -->
<tpl:Attachments>
<tpl:AttachmentsHeader>
<footer class="post-attachments" id="attachments">
<h3 class="post-attachments-title">{{tpl:lang Attachments}}</h3>
<ul class="post-attachments-list">
</tpl:AttachmentsHeader>
<li class="post-attachments-item {{tpl:AttachmentType}}">
<tpl:AttachmentIf is_audio="1">
{{tpl:include src="_audio_player.html"}}
</tpl:AttachmentIf>
<tpl:AttachmentIf is_video="1">
{{tpl:include src="_video_player.html"}}
</tpl:AttachmentIf>
<tpl:AttachmentIf is_audio="0" is_video="0">
<a href="{{tpl:AttachmentURL}}" title="{{tpl:AttachmentFileName}} ({{tpl:AttachmentSize}})">{{tpl:AttachmentTitle}}</a>
</tpl:AttachmentIf>
</li>
<tpl:AttachmentsFooter>
</ul>
</footer>
</tpl:AttachmentsFooter>
</tpl:Attachments>
</article>
</footer>
</tpl:AttachmentsFooter>
</tpl:Attachments>
</tpl:Block>
</article>
</tpl:Block>
<tpl:Block name="_entry-content-after"></tpl:Block>

0 comments on commit 3647f19

Please sign in to comment.