diff options
author | Anna Knoerr <an.kn@protonmail.ch> | 2022-01-06 23:18:46 +0100 |
---|---|---|
committer | Anna Knoerr <an.kn@protonmail.ch> | 2022-01-06 23:18:46 +0100 |
commit | 78a29491b735f712e3b7d290fc86c7d4d1d292fb (patch) | |
tree | 88a351add78b2178629922e678917d21fc6ede9b | |
parent | 8bfb4a2c7993fc0217d7c4cd70acaca03f4608b5 (diff) |
better modal test
-rw-r--r-- | archive/blog.html | 85 | ||||
-rw-r--r-- | archive/modal.html | 33 |
2 files changed, 33 insertions, 85 deletions
diff --git a/archive/blog.html b/archive/blog.html deleted file mode 100644 index 6e55773..0000000 --- a/archive/blog.html +++ /dev/null @@ -1,85 +0,0 @@ -<!doctype html> -<html lang="en"> - <head> - <!-- Required meta tags --> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - - <!-- Bootstrap CSS --> - <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> - - <link href="modal.css" rel="stylesheet"> - <script src="modal.js"></script> - <title>Playground!</title> - </head> - - <body> - -<h2>Modal Example</h2> - -<!-- Trigger/Open The Modal --> -<button id="myBtn">Open Modal</button> - -<!-- The Modal --> -<div id="myModal" class="modal"> - - <!-- Modal content --> - <div class="modal-content"> - <span class="close">×</span> - <p>Some text in the Modal..</p> - </div> - -</div> - </body> - -<script> -// Get the modal -var modal = document.getElementById("myModal"); - -// Get the button that opens the modal -var btn = document.getElementById("myBtn"); - -// Get the <span> element that closes the modal -var span = document.getElementsByClassName("close")[0]; - -// When the user clicks the button, open the modal -btn.onclick = function() { - modal.style.display = "block"; -} - -// When the user clicks on <span> (x), close the modal -span.onclick = function() { - modal.style.display = "none"; -} - -// When the user clicks anywhere outside of the modal, close it -window.onclick = function(event) { - if (event.target == modal) { - modal.style.display = "none"; - } -} -</script> - - - - - <h1>Kurious Kolibri Blog</h1> - - <!-- Button trigger modal --> -<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> - Launch demo modal -</button> - -<!-- The Modal --> -<div id="myModal" class="modal"> - - <!-- Modal content --> - <div class="modal-content"> - <span class="close">×</span> - <p>Some text in the Modal..</p> - </div> - -</div> - </body> -</html> - diff --git a/archive/modal.html b/archive/modal.html new file mode 100644 index 0000000..93da068 --- /dev/null +++ b/archive/modal.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<title>W3.CSS</title> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> +<body> + +<div class="w3-container"> + <h2>W3.CSS Modal</h2> + <p>Add the w3-card-* class to the w3-modal-content container to display the modal as a card.</p> + <button onclick="document.getElementById('id01').style.display='block'" class="w3-button w3-black">Open Modal</button> + + <div id="id01" class="w3-modal"> + <div class="w3-modal-content w3-card-4"> + <header class="w3-container w3-teal"> + <span onclick="document.getElementById('id01').style.display='none'" + class="w3-button w3-display-topright">×</span> + <h2>Modal Header</h2> + </header> + <div class="w3-container"> + <p>Some text..</p> + <p>Some text..</p> + </div> + <footer class="w3-container w3-teal"> + <p>Modal Footer</p> + </footer> + </div> + </div> +</div> + +</body> +</html> + |