RPGs3_card_insanity/templates/style.xsl.j2

53 lines
1.9 KiB
Plaintext
Raw Normal View History

2019-09-09 18:54:25 +02:00
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2019-09-09 19:29:27 +02:00
<xsl:output method="html" omit-xml-declaration="yes" indent="yes" />
2019-09-09 18:54:25 +02:00
<xsl:template match="/*">
<xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;
</xsl:text>
2019-09-10 00:52:30 +02:00
{% set newline = "<xsl:text disable-output-escaping='yes'>\n</xsl:text>" %}
{% set async = "media=\"none\" onload=\"if(media!='all')media='all'\"" %}
{% filter replace("\n", newline) %}
2019-09-10 15:40:43 +02:00
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.13.1/js-yaml.min.js"/>
2019-09-10 00:52:30 +02:00
<script type="text/javascript" src="http://mozilla.github.io/nunjucks/files/nunjucks.min.js"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/9.1.0/markdown-it.min.js"/>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" {{async}}/>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" {{async}}/>
<link rel="stylesheet" href="https://cdn.materialdesignicons.com/2.0.46/css/materialdesignicons.min.css" {{async}}/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" {{async}}/>
<link rel="stylesheet" href="https://cdn.linearicons.com/free/1.0.0/icon-font.min.css" {{async}}/>
2019-09-09 18:54:25 +02:00
<title>Status Card</title>
2019-09-09 19:29:27 +02:00
2019-09-10 00:52:30 +02:00
{% endfilter %}
2019-09-09 18:54:25 +02:00
<style type="text/css">
2019-09-09 19:29:27 +02:00
{{ css_data }}
2019-09-09 18:54:25 +02:00
</style>
2019-09-10 00:52:30 +02:00
{{ newline*2 }}
2019-09-09 20:18:24 +02:00
<script type="text/html" id="yaml_data">---
<xsl:value-of select="yaml_data"/>
2019-09-09 18:54:25 +02:00
</script>
2019-09-10 00:52:30 +02:00
{{ newline*2 }}
2019-09-09 20:18:24 +02:00
2019-09-09 18:54:25 +02:00
<script type="text/javascript">
2019-09-09 19:07:05 +02:00
var jinja_template = {{ jinja_data | tojson }};
2019-09-09 19:29:27 +02:00
</script>
2019-09-10 00:52:30 +02:00
{{ newline*2 }}
2019-09-09 20:18:24 +02:00
<div id="my_card"></div>
2019-09-09 19:29:27 +02:00
<script type="text/javascript">
2019-09-10 00:52:30 +02:00
{{ js_data
| replace(">", ">foobarhuehuehue")
| replace("<", "<xsl:text disable-output-escaping='yes'>&lt;</xsl:text>")
| replace(">foobarhuehuehue", "<xsl:text disable-output-escaping='yes'>&gt;</xsl:text>") }}
2019-09-09 18:54:25 +02:00
</script>
</xsl:template>
</xsl:stylesheet>