Move xls template to style.xsl.j2

This commit is contained in:
Peder Bergebakken Sundt 2019-09-09 18:54:25 +02:00
parent c41553fac8
commit 74c738f6cb
2 changed files with 27 additions and 21 deletions

View File

@ -1,24 +1,5 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes" />
<xsl:template match="/*">
<xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;
</xsl:text>
<script src="https://raw.githubusercontent.com/nodeca/js-yaml/master/dist/js-yaml.min.js"></script>
<script src="http://mozilla.github.io/nunjucks/files/nunjucks.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"/>
<title>Status Card</title> <div class="">
<style type="text/css">
<xsl:include href="style.css"/>
</style>
<div class="fjomp_card">
asdasd<br/>
asdasd<br/>
asdasd<br/>
asdasd<br/>
</div> </div>
</xsl:template>
</xsl:stylesheet>

25
templates/style.xls.j2 Normal file
View File

@ -0,0 +1,25 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes" />
<xsl:template match="/*">
<xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;
</xsl:text>
<script src="https://raw.githubusercontent.com/nodeca/js-yaml/master/dist/js-yaml.min.js"></script>
<script src="http://mozilla.github.io/nunjucks/files/nunjucks.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"/>
<title>Status Card</title>
<style type="text/css">
{{ css }}
</style>
<script type="text/html" id="yaml_data">
{{ yaml_data }}
</script>
<script type="text/javascript">
// render this shit
</script>
</xsl:template>
</xsl:stylesheet>