Move custon theme configuration in theme

This commit is contained in:
moanos [he/him] 2023-01-24 16:39:39 +01:00
parent 7f16aff4b7
commit a52c38ad7e
4 changed files with 1 additions and 548 deletions

View File

@ -1,297 +0,0 @@
{{ define "body" }}
<body class="post-template-default single single-post single-format-standard ct-body singular singular-post not-front standard">
{{ end }}
{{ define "main" }}
{{ $scratch := newScratch }}
{{ if .Site.Params.writers }}
{{ $scratch.Set "writer" (index .Site.Params.writers (lower .Params.writer) | default dict) }}
{{ else }}
{{ $scratch.Set "writer" (.Site.Params.social | default dict) }}
{{ end }}
{{ $writer := $scratch.Get "writer" }}
<div id="loop-container" class="loop-container">
{{ if and (isset .Params "image") .Params.image }}
<div class="post type-post status-publish format-standard has-post-thumbnail hentry category-design tag-design tag-standard-2 tag-tagalicious tag-travel entry full-without-featured odd excerpt-1">
<div class='featured-image lazy lazy-bg-image' {{ if isset .Site.Params "usepostimgfolder" }} data-background="{{ .Permalink }}{{ .Params.image }}"{{ else }} data-background="{{ .Params.image | absURL }}"{{ end }}>
</div>
{{ else }}
<div class="post type-post status-publish format-standard hentry category-standard category-travel entry full-without-featured odd excerpt-1">
{{ end }}
<div class="entry-meta">
<span class="date">{{ .Date.Format "02 January" }}</span> <span> / </span>
<span class="author">
<a href="{{ $writer.link | default .Site.Params.authorlink | absURL }}" title="Posts by {{ .Params.writer | default .Site.Params.author }}" rel="author">{{ .Params.writer | default .Site.Params.author }}</a>
</span>
{{ range .Params.categories }}
<span class="category">
<span> / </span>
<a href="/categories/{{ . | urlize }}">{{ . }}</a>
</span>
{{ end }}
</div>
<div class='entry-header'>
<h1 class='entry-title'> {{ .Title }}</h1>
</div>
<div class="entry-container">
<div class="entry-content">
<article>
{{ .Content }}
</article>
</div>
<!-- <div class="sidebar sidebar-after-post-content" id="sidebar-after-post-content">
<section id="text-2" class="widget widget_text"><h2 class="widget-title">After Post Content Widget</h2> <div class="textwidget"><p>This is a widget in the "After Post Content" widget area. It's a great place to include related posts or an email optin form.</p>
</div>
</section> </div>-->
<div class='entry-meta-bottom'>
<!--<nav class="further-reading">
<p class="prev">
<span>Previous Post</span>
<a href="https://www.competethemes.com/tracks-live-demo/another-awesome-post/">Another Awesome Post</a>
</p>
<p class="next">
<span>No Newer Posts</span>
<a href="https://www.competethemes.com/tracks-live-demo">Return to Blog</a>
</p>
</nav>-->
<div class="entry-categories"><p><span>Categories</span>
{{ range $index, $name := .Params.categories }}
<a href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}" title="View all posts in {{ $name }}">{{ $name }}</a>{{ end }}
</p>
</div>
<div class="entry-tags"><p><span>Tags</span>
{{ range $index, $name := .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="View all posts tagged {{ $name }}">{{ $name }}</a>
{{ end }}
</p></div> </div>
{{ if and (isset .Site.Params "author") .Site.Params.author }}
<div class="author-meta">
<div class="author">
{{ if and (isset .Params "writer") $writer.email }}
<img alt='{{ .Params.writer | default .Site.Params.author }}' src="https://www.gravatar.com/avatar/{{ md5 $writer.email }}?s=100&d=identicon" class='avatar avatar-72 photo' height='72' width='72'>
{{ else }}
<img alt='{{ .Params.writer | default .Site.Params.author }}' src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.email }}?s=100&d=identicon" class='avatar avatar-72 photo' height='72' width='72'>
{{ end }}
<span>
Written by:<a href="{{ $writer.link | default .Site.Params.authorlink | absURL}}" title="Posts by {{ .Params.writer | default .Site.Params.author }}" rel="author">{{ .Params.writer | default .Site.Params.author }}</a> </span>
</div>
<div class="bio">
{{ if and (isset .Params "writer") $writer.bio }}
{{ range $writer.bio }}
<p>{{ . | default "" | safeHTML }}</p>
{{ end }}
{{ else }}
{{ range .Site.Params.bio }}
<p>{{ . | default "" | safeHTML }}</p>
{{ end }}
{{ end }}
{{ if isset .Params "writer" }}
{{ with $writer.facebook }}
<a class="facebook" target="_blank"
href="{{ . }}">
<i class="fab fa-facebook-f"
title="facebook icon"></i>
</a>
{{end}}
{{ with $writer.googleplus }}
<a class="googleplus" target="_blank"
href="{{ . }}">
<i class="fab fa-google-plus-g"
title="googleplus icon"></i>
</a>
{{end}}
{{ with $writer.twitter }}
<a class="twitter" target="_blank"
href="{{ . }}">
<i class="fab fa-twitter-square"
title="twitter icon"></i>
</a>
{{end}}
{{ with $writer.linkedin }}
<a class="linkedin" target="_blank"
href="{{ . }}">
<i class="fab fa-linkedin"
title="linkedin icon"></i>
</a>
{{end}}
{{ with $writer.email }}
<a class="email" target="_blank"
href="mailto:{{ . }}">
<i class="fas fa-envelope"
title="email icon"></i>
</a>
{{end}}
{{ with $writer.instagram }}
<a class="instagram" target="_blank"
href="{{ . }}">
<i class="fab fa-instagram"
title="instagram icon"></i>
</a>
{{end}}
{{ with $writer.stackoverflow }}
<a class="stackoverflow" target="_blank"
href="{{ . }}">
<i class="fab fa-stack-overflow"
title="stackoverflow icon"></i>
</a>
{{end}}
{{ with $writer.github }}
<a class="github" target="_blank"
href="{{ . }}">
<i class="fab fa-github"
title="github icon"></i>
</a>
{{end}}
{{ with $writer.mastodon }}
<a class="mastodon" target="_blank"
href="{{ . }}">
<i class="fab fa-mastodon"
title="mastodon icon"></i>
</a>
{{end}}
{{ else }}
{{ with .Site.Params.social.facebook }}
<a class="facebook" target="_blank"
href="{{ . }}">
<i class="fab fa-facebook-f"
title="facebook icon"></i>
</a>
{{end}}
{{ with .Site.Params.social.googleplus }}
<a class="googleplus" target="_blank"
href="{{ . }}">
<i class="fab fa-google-plus-g"
title="googleplus icon"></i>
</a>
{{end}}
{{ with .Site.Params.social.twitter }}
<a class="twitter" target="_blank"
href="{{ . }}">
<i class="fab fa-twitter-square"
title="twitter icon"></i>
</a>
{{end}}
{{ with .Site.Params.social.linkedin }}
<a class="linkedin" target="_blank"
href="{{ . }}">
<i class="fab fa-linkedin"
title="linkedin icon"></i>
</a>
{{end}}
{{ with .Site.Params.social.email }}
<a class="email" target="_blank"
href="mailto:{{ . }}">
<i class="fas fa-envelope"
title="email icon"></i>
</a>
{{end}}
{{ with .Site.Params.social.instagram }}
<a class="instagram" target="_blank"
href="{{ . }}">
<i class="fab fa-instagram"
title="instagram icon"></i>
</a>
{{end}}
{{ with .Site.Params.social.stackoverflow }}
<a class="stackoverflow" target="_blank"
href="{{ . }}">
<i class="fab fa-stack-overflow"
title="stackoverflow icon"></i>
</a>
{{end}}
{{ with .Site.Params.social.github }}
<a class="github" target="_blank"
href="{{ . }}">
<i class="fab fa-github"
title="github icon"></i>
</a>
{{end}}
{{ with .Site.Params.social.mastodon }}
<a class="mastodon" target="_blank"
href="{{ . }}">
<i class="fab fa-mastodon"
title="mastodon icon"></i>
</a>
{{end}}
{{ end }}
</div>
</div>
{{ end }}
</div>
</div>
<section id="comments" class="comments">
{{ template "_internal/disqus.html" . }}
<!--<div class="comments-number">
<h2>
4 Comments </h2>
</div>-->
<!--
<ol class="comment-list">
<li class="comment even thread-even depth-1" id="li-comment-54">
<article id="comment-54" class="comment">
<div class="comment-author">
<img alt='' src='https://secure.gravatar.com/avatar/39f7e57ccd31847dc1a4bfb2ee1cd596?s=72&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/39f7e57ccd31847dc1a4bfb2ee1cd596?s=144&#038;d=mm&#038;r=g 2x' class='avatar avatar-72 photo' height='72' width='72' /> <div>
<div class="author-name"><a href='http://commenter.url' rel='external nofollow' class='url'>Commenter 2799</a></div>
<div class="comment-date">April 18</div>
<a rel='nofollow' class='comment-reply-link' href='https://www.competethemes.com/tracks-live-demo/this-is-a-standard-post/?replytocom=54#respond' onclick='return addComment.moveForm( "comment-54", "54", "respond", "1969" )' aria-label='Reply to Commenter 2799'>Reply</a> </div>
</div>
<div class="comment-content">
<p>sque lacus. Etiam consectetur rutrum justo.</p>
<p>Duis facilisis. Aliquam sagittis. Proin consectetur egestas metus. Curabitur pellentesque posuere arcu. Integer lorem nulla, congue a, rhoncus nec, vestibulum a, ante. Mauris lobortis iaculis erat. Maecenas faucibus tincidunt dui. Cras accumsan vestibulum ligula. Morbi dapibus, lorem nec euismod pharetra, augue risus congue augue, molestie eleifend lacus magna nec magna. Mo</p>
</div>
</article>
</li>
</ol>-->
</section>
</div>
<!--</div>--> <!-- .main -->
{{ end }}

