fix: Minification
This commit is contained in:
parent
adad53fb6a
commit
d3721df4e9
|
@ -1,19 +1,19 @@
|
|||
const obfuscates = document.getElementsByClassName("obfuscate")
|
||||
const obfuscates = document.getElementsByClassName("obfuscate");
|
||||
for (const element of obfuscates) {
|
||||
const link = document.createElement("a")
|
||||
const separators = element.dataset.separators
|
||||
const protocol = element.dataset.param1.split("").reverse().join("")
|
||||
let url = protocol
|
||||
const link = document.createElement("a");
|
||||
const separators = element.dataset.separators;
|
||||
const protocol = element.dataset.param1.split("").reverse().join("");
|
||||
let url = protocol;
|
||||
for (let i = 0; i < separators.length; i++) {
|
||||
url += separators[i] + element.dataset["param" + (i+2)].split("").reverse().join("")
|
||||
url += separators[i] + element.dataset["param" + (i+2)].split("").reverse().join("");
|
||||
}
|
||||
let text = element.dataset.param2.split("").reverse().join("")
|
||||
let text = element.dataset.param2.split("").reverse().join("");
|
||||
for (let i = 1; i < separators.length; i++) {
|
||||
text += separators[i] + element.dataset["param" + (i+2)].split("").reverse().join("")
|
||||
text += separators[i] + element.dataset["param" + (i+2)].split("").reverse().join("");
|
||||
}
|
||||
link.innerText = url.replace(new RegExp(element.dataset.regex, 'i'), element.dataset.replace)
|
||||
link.href = url
|
||||
link.rel = "nofollow"
|
||||
link.innerText = url.replace(new RegExp(element.dataset.regex, 'i'), element.dataset.replace);
|
||||
link.href = url;
|
||||
link.rel = "nofollow";
|
||||
element.parentElement.insertBefore(link, element);
|
||||
}
|
||||
while (obfuscates.length > 0) obfuscates[0].remove()
|
||||
while (obfuscates.length > 0) obfuscates[0].remove();
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
{{ end }}
|
||||
<div class="text">
|
||||
{{ $ellipsis := print " <a href='" .RelPermalink "'>…</a>" | safeHTML }}
|
||||
{{ .Content | plainify | htmlUnescape | truncate $truncateSize $ellipsis }}
|
||||
{{ .Content | plainify | replace "\n" " " | htmlUnescape | truncate $truncateSize $ellipsis }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,8 +8,15 @@
|
|||
<p>{{ .RenderString "[](tel:0477625067)" }}</p>
|
||||
<p>{{ .RenderString "[](mailto:mairie@cremeaux.fr)" }}</p>
|
||||
<p>
|
||||
<a href="/actualites/index.xml"><img src="/icons/rss.svg" alt="Flux RSS de l'actualité à Crémeaux" title="Flux RSS de l'actualité à Crémeaux" class="icons" /></a>
|
||||
<a target="_blank" rel="noopener" href="https://www.facebook.com/vivre.a.cremeaux/"><img src="/icons/facebook.svg" alt="Facebook : Vivre à Crémeaux" title="Facebook : Vivre à Crémeaux" class="icons" /></a>
|
||||
<a href="/actualites/index.xml">
|
||||
<img src="/icons/rss.svg" alt="Flux RSS de l'actualité à Crémeaux" title="Flux RSS de l'actualité à Crémeaux" class="icons" />
|
||||
{{- /* Remove whitespace */ -}}
|
||||
</a>
|
||||
{{- /* Remove whitespace */ -}}
|
||||
<a target="_blank" rel="noopener" href="https://www.facebook.com/vivre.a.cremeaux/">
|
||||
{{- /* Remove whitespace */ -}}
|
||||
<img src="/icons/facebook.svg" alt="Facebook : Vivre à Crémeaux" title="Facebook : Vivre à Crémeaux" class="icons" />
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="logo">
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
{{ range .Site.Menus.main }}
|
||||
<li class="menu{{ if .HasChildren }} withSubmenu{{ end }}">
|
||||
<a href="{{ .URL }}">
|
||||
<img class="icons" src="/icons/{{ .Identifier }}.svg" alt="{{ .Name }}" />
|
||||
<span>{{ .Name }}</span>
|
||||
<img class="icons" src="/icons/{{ .Identifier }}.svg" alt="{{ .Name }}" /><span>{{ .Name }}</span>
|
||||
</a>
|
||||
{{ if .HasChildren }}
|
||||
<ol class="submenu">
|
||||
|
|
Loading…
Reference in New Issue