RPGs3_card_insanity/templates/style.xsl.j2

67 lines
2.1 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-10 17:54:18 +02:00
<xsl:output method="xml" omit-xml-declaration="yes" />
2019-09-09 18:54:25 +02:00
<xsl:template match="/*">
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'\"" %}
2019-09-10 17:54:18 +02:00
<html>
{% filter replace(">", ">foobarhuehuehue")
| replace("<", "<xsl:text disable-output-escaping='yes'>&lt;</xsl:text>")
| replace(">foobarhuehuehue", "<xsl:text disable-output-escaping='yes'>&gt;</xsl:text>")
| replace("\n", newline) %}
<head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.13.1/js-yaml.min.js"></script>
<script type="text/javascript" src="https://mozilla.github.io/nunjucks/files/nunjucks.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/9.1.0/markdown-it.min.js"></script>
2019-09-10 00:52:30 +02:00
<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 17:54:18 +02:00
</head>
2019-09-10 00:52:30 +02:00
{% endfilter %}
2019-09-10 17:54:18 +02:00
<body content_type="html5">
2019-09-09 18:54:25 +02:00
<style type="text/css">
2019-09-10 17:54:18 +02:00
{{ css_data.strip() }}
2019-09-09 18:54:25 +02:00
</style>
2019-09-10 00:52:30 +02:00
{{ newline*2 }}
2019-09-10 17:54:18 +02:00
<script type="text/html" id="yaml_data">
2019-09-09 20:18:24 +02:00
<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-10 17:54:18 +02:00
var jinja_template =
{{ jinja_data.strip() | tojson | replace("\\n", "\\n\" +\n\"") }};
2019-09-09 19:29:27 +02:00
</script>
2019-09-10 00:52:30 +02:00
{{ newline*2 }}
2019-09-09 19:29:27 +02:00
<script type="text/javascript">
2019-09-10 17:54:18 +02:00
{{ js_data.strip()
2019-09-10 00:52:30 +02:00
| 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>
2019-09-10 17:54:18 +02:00
{{ newline*2 }}
</body>
{{ newline }}
</html>
2019-09-09 18:54:25 +02:00
</xsl:template>
</xsl:stylesheet>