View File

@ -1,132 +0,0 @@
<footer id="site-footer" class="site-footer" role="contentinfo">
<h1>
{{ with .Site.Title }}
<a href=""> {{ . }} </a>
{{ end }}
</h1>
{{ with .Site.Params.Slogan }}
<p class="site-description">{{ . | default "" | safeHTML }}</p>
{{ end }}
<div id="menu-footer" class="menu-container menu-footer" role="navigation">
<div class="menu">
<ul id="menu-footer-items" class="menu-footer-items">
{{ range $name, $taxonomy := .Site.Params.Navlinks }}
<li id="menu-item" class="menu-item menu-item-type-post_type menu-item-object-page menu-item"><a href="/{{ $taxonomy.url | urlize }}">{{ $taxonomy.name }}</a></li>
{{ end }}
</ul>
</div> </div>
<ul class="social-media-icons">
{{ with .Site.Params.social.facebook }}
<li>
<a class="facebook" target="_blank"
href="{{ . }}" >
<i class="fab fa-facebook-f" title="facebook"></i>
<span class="screen-reader-text">facebook</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.googleplus }}
<li>
<a class="googleplus" target="_blank"
href="{{ . }}" >
<i class="fab fa-google-plus-g" title="googleplus"></i>
<span class="screen-reader-text">googleplus</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.twitter }}
<li>
<a href="{{ . }}" class="twitter" target="_blank">
<i class="fab fa-twitter-square" title="twitter"></i>
<span class="screen-reader-text">twitter</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.instagram }}
<li>
<a href="{{ . }}" class="instagram" target="_blank">
<i class="fab fa-instagram" title="instagram"></i>
<span class="screen-reader-text">instagram</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.email }}
<li>
<a href="mailto:{{ . }}" class="email">
<i class="fas fa-envelope" title="email"></i>
<span class="screen-reader-text">email</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.linkedin }}
<li>
<a href="{{ . }}" class="linkedin" target="_blank">
<i class="fab fa-linkedin-in" title="linkedin"></i>
<span class="screen-reader-text">linkedin</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.stackoverflow }}
<li>
<a href="{{ . }}" class="stackoverflow" target="_blank">
<i class="fab fa-stack-overflow" title="stackoverflow"></i>
<span class="screen-reader-text">stackoverflow</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.github }}
<li>
<a href="{{ . }}" class="github" target="_blank">
<i class="fab fa-github" title="github"></i>
<span class="screen-reader-text">github</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.mastodon }}
<li>
<a href="{{ . }}" class="mastodon" target="_blank">
<i class="fab fa-mastodon" title="mastodon"></i>
<span class="screen-reader-text">mastodon</span>
</a>
</li>
{{end}}
{{ if .Site.Params.social.rss }}
<li>
<a href="{{ .Site.RSSLink }}" data-animate-hover="pulse" class="rss" target="_blank">
<i class="fas fa-rss" title="rss"></i>
<span class="screen-reader-text">rss</span>
</a>
</li>
{{end}}
</ul> <div class="design-credit">
{{ range .Site.Params.copyright }}
<p>{{ . | markdownify | safeHTML }}</p>
{{ else }}
<p>
Nederburg Hugo Theme by <a target="_blank" href="https://appernetic.io">Appernetic</a>.
</p>
<p>
A port of Tracks by Compete Themes.
</p>
{{ end }}
</div>
</footer>

