This commit is contained in:
Donald Cheng Hong Zou
2021-05-04 21:26:40 -04:00
parent b17575b197
commit 040f6a8393
10 changed files with 215 additions and 108 deletions

View File

@@ -5,6 +5,7 @@
<div class="container-fluid">
{% include "sidebar.html" %}
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4">
<h1 class="pb-4 mt-4">Home</h1>
{% for i in conf%}
<div class="card mt-3">
<div class="card-body">
@@ -25,10 +26,13 @@
</div>
<div class="col-md">
{% if i['checked'] == "checked" %}
<a href="#" id="{{i['conf']}}" {{i['checked']}} class="switch text-primary"><i class="bi bi-toggle2-on"></i></a>
<a href="#" id="{{i['conf']}}" {{i['checked']}} class="switch text-primary tt"><i class="bi bi-toggle2-on"></i></a>
{% else %}
<a href="#" id="{{i['conf']}}" {{i['checked']}} class="switch text-secondary"><i class="bi bi-toggle2-off"></i></a>
{% endif %}
<div class="spinner-border text-primary" role="status" style="display: none">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
</div>
@@ -40,6 +44,8 @@
{% include "footer.html" %}
<script>
$('.switch').click(function() {
$(this).siblings($(".spinner-border")).css("display", "inline-block")
$(this).remove()
location.replace("/switch/"+$(this).attr('id'))
});
$(".sb-home-url").addClass("active")