Skip to content

Commit 7615398

Browse files
authored
html validation fixup (#73)
* html validation fixup * OF - typo * br format * html5 style
1 parent f7ab016 commit 7615398

5 files changed

Lines changed: 34 additions & 33 deletions

File tree

content/theme/templates/footer.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
<div class="row">
33
<div class="large-12 medium-12 columns">
44
<p style="font-style: italic; font-size: 0.8rem; text-align: center;">
5-
Copyright {{ CURRENTYEAR }}, <a href="https://www.apache.org/">The Apache Software Foundation</a>, Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>
5+
Copyright {{ CURRENTYEAR }}, <a href="https://www.apache.org/">The Apache Software Foundation</a>, Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br>
66
Apache&reg; and the Apache feather logo are trademarks of The Apache Software Foundation.
77
</p>
88
</div>
99
</div>
10-
<script type="application/ecmascript" src="/js/bootstrap.bundle.min.js" integrity="sha384-TYMA+uAx4f43rilxPIhmlqA+Vi+xbyMe+YVR3BcL15NyHLqd+7WYNtyBPdayiOPx"></script>

content/theme/templates/menu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- nav bar -->
22
<nav class="navbar navbar-expand-lg navbar-dark bg-info" aria-label="Fifth navbar example">
33
<div class="container-fluid">
4-
<a class="navbar-brand" href="/"><img src="https://apache.org/img/asf_logo.png" alt="The Apache Software Foundation" style="height: 42px;"/>
4+
<a class="navbar-brand" href="/"><img src="https://apache.org/img/asf_logo.png" alt="The Apache Software Foundation" style="height: 42px;">
55
<span style="position: relative; top: 5px; margin-left: 16px;">Tooling Initiative</span></a>
66
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarADP" aria-controls="navbarADP" aria-expanded="false" aria-label="Toggle navigation">
77
<span class="navbar-toggler-icon"></span>

content/theme/templates/page.html

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,7 @@
1616
{% include "footer.html" %}
1717
</div>
1818
</main>
19-
<script>
20-
document.addEventListener("DOMContentLoaded", () => {
21-
function decodeHtmlEntities(str) {
22-
const txt = document.createElement("textarea");
23-
txt.innerHTML = str;
24-
return txt.value;
25-
}
26-
document.querySelectorAll("pre > code.language-mermaid").forEach((code, i) => {
27-
let decoded = decodeHtmlEntities(code.innerHTML);
28-
// Normalize whitespace
29-
decoded = decoded.replace(/\t/g, " ");
30-
decoded = decoded.replace(/^\s*\n/, "").replace(/\n\s*$/, "");
31-
const div = document.createElement("div");
32-
div.className = "mermaid";
33-
div.textContent = decoded;
34-
code.parentElement.replaceWith(div);
35-
console.log(`=== Mermaid block ${i} ===`);
36-
console.log(decoded);
37-
});
38-
// Mermaid v10+ runs asynchronously
39-
mermaid.run({ querySelector: ".mermaid" })
40-
.catch(err => {
41-
console.error("Mermaid rendering failed:", err);
42-
});
43-
});
44-
</script>
45-
<script>hljs.highlightAll();</script>
19+
{% include "post.html" %}
4620
</body>
4721
</html>
4822
{% endblock %}

content/theme/templates/post.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<script src="/js/bootstrap.bundle.min.js" integrity="sha384-TYMA+uAx4f43rilxPIhmlqA+Vi+xbyMe+YVR3BcL15NyHLqd+7WYNtyBPdayiOPx"></script>
2+
<script>
3+
document.addEventListener("DOMContentLoaded", () => {
4+
function decodeHtmlEntities(str) {
5+
const txt = document.createElement("textarea");
6+
txt.innerHTML = str;
7+
return txt.value;
8+
}
9+
document.querySelectorAll("pre > code.language-mermaid").forEach((code, i) => {
10+
let decoded = decodeHtmlEntities(code.innerHTML);
11+
// Normalize whitespace
12+
decoded = decoded.replace(/\t/g, " ");
13+
decoded = decoded.replace(/^\s*\n/, "").replace(/\n\s*$/, "");
14+
const div = document.createElement("div");
15+
div.className = "mermaid";
16+
div.textContent = decoded;
17+
code.parentElement.replaceWith(div);
18+
console.log(`=== Mermaid block ${i} ===`);
19+
console.log(decoded);
20+
});
21+
// Mermaid v10+ runs asynchronously
22+
mermaid.run({ querySelector: ".mermaid" })
23+
.catch(err => {
24+
console.error("Mermaid rendering failed:", err);
25+
});
26+
});
27+
</script>
28+
<script>hljs.highlightAll();</script>

content/theme/templates/styles.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<script src="/js/mermaid.min.js"></script>
88
<!-- pagefind search -->
99
<link href="/_pagefind/pagefind-ui.css" rel="stylesheet">
10-
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
10+
<script src="/_pagefind/pagefind-ui.js"></script>
1111
<script>
1212
window.addEventListener('DOMContentLoaded', (event) => {
1313
new PagefindUI({ element: "#pagefind-search" });
@@ -26,7 +26,7 @@
2626
});
2727
</script>
2828
<!-- pagefind search box styling -->
29-
<style type="text/css">
29+
<style>
3030
.search-form {
3131
right: 0;
3232
left: initial !important;
@@ -41,6 +41,6 @@
4141
padding: 1em;
4242
background: #fff;
4343
border: 1px solid #d0d7de;
44-
broder-radius: 6px;
44+
border-radius: 6px;
4545
}
4646
</style>

0 commit comments

Comments
 (0)