feat: amp

This commit is contained in:
Chi Vinh Le
2020-06-11 15:47:41 +02:00
parent ba08447d5e
commit 12942e8ee9
15 changed files with 178 additions and 23 deletions
+25
View File
@@ -0,0 +1,25 @@
{% import "macros.html" as macros %}
{% extends "templates/base.html" %}
{% block title %}Coral AMP{% endblock %}
{% block css %}
<style>body { margin: 0; }</style>
{% endblock %}
{% block body %}
<div id='coralStreamEmbed'></div>
{% if entrypoint.js %}
{% for asset in entrypoint.js %}
{{ macros.js(asset.src, asset.integrity, staticURI) }}
{% endfor %}
{% endif %}
<script>
const CoralStreamEmbed = Coral.createStreamEmbed({
id: "coralStreamEmbed",
amp: true,
});
window.CoralStreamEmbed = CoralStreamEmbed;
CoralStreamEmbed.render();
</script>
{% endblock %}