perf: move timeago script to bottom

This commit is contained in:
Ayo Ayco 2025-01-19 20:28:04 +01:00
parent b6593651a8
commit cff0caec1d
3 changed files with 11 additions and 6 deletions

View file

@ -148,7 +148,7 @@
<!-- threads specific static css-->
{% include "styles.html" %}
{% include "import-map.html" %}
<!-- {% include "import-map.html" %} -->
</head>
<body>
@ -200,6 +200,10 @@
<p>Rendered on {{ render_date }} in Europe/Amsterdam</p>
</footer>
<script type="module">
import TimeAgo from "https://esm.sh/v135/@github/relative-time-element@4.4.0/es2022/relative-time.js"
customElements.define('relative-time', TimeAgo)
</script>
<script type="module" src="{{ url_for('threads.static', filename='enhance-content.js') }}">
</script>
</body>

View file

@ -143,7 +143,7 @@
<!-- threads specific static css-->
{% include "styles.html" %}
{% include "import-map.html" %}
<!-- {% include "import-map.html" %} -->
</head>
<body>
@ -194,6 +194,11 @@
</p>
<p>Rendered on {{ render_date }} in Europe/Amsterdam</p>
</footer>
<script type="module">
import TimeAgo from "https://esm.sh/v135/@github/relative-time-element@4.4.0/es2022/relative-time.js"
customElements.define('relative-time', TimeAgo)
</script>
<script type="module" src="{{ url_for('threads.static', filename='enhance-content.js') }}">
</script>
</body>

View file

@ -4,8 +4,4 @@
"web-component-base": "https://esm.sh/web-component-base@2.1.2/es2022/web-component-base.mjs"
}
}
</script>
<script type="module">
import TimeAgo from "https://esm.sh/v135/@github/relative-time-element@4.4.0/es2022/relative-time-element.mjs"
</script>