ui: Cleanup

This commit is contained in:
gerlofvanek 2023-06-26 20:06:32 +02:00
parent 416b003da9
commit 1859eccf0e

View File

@ -57,6 +57,7 @@
</div>
</section>
{% include 'inc_messages.html' %}
{% if show_chart %}
<section>
<div class="pl-6 pr-6 pt-0 pb-0 mt-5 h-full overflow-hidden">
@ -81,26 +82,6 @@
<section class="py-4 overflow-hidden">
<div class="container px-4 mx-auto">
<div class="flex flex-wrap -m-3">
<style>
.active-container {
position: relative;
border-radius: 5px;
}
.active-container::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border: 1px solid rgb(77, 132, 240);
border-radius: inherit;
pointer-events: none;
}
</style>
<div class="w-full sm:w-1/2 lg:w-1/5 p-3" id="btc-container">
<div class="px-5 py-3 h-full bg-coolGray-100 dark:bg-gray-500 rounded-lg dark:text-white" id="btc-active">
<div class="flex items-center mb-2.5">
@ -806,6 +787,64 @@ const chart = new Chart(ctx, {
<input type="hidden" name="pageno" value="{{ filters.page_no }}">
</div>
</div>
<div class="rounded-b-md">
<div class="w-full md:w-0/12">
<div class="flex flex-wrap justify-end pt-6 pr-6 border-t border-gray-100 dark:border-gray-400">
<div class="w-full md:w-auto p-1.5">
<button type="submit" name='pageback' value="Page Back" class="inline-flex items-center h-9 py-1 px-4 text-xs text-blue-50 font-semibold bg-blue-500 hover:bg-blue-600 rounded-lg transition duration-200 focus:ring-0 focus:outline-none">
<svg aria-hidden="true" class="mr-2 w-5 h-5" fill="#fff" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd"></path>
</svg>
<span>Page Back</span>
</button>
</div>
<div class="flex items-center">
<div class="w-full md:w-auto p-1.5">
<p class="text-sm font-heading dark:text-white">Page: {{ filters.page_no }}</p>
</div>
</div>
<div class="w-full md:w-auto p-1.5">
<button type="submit" name='pageforwards' value="Page Forwards" class="inline-flex items-center h-9 py-1 px-4 text-xs text-blue-50 font-semibold bg-blue-500 hover:bg-blue-600 rounded-lg transition duration-200 focus:ring-0 focus:outline-none">
<span>Page Forwards</span>
<svg aria-hidden="true" class="ml-2 w-5 h-5" fill="#fff" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path>
</svg>
</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</div>
{% include 'footer.html' %}
<script>
document.getElementById('btc-container').addEventListener('click', () => {
updateChart('BTC');
});
document.getElementById('xmr-container').addEventListener('click', () => {
updateChart('XMR');
});
document.getElementById('part-container').addEventListener('click', () => {
updateChart('PART');
});
document.getElementById('pivx-container').addEventListener('click', () => {
updateChart('PIVX');
});
document.getElementById('firo-container').addEventListener('click', () => {
updateChart('FIRO');
});
document.getElementById('dash-container').addEventListener('click', () => {
updateChart('DASH');
});
document.getElementById('ltc-container').addEventListener('click', () => {
updateChart('LTC');
});
</script>
<script>
const coinNameToSymbol = {
'Bitcoin': 'BTC',
@ -855,63 +894,5 @@ const coinNameToSymbol = {
}
});
</script>
<div class="rounded-b-md">
<div class="w-full md:w-0/12">
<div class="flex flex-wrap justify-end pt-6 pr-6 border-t border-gray-100 dark:border-gray-400">
<div class="w-full md:w-auto p-1.5">
<button type="submit" name='pageback' value="Page Back" class="inline-flex items-center h-9 py-1 px-4 text-xs text-blue-50 font-semibold bg-blue-500 hover:bg-blue-600 rounded-lg transition duration-200 focus:ring-0 focus:outline-none">
<svg aria-hidden="true" class="mr-2 w-5 h-5" fill="#fff" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd"></path>
</svg>
<span>Page Back</span>
</button>
</div>
<div class="flex items-center">
<div class="w-full md:w-auto p-1.5">
<p class="text-sm font-heading dark:text-white">Page: {{ filters.page_no }}</p>
</div>
</div>
<div class="w-full md:w-auto p-1.5">
<button type="submit" name='pageforwards' value="Page Forwards" class="inline-flex items-center h-9 py-1 px-4 text-xs text-blue-50 font-semibold bg-blue-500 hover:bg-blue-600 rounded-lg transition duration-200 focus:ring-0 focus:outline-none">
<span>Page Forwards</span>
<svg aria-hidden="true" class="ml-2 w-5 h-5" fill="#fff" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path>
</svg>
</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</div>
{% include 'footer.html' %}
<script>
document.getElementById('btc-container').addEventListener('click', () => {
updateChart('BTC');
});
document.getElementById('xmr-container').addEventListener('click', () => {
updateChart('XMR');
});
document.getElementById('part-container').addEventListener('click', () => {
updateChart('PART');
});
document.getElementById('pivx-container').addEventListener('click', () => {
updateChart('PIVX');
});
document.getElementById('firo-container').addEventListener('click', () => {
updateChart('FIRO');
});
document.getElementById('dash-container').addEventListener('click', () => {
updateChart('DASH');
});
document.getElementById('ltc-container').addEventListener('click', () => {
updateChart('LTC');
});
</script>
</body>
</html>