-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f60ffec
commit 5b84be3
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>{{ primary_screener.rstrip('s') }} Fields</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"/> | ||
</head> | ||
<body> | ||
<main class="container"> | ||
<div role="group"> | ||
{% for name, file, set_markets in screeners %} | ||
<button | ||
class="{{ "primary" if name == primary_screener else "secondary" }}" | ||
onclick="window.location.href = '{{ file }}'" | ||
data-tooltip="{{ set_markets }}" | ||
data-placement="bottom" | ||
>{{ name }}</button> | ||
{% endfor %} | ||
</div> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th scope="col">Name</th> | ||
<th scope="col">Display name</th> | ||
<th scope="col">Type</th> | ||
<th scope="col" data-tooltip="If true it has the following timeframes: `'1', '5', '15', '30', '60', '120', '240', '1W', '1M'`">Timeframes</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for row in rows %} | ||
<tr> | ||
{% if is_list(row) %} | ||
<td> | ||
<details> | ||
<summary>{{ row[0][0] }}</summary> | ||
<ul> | ||
{% for val in row[1:] %} | ||
<li>{{ val }}</li> | ||
{% endfor %} | ||
</ul> | ||
</details> | ||
</td> | ||
{% for val in row[0][1:] %} | ||
<td>{{ val }}</td> | ||
{% endfor %} | ||
{% else %} | ||
{% for val in row %} | ||
<td>{{ val }}</td> | ||
{% endfor %} | ||
{% endif %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<th scope="row">Fields</th> | ||
<td>{{ n_fields }}</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{# | ||
We want to extend the default template instead of defining everything ourselves. | ||
#} | ||
{% extends "default/module.html.jinja2" %} | ||
|
||
{% block nav_title %} | ||
<script type="text/javascript"> | ||
window.onload = function() { | ||
let ul = document.evaluate("//h2[text() = 'Submodules']/following-sibling::ul", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | ||
ul.insertAdjacentHTML('afterend', '<h2 id="fields">Fields</h2>'); | ||
let html = ` | ||
<ul> | ||
<li><a href="static/stocks_fields.html">Stocks</a></li> | ||
<li><a href="static/crypto_fields.html">Crypto</a></li> | ||
<li><a href="static/forex_fields.html">Forex</a></li> | ||
<li><a href="static/coin_fields.html">Coin</a></li> | ||
<li><a href="static/cfd_fields.html">Cfd</a></li> | ||
<li><a href="static/futures_fields.html">Futures</a></li> | ||
<li><a href="static/bonds_fields.html">Bonds</a></li> | ||
<li><a href="static/economics2_fields.html">Economics2</a></li> | ||
<li><a href="static/options_fields.html">Options</a></li> | ||
</ul> | ||
`; | ||
document.getElementById('fields').insertAdjacentHTML('afterend', html); | ||
} | ||
</script> | ||
{% endblock %} |