html crypto report
This commit is contained in:
63
tmpl/cryptoReport.tmpl
Normal file
63
tmpl/cryptoReport.tmpl
Normal file
@ -0,0 +1,63 @@
|
||||
[% USE f2 = format('%.2f') %]
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
font-family: Helvetica,Arial;
|
||||
}
|
||||
table {
|
||||
width: 100vw;
|
||||
}
|
||||
th {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #808080;
|
||||
}
|
||||
td {
|
||||
text-align: right;
|
||||
padding: 0em 1em;
|
||||
border-bottom: 1px solid #808080;
|
||||
}
|
||||
.gain {
|
||||
font-weight: bold;
|
||||
color: #f0f0f0;
|
||||
background-color: #269900;
|
||||
}
|
||||
.loss {
|
||||
font-weight: bold;
|
||||
color: #f0f0f0;
|
||||
background-color: #cc0000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Report vom [% GENERATED %]</h1>
|
||||
<h4><a href="https://mrtg.br0tkasten.de/cryptoPortfolio.html">Aktueller Report</a></h4>
|
||||
<table>
|
||||
[% totalProfit = 0 %]
|
||||
[% FOREACH c IN DATA %]
|
||||
[% gain = f2(c.CURRENT_PRICE / c.LAST_WEEK_PRICE * 100 - 100) %]
|
||||
<tr>
|
||||
<td><img alt="[% c.NAME %]" src="data:image/png;base64,[% c.IMAGE %]"></td>
|
||||
<td>
|
||||
<table>
|
||||
<tr><th>Währung</th><td>[% c.NAME %] ([% c.CURRENCY %])</td></tr>
|
||||
<tr><th>Kaufdatum</th><td>[% c.DATE %]</td></tr>
|
||||
<tr><th>Kaufpreis</th><td>[% f2(c.BUYRATE) %] Euro/[% c.CURRENCY %]</td></tr>
|
||||
<tr><th>aktueller Kurs</th><td>[% f2(c.CURRENT_PRICE) %] Euro/[% c.CURRENCY %]</td></tr>
|
||||
<tr><th>aktueller Wert</th><td>[% f2(c.CURRENT_PRICE * c.COIN) %] Euro</td></tr>
|
||||
<tr><th>aktueller Profit</th><td><b>[% f2((c.CURRENT_PRICE * c.COIN) - c.PRICE) %] Euro</b></td></tr>
|
||||
[% IF gain > 0 %]
|
||||
<tr class="gain"><td>7 Tage Gewinn</td><td>+[% gain %] %</td></tr>
|
||||
[% ELSE %]
|
||||
<tr class="loss"><td>7 Tage Verlust</td><td>[% gain %] %</td></tr>
|
||||
[% END %]
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
[% totalProfit = totalProfit + f2((c.CURRENT_PRICE * c.COIN) - c.PRICE) %]
|
||||
[% END %]
|
||||
</table>
|
||||
<h2>Gewinn (gesamt) ca. [% totalProfit %] Euro</h2>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user