diff --git a/application/source/types/page-data.go b/application/source/types/page-data.go index 18b3fe19cdaeba3c686622261720bcb1e00e7ac8..6994066107c45d29caf1b571ddfee0be201e6fa6 100644 --- a/application/source/types/page-data.go +++ b/application/source/types/page-data.go @@ -16,7 +16,7 @@ type Anchor struct { Id string `yaml:"id"` Href string `yaml:"href"` HrefLang string `yaml:"hreflang"` - Title string + Title string `yaml:"title"` } type Translations struct { diff --git a/development/examples/example1/html/de/test1.html b/development/examples/example1/html/de/test1.html index 3ff51ee42706f51206e45a6143ed785aa9873d57..bc15af16307690d63c30da1eb4dbfc6d9ae4877c 100644 --- a/development/examples/example1/html/de/test1.html +++ b/development/examples/example1/html/de/test1.html @@ -1,6 +1,4 @@ -<!DOCTYPE html> -<html lang="de"> -<head> +<!DOCTYPE html><html lang="de"><head> <style> *:not(:defined) { @@ -30,16 +28,9 @@ <link rel="icon" href="/favicon.svg" type="image/svg+xml"/> <link rel="apple-touch-icon" href="/apple-touch-icon.png"/> - <script id="translations" type="application/json" data-monster-role="translation">{ - "key1": "value1 gfgf66", - "key2": "value2 gg", - "key3": { - "one": "value3 tgtgt", - "two": "value4 trzrtz" - } - }</script> - - + <script id="translations" type="application/json" data-monster-role="translation">{"key1":"value1 gfgf66","key2":"value2 gg","key3":{"one":"value3 tgtgt","two":"value4 trzrtz"}}</script> + + <script id="mainscript" src="/script/main22.mjs" type="module"></script> </head> @@ -51,37 +42,31 @@ <monster-state> <img width="16" height="16" alt="tick" title="yes" src="data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYYDJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2Cm V1unU4zPgI/Sg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQ - PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" - id="tickyesdata-image-gi-4013311193"/> + PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193"/> <h1 class="deco">Bad xxxx</h1> - <p>The request was incorrect, the server could not process it.</p> - <p> - </p> - <div class="infobox"> - <div> + <p>The request was incorrect, the server could not process it.</p><p> +</p><div class="infobox"> + <div> - <ul> + <ul> - <li>Try submitting your<a id="yes-a-html" href="/a.html" title="Yes" hreflang="">request</a> again - (sometimes this helps). - </li> - <li>Contact support if you continue to have problems.</li> + <li>Try submitting your<a id="yes-a-html" href="/a.html" title="Yes" hreflang="">request</a> again (sometimes this helps).</li> + <li>Contact support if you continue to have problems.</li> - <li>If you received this message as a result of a request to the server API, then check the structure - against the documentation. - </li> + <li>If you received this message as a result of a request to the server API, then check the structure + against the documentation.</li> - </ul> + </ul> - <p>You can try the following steps:</p> - - </div> + <p>You can try the following steps:</p> + </div> +</div> </monster-state> -</body> -</html> \ No newline at end of file + +</body></html> \ No newline at end of file diff --git a/development/examples/example1/original/test1.html b/development/examples/example1/original/test1.html index 319730bb06e8f2cc3231d97b4a3f554da6913af3..0f08b9fa8446ce45b95f8e6f66058e3470b403da 100644 --- a/development/examples/example1/original/test1.html +++ b/development/examples/example1/original/test1.html @@ -44,6 +44,10 @@ </head> <body> + + +<a href="/test.html" title="test-link">test-link</a> + <header> <div class="gradient"></div> </header> diff --git a/development/examples/example1/template/data.yaml b/development/examples/example1/template/data.yaml index 09114f26e7947e00706a184149a77c78feeb8919..4eaf644da44d3ae87fbcd264b6d362c3f6de736a 100755 --- a/development/examples/example1/template/data.yaml +++ b/development/examples/example1/template/data.yaml @@ -14,11 +14,19 @@ test1.html: alt: tick title: "yes" anchors: + - id: test-link-test-html + href: /test.html + hreflang: "" + title: test-link + content: "" - id: yes-a-html href: /a.html hreflang: "" title: "Yes" + content: "" text: + - text: test-link + id: test-link - text: Bad xxxx id: bad-xxxx - text: The request was incorrect, the server could not process it. @@ -37,11 +45,11 @@ test1.html: - id: translations type: application/json translations: - key1: value1 gfgf66 - key2: value2 gg + key1: value1 + key2: value2 key3: - one: value3 tgtgt - two: value4 trzrtz + one: value3 + two: value4 test2.html: export: en/test2.html lang: en @@ -62,6 +70,7 @@ test2.html: href: /a.html hreflang: "" title: "Yes" + content: "" text: - text: Bad xxxx id: bad-xxxx @@ -98,6 +107,7 @@ test3.html: href: /a.html hreflang: "" title: "Yes" + content: "" text: - text: Bad xxxx id: bad-xxxx diff --git a/development/examples/example1/template/test1.html b/development/examples/example1/template/test1.html index cecbc1bcd1242982078c20de7b05e1d354e3d8a7..a978fb5b34a4b00465f3b1f5c1f43f1a1b02c111 100644 --- a/development/examples/example1/template/test1.html +++ b/development/examples/example1/template/test1.html @@ -44,6 +44,10 @@ </head> <body> + + +<a href="/test.html" title="test-link" id="test-link-test-html" data-attributes="href path:anchors.test-link-test-html.href,title path:anchors.test-link-test-html.title,hreflang path:anchors.test-link-test-html.hreflang"><span id="test-link" data-replace-self="path:text.test-link.text">test-link</span></a> + <header> <div class="gradient"></div> </header> @@ -51,7 +55,7 @@ <monster-state> <img width="16" height="16" alt="tick" title="yes" src="data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYYDJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2Cm V1unU4zPgI/Sg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQ - PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193" data-attributes="src path:content.tickyesdata-image-gi-4013311193.src,alt path:content.tickyesdata-image-gi-4013311193.alt,title path:content.tickyesdata-image-gi-4013311193.title"/> + PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193" data-attributes="alt path:content.tickyesdata-image-gi-4013311193.alt,src path:content.tickyesdata-image-gi-4013311193.src,title path:content.tickyesdata-image-gi-4013311193.title"/> <h1 class="deco"><span id="bad-xxxx" data-replace-self="path:text.bad-xxxx.text">Bad xxxx</span></h1> <p><span id="the-request-was-inco-2640993422" data-replace-self="path:text.the-request-was-inco-2640993422.text">The request was incorrect, the server could not process it. </span></p><p> @@ -60,7 +64,7 @@ <ul> - <li><span id="try-submitting-your" data-replace-self="path:text.try-submitting-your.text">Try submitting your </span><a href="/a.html" title="Yes" id="yes-a-html" data-attributes="href path:anchors.yes-a-html.href,title path:anchors.yes-a-html.title,hreflang path:anchors.yes-a-html.hreflang">request</a> again (sometimes this helps).</li> + <li><span id="try-submitting-your" data-replace-self="path:text.try-submitting-your.text">Try submitting your </span><a href="/a.html" title="Yes" id="yes-a-html" data-attributes="title path:anchors.yes-a-html.title,href path:anchors.yes-a-html.href,hreflang path:anchors.yes-a-html.hreflang">request</a> again (sometimes this helps).</li> <li><span id="contact-support-if-y-3404332025" data-replace-self="path:text.contact-support-if-y-3404332025.text">Contact support if you continue to have problems.</span></li> <li><span id="if-you-received-this-423958995" data-replace-self="path:text.if-you-received-this-423958995.text">If you received this message as a result of a request to the server API, then check the structure diff --git a/development/examples/example1/template/test2.html b/development/examples/example1/template/test2.html index 39adaf560e5b0bba2d8e3cac91764d0452865a5b..223887fa88417e2d3dea1a8c8bfb80084bdffd99 100644 --- a/development/examples/example1/template/test2.html +++ b/development/examples/example1/template/test2.html @@ -39,7 +39,7 @@ <monster-state> <img width="16" height="16" alt="tick" title="yes" src="data:image/gif;base64,R0lGODdhEAAQAMwAAPj7+FmhUYjNfGuxYYDJdYTIeanOpT+DOTuANXi/bGOrWj6CONzv2sPjv2Cm V1unU4zPgI/Sg6DJnJ3ImTh8Mtbs00aNP1CZSGy0YqLEn47RgXW8amasW7XWsmmvX2iuXiwAAAAAEAAQAAAFVyAgjmRpnihqGCkpDQ - PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193" data-attributes="alt path:content.tickyesdata-image-gi-4013311193.alt,src path:content.tickyesdata-image-gi-4013311193.src,title path:content.tickyesdata-image-gi-4013311193.title"/> + PbGkNUOFk6DZqgHCNGg2T4QAQBoIiRSAwBE4VA4FACKgkB5NGReASFZEmxsQ0whPDi9BiACYQAInXhwOUtgCUQoORFCGt/g4QAIQA7" id="tickyesdata-image-gi-4013311193" data-attributes="src path:content.tickyesdata-image-gi-4013311193.src,alt path:content.tickyesdata-image-gi-4013311193.alt,title path:content.tickyesdata-image-gi-4013311193.title"/> <h1 class="deco"><span id="bad-xxxx" data-replace-self="path:text.bad-xxxx.text">Bad xxxx</span></h1> <p><span id="the-request-was-inco-2640993422" data-replace-self="path:text.the-request-was-inco-2640993422.text">The request was incorrect, the server could not process it. </span></p><p>