Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,26 @@

<!-- UIkit CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/uikit@3.2.6/dist/css/uikit.min.css" />

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.css">
<!-- Custom CSS -->
<link rel="stylesheet" type="text/css" href="/assets/css/custom.css?v=1.1" />


<link rel="icon" type="image/png" href="/assets/img/favicon.png" />
</head>
{{end}}

{{define "scripts"}}

<script src="https://cdn.jsdelivr.net/npm/uikit@3.2.6/dist/js/uikit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/uikit@3.2.6/dist/js/uikit-icons.min.js"></script>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.js"></script>


{{end}}

{{ define "btn-example" }}
Expand Down
40 changes: 33 additions & 7 deletions templates/pairs.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,42 @@
<html lang="en">
{{block "head" .}} {{end}}
<body>

<table class="uk-table uk-table-small uk-table-striped uk-text-center">
<div class="container">
<table id="scriptytable1" class="display">
<thead>
<tr>
<th> Pair </th>
<th> Close </th>
<th> Low </th>
<th> High </th>
<th> Volume </th>
</tr>
</thead>

<tbody>
{{ range .pairs}}
<tr>
<td>{{.Pair.PairTitle}}</td>
<td>{{.MarketData.Close}}</td>
</tr>
<tr>
<td>{{.Pair.PairTitle}}</td>
<td>{{.MarketData.Close}}</td>
<td>{{.MarketData.Low}}</td>
<td>{{.MarketData.High}}</td>
<td>{{.MarketData.Volume}}</td>
</tr>
{{end}}

</tbody>
</table>

{{block "scripts" .}} {{end}}
</div>

{{block "scripts" .}}
{{end}}

<script>

$(document).ready( function () {
$('#scriptytable1').DataTable();
} );
</script>
</body>
</html>