Skip to content

Commit

Permalink
#89 colors
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Aug 1, 2024
1 parent e9c961d commit 3e8b7d2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
21 changes: 12 additions & 9 deletions xsl/index.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,18 @@ SOFTWARE.
<link rel="icon" href="https://www.zerocracy.com/svg/logo.svg" type="image/svg"/>
<link href="https://cdn.jsdelivr.net/gh/yegor256/tacit@gh-pages/tacit-css.min.css" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/gh/yegor256/drops@gh-pages/drops.min.css" rel="stylesheet"/>
<xsl:call-template name="javascript">
<xsl:with-param name="url">https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="javascript">
<xsl:with-param name="url">https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.min.js</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="javascript">
<xsl:with-param name="url">https://cdn.jsdelivr.net/npm/chart.js</xsl:with-param>
</xsl:call-template>
<xsl:for-each select="(
'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.min.js',
'https://cdn.jsdelivr.net/npm/chart.js',
'https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.4.2/chroma.min.js'
)">
<xsl:call-template name="javascript">
<xsl:with-param name="url">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<script type="text/javascript">
<xsl:value-of select="$js" disable-output-escaping="yes"/>
</script>
Expand Down
7 changes: 5 additions & 2 deletions xsl/qo-section.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SOFTWARE.
</canvas>
</div>
<script type="text/javascript">
<xsl:text>$(function(){qo_render('</xsl:text>
<xsl:text>$(function(){const color = chroma('#D3D3D3'); qo_render('</xsl:text>
<xsl:value-of select="$what"/>
<xsl:text>',{labels:[</xsl:text>
<xsl:for-each select="$facts">
Expand All @@ -66,7 +66,10 @@ SOFTWARE.
</xsl:if>
<xsl:text>{label:'</xsl:text>
<xsl:value-of select="substring-after($n, 'n_')"/>
<xsl:text>',data:[</xsl:text>
<xsl:text>',borderColor:color.darken(</xsl:text>
<xsl:value-of select="(position() - 1) * 0.5"/>
<xsl:text>).hex()</xsl:text>
<xsl:text>,data:[</xsl:text>
<xsl:for-each select="$facts">
<xsl:sort select="when" data-type="text" order="ascending"/>
<xsl:if test="position() &gt; 1">
Expand Down

0 comments on commit 3e8b7d2

Please sign in to comment.