Cleaning scripts

This commit is contained in:
Fundor333
2025-08-28 00:42:01 +02:00
parent 3eabb3f99d
commit 935089abac
17 changed files with 657 additions and 344 deletions

View File

@@ -44,7 +44,7 @@
"date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
"date_modified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
"id": "{{ .Permalink }}",
"url": "{{ .Permalink }}?utm_source=fundor333.com&utm_medium=jsonfeed&utm_campaign=blogging&ref=fundor333feed.com",
"url": "{{ .Permalink }}",
{{ with .Params.author -}}
"authors": [
{

View File

@@ -1,10 +1,9 @@
<script src="/js/jquery-3.7.1.min.js"></script>
<meta name="fediverse:creator" content="@fundor333@mastodon.social">
<link rel="webmention" href="https://webmention.io/fundor333.com/webmention" />
<link rel="pingback" href="https://webmention.io/fundor333.com/xmlrpc" />
<link rel="stylesheet" href="/css/webmention.css" />
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
<script src="https://kit.fontawesome.com/2f3b6e2e4c.js" crossorigin="anonymous"></script>

View File

@@ -1,27 +1,26 @@
<footer class="footer wrapper">
<span class="footer_item"> </span>
{{ partial "hcard" . }}
<span class="footer_item"> </span>
{{ partial "hcard" . }}
<div class="footer_social-icons flex">
{{- partial "socialIcons.html" site.Params.socialIcons -}}
<p class="flex justify-center">
<a href='https://webring.xxiivv.com/#random' target='_blank'>
<img loading="lazy" width=" 30" height="30" src='https://webring.xxiivv.com/icon.white.svg' />
</a>
</p>
<p>
<a href="https://xn--sr8hvo.ws/previous"></a>
<a href="https://xn--sr8hvo.ws">IndieWeb Webring</a>
<a href="https://xn--sr8hvo.ws/next"></a>
</p>
<div class="webring">
<webring-css site="https://fundor333.com"></webring-css>
<script src="https://djangowebring.com/static/webring.js"></script>
</div>
</div>
<small class="footer_copyright">
<div class="footer_social-icons flex">
{{- partial "socialIcons.html" site.Params.socialIcons -}}
<p class="flex justify-center">
<a href='https://webring.xxiivv.com/#random' target='_blank'>
<img loading="lazy" width=" 30" height="30" src='https://webring.xxiivv.com/icon.white.svg' />
</a>
</p>
<p>
<a href="https://xn--sr8hvo.ws/previous"></a>
<a href="https://xn--sr8hvo.ws">IndieWeb Webring</a>
<a href="https://xn--sr8hvo.ws/next"></a>
</p>
<div class="webring">
<webring-css site="https://fundor333.com"></webring-css>
<script src="https://djangowebring.com/static/webring.js"></script>
</div>
</div>
<small class="footer_copyright">
© {{ now.Format "2006" }} {{ .Site.Params.author.name }}.
{{ T "footer.disclaimer" | safeHTML }}
</small>
@@ -29,7 +28,7 @@
{{- if .Site.Params.goToTop -}}
<a href="#" title="{{ T "footer.go_to_top" }}" id="totop">
{{ partial "svgs/arrowUp.svg" (dict "height" 48 "width" 48) . }}
{{ partial "svgs/arrowUp.svg" (dict "height" 48 "width" 48) . }}
</a>
{{- end -}}
@@ -51,15 +50,18 @@
</script>
<script>
$(window).on('load', function() {
// Seleziona tutte le immagini con la classe 'u-photo'
var images = $('img.u-photo');
$(window).load(function(){
$.each($('u-photo'), function(){
// Set the height, hard-style!
$(this).attr('height', $(this).height());
// Itera su ogni immagine trovata
images.each(function() {
// 'this' si riferisce all'elemento immagine corrente
var currentImage = $(this);
// Prende l'altezza calcolata e la imposta come attributo 'height' del tag
var imageHeight = currentImage.height();
currentImage.attr('height', imageHeight);
});
});
</script>

View File

@@ -1,12 +1,15 @@
<section id="comments" class="article-content">
<p>With an account on the Fediverse or Mastodon, you can respond to this <a target="_blank" href="https://{{ .host }}/@{{ .username }}/{{ .id }}">post</a>. Since Mastodon is decentralized, you can use your existing account hosted by another Mastodon server or compatible platform if you don't have an account on this one. Known non-private replies are displayed below.</p>
<p>Learn how this is implemented <a target="_blank" class="link" href="https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/">here.</a></p>
<p>With an account on the Fediverse or Mastodon, you can respond to this <a target="_blank" href="https://{{ .host }}/@{{ .username }}/{{ .id }}">post</a>.
Since Mastodon is decentralized, you can use your existing account hosted by another Mastodon server or compatible platform if you don't have an account on
this one. Known non-private replies are displayed below.</p>
<p>Learn how this is implemented <a target="_blank" class="link"
href="https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/">here.</a></p>
<p id="mastodon-comments-list"></p>
<p id="mastodon-comments-list"><button id="load-comment">Load comments</button></p>
<div id="comments-wrapper">
<noscript><p>Loading comments relies on JavaScript. Try enabling JavaScript and reloading, or visit <a target="_blank" href="https://{{ .host }}/@{{ .username }}/{{ .id }}">the original post</a> on Mastodon.</p></noscript>
<noscript><p>Loading comments relies on JavaScript. Try enabling JavaScript and reloading, or visit <a
href="https://{{ .host }}/@{{ .username }}/{{ .id }}">the original post</a> on Mastodon.</p></noscript>
</div>
<noscript>You need JavaScript to view the comments.</noscript>
<script src="/js/purify.min.js"></script>
@@ -48,6 +51,7 @@
function loadComments() {
let commentsWrapper = document.getElementById("comments-wrapper");
document.getElementById("load-comment").innerHTML = "Loading";
fetch('https://{{ .host }}/api/v1/statuses/{{ .id }}/context')
.then(function(response) {
return response.json();
@@ -185,6 +189,6 @@
}
});
}
document.addEventListener("DOMContentLoaded", loadComments);
document.getElementById("load-comment").addEventListener("click", loadComments);
</script>
</section>