Tankerkoenig: third decimal place as superscript in sitemap

I use the binding tankerkoenig for some time.

I wanted to ask if anyone managed to put the third decimal place in the sitemap as a superscript number?

Unfortunately, I have not found anything yet, neither in the community nor on special java formatter pages.

Can someone help me?

No, I don’t have found anything for that on a sitemap, however on HABPanel I managed to show a (so far hardcoded “9”) superscript number.

It looks like this:

This is the code used:

<div class="container-fluid">
  <div class="table">
    <div class="col-xs-3"><p class="text-left">Name:</p></div>
    <div class="col-xs-3">CLASSIC Nordholz</div>
    <div class="col-xs-3">CLASSIC Altenwalde</div>
    <div class="col-xs-3">SHELL Nordholz</div>
 <table class="table">
     <td class="text-right"><p class="text-left"><strong>E10:</strong></p></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('E10_1')}}<sup>9</sup> €</strong></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('E10_2')}}<sup>9</sup> €</strong></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('E10_3')}}<sup>9</sup> €</strong></td>
    <td class="text-right"><p class="text-left"><strong>E5:</strong></p></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('E5_1')}}<sup>9</sup> €</strong></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('E5_2')}}<sup>9</sup> €</strong></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('E5_3')}}<sup>9</sup> €</strong></td>
    <td class="text-right"><p class="text-left"><strong>Diesel:</strong></p></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('Diesel_1')}}<sup>9</sup> €</strong></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('Diesel_2')}}<sup>9</sup> €</strong></td>
    <td><strong>{{'%.04s' | sprintf:itemValue('Diesel_3')}}<sup>9</sup> €</strong></td>

Stating in here that I hardcoded the superscript 9 didn’t let me sleep.
Exchanging the 9 with {{'%f' | sprintf:itemValue('E10_1').split('.')[1].substring(2,3)}} solved that!

1 Like