cleanup html and js
This commit is contained in:
parent
56b3ac2550
commit
bf9a3961a8
|
@ -2,10 +2,19 @@
|
||||||
<html>
|
<html>
|
||||||
<title>Sketch HambiMap</title>
|
<title>Sketch HambiMap</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
<link rel="stylesheet" href="w3.css">
|
||||||
<script>
|
<script>
|
||||||
function switch_modal(id){
|
|
||||||
var modals=document.getElementsByClassName('w3-modal');
|
var modals=document.getElementsByClassName('w3-modal');
|
||||||
|
|
||||||
|
window.onclick = function(event) {
|
||||||
|
for(var j = 0; j < modals.length; ++j){
|
||||||
|
if (event.target == modals[j]) {
|
||||||
|
modals[j].style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function switch_modal(id){
|
||||||
for(var i = 0; i < modals.length; ++i){
|
for(var i = 0; i < modals.length; ++i){
|
||||||
modals[i].style.display = 'none';
|
modals[i].style.display = 'none';
|
||||||
}
|
}
|
||||||
|
@ -16,18 +25,7 @@
|
||||||
</script>
|
</script>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="w3-container">
|
<div id="modals">
|
||||||
<h2>W3.CSS Modal</h2>
|
|
||||||
<!-- Trigger/Open the Modals -->
|
|
||||||
<button onclick="switch_modal('modal_view_treehouse')" class="w3-button">View Treehouse</button>
|
|
||||||
<button onclick="switch_modal('modal_view_barrio')" class="w3-button">View Barrio</button>
|
|
||||||
<button onclick="switch_modal('modal_view_tree')" class="w3-button">View Tree</button>
|
|
||||||
<button onclick="switch_modal('modal_form_treehouse')" class="w3-button">Add Treehouse</button>
|
|
||||||
<button onclick="switch_modal('modal_form_barrio')" class="w3-button">Add Barrio</button>
|
|
||||||
<button class="w3-button"><a href="user_form.html">Register</a></button>
|
|
||||||
<button class="w3-button"><a href="login_form.html">Login</a></button>
|
|
||||||
|
|
||||||
<!-- The Modals -->
|
|
||||||
<div id="modal_view_treehouse" class="w3-modal">
|
<div id="modal_view_treehouse" class="w3-modal">
|
||||||
<div class="w3-modal-content">
|
<div class="w3-modal-content">
|
||||||
<div class="w3-container">
|
<div class="w3-container">
|
||||||
|
@ -37,6 +35,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- The Modals -->
|
||||||
<div id="modal_view_tree" class="w3-modal">
|
<div id="modal_view_tree" class="w3-modal">
|
||||||
<div class="w3-modal-content">
|
<div class="w3-modal-content">
|
||||||
<div class="w3-container">
|
<div class="w3-container">
|
||||||
|
@ -119,6 +118,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="w3-container" id="site_body">
|
||||||
|
<h2>W3.CSS Modal</h2>
|
||||||
|
<!-- Trigger/Open the Modals -->
|
||||||
|
<button onclick="switch_modal('modal_view_treehouse')" class="w3-button">View Treehouse</button>
|
||||||
|
<button onclick="switch_modal('modal_view_barrio')" class="w3-button">View Barrio</button>
|
||||||
|
<button onclick="switch_modal('modal_view_tree')" class="w3-button">View Tree</button>
|
||||||
|
<button onclick="switch_modal('modal_form_treehouse')" class="w3-button">Add Treehouse</button>
|
||||||
|
<button onclick="switch_modal('modal_form_barrio')" class="w3-button">Add Barrio</button>
|
||||||
|
<a href="user_form.html" class="w3-button">Register</a>
|
||||||
|
<a href="login_form.html" class="w3-button">Login</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue