summaryrefslogtreecommitdiff
path: root/assets/main.js
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2021-01-21 17:22:53 -0700
committerBrian Picciano <mediocregopher@gmail.com>2021-01-21 17:22:53 -0700
commitbcf9b230be6d74c71567fd0771b31d47d8dd39c7 (patch)
tree2d0fc16142d55bbd5876ac6b8174c2857883b40e /assets/main.js
parentd57fd70640948cf20eeb41b56e8d4e23e616cec0 (diff)
build the blog with nix
Diffstat (limited to 'assets/main.js')
-rw-r--r--assets/main.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/assets/main.js b/assets/main.js
deleted file mode 100644
index 7557f2b..0000000
--- a/assets/main.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// showModal will create the modal structure the first time it is called.
-var modal, modalContent;
-const showModal = function() {
- if (!modal) {
- // make the modal
- const modalClose = document.createElement('span');
- modalClose.id = 'modal-close';
- modalClose.innerHTML = '&times;';
-
- modalContent = document.createElement('div');
- modalContent.id = 'modal-content';
-
- const modalBody = document.createElement('div');
- modalBody.id = 'modal-body';
- modalBody.appendChild(modalContent);
- modalBody.appendChild(modalClose);
-
- modal = document.createElement('div');
- modal.id = 'modal';
- modal.appendChild(modalBody);
-
- // add the modal to the document
- document.getElementsByTagName('body')[0].appendChild(modal);
-
- // setup modal functionality
- modalClose.onclick = function() {
- modal.style.display = "none";
- }
- }
-
- modalContent.innerHTML = '';
- for (var i = 0; i < arguments.length; i++) {
- modalContent.appendChild(arguments[i]);
- }
- modal.style.display = "block";
-
- // When the user clicks anywhere outside of the modal, close it
- window.onclick = function(event) {
- if (event.target == modal) {
- modal.style.display = "none";
- window.onclick = undefined;
- }
- }
-}
-
-document.addEventListener("DOMContentLoaded", () => {
- console.log("DOM loaded");
-})