View File

@ -1,118 +0,0 @@
<div class='container'>
<div id="menu-secondary" class="menu-container menu-secondary" role="navigation">
<button id="toggle-secondary-navigation" class="toggle-secondary-navigation"><i class="fas fa-plus"></i></button>
<div class="menu">
<ul id="menu-secondary-items" class="menu-secondary-items">
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}">{{ $name }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
<ul class="social-media-icons">
{{ with .Site.Params.social.facebook }}
<li>
<a href="{{ . }}" data-animate-hover="pulse" class="facebook" target="_blank">
<i class="fab fa-facebook-square" title="facebook"></i>
<span class="screen-reader-text">facebook</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.googleplus }}
<li>
<a href="{{ . }}" data-animate-hover="pulse" class="gplus" target="_blank">
<i class="fab fa-google-plus-g" title="googleplus"></i>
<span class="screen-reader-text">googleplus</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.twitter }}
<li>
<a href="{{ . }}" data-animate-hover="pulse" class="twitter" target="_blank">
<i class="fab fa-twitter-square" title="twitter"></i>
<span class="screen-reader-text">twitter</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.instagram }}
<li>
<a href="{{ . }}" data-animate-hover="pulse" class="instagram" target="_blank">
<i class="fab fa-instagram" title="instagram"></i>
<span class="screen-reader-text">instagram</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.email }}
<li>
<a href="mailto:{{ . }}" data-animate-hover="pulse" class="email">
<i class="fas fa-envelope" title="email"></i>
<span class="screen-reader-text">email</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.linkedin }}
<li>
<a href="{{ . }}" data-animate-hover="pulse" class="linkedin" target="_blank">
<i class="fab fa-linkedin-in" title="linkedin"></i>
<span class="screen-reader-text">linkedin</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.stackoverflow }}
<li>
<a href="{{ . }}" data-animate-hover="pulse" class="stackoverflow" target="_blank">
<i class="fab fa-stack-overflow" title="stackoverflow"></i>
<span class="screen-reader-text">stackoverflow</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.github }}
<li>
<a href="{{ . }}" data-animate-hover="pulse" class="github" target="_blank">
<i class="fab fa-github" title="github"></i>
<span class="screen-reader-text">github</span>
</a>
</li>
{{end}}
{{ with .Site.Params.social.mastodon }}
<li>
<a href="{{ . }}" data-animate-hover="pulse" class="mastodon" target="_blank">
<i class="fab fa-mastodon" title="mastodon"></i>
<span class="screen-reader-text">mastodon</span>
</a>
</li>
{{end}}
{{ if .Site.Params.social.rss }}
<li>
<a href="{{ .Site.RSSLink }}" data-animate-hover="pulse" class="rss" target="_blank">
<i class="fas fa-rss" title="rss"></i>
<span class="screen-reader-text">rss</span>
</a>
</li>
{{end}}
</ul></div>

@ -1 +1 @@
Subproject commit d99760bac630af13aaba1f3e66107328c2fa7991
Subproject commit 7c96b8f42b4d86c28d3b50cb473297b6f278a341