-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into add-js-filter-auth
- Loading branch information
Showing
24 changed files
with
383 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<html> | ||
<head> | ||
<title>Modern Modal</title> | ||
<style> | ||
/* Modal background */ | ||
#modalBackground { | ||
display: none; | ||
position: fixed; | ||
z-index: 1; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
background-color: rgba(0,0,0,0.4); | ||
} | ||
|
||
/* Modal content */ | ||
#modalContent { | ||
position: absolute; | ||
background-color: #fff; | ||
padding: 20px; | ||
border: 1px solid #888; | ||
width: 250px; | ||
height: 200px; | ||
z-index: 2; | ||
|
||
/* Center the modal */ | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
/* Close button */ | ||
.close { | ||
color: #aaa; | ||
float: right; | ||
font-size: 28px; | ||
font-weight: bold; | ||
cursor: pointer; | ||
} | ||
|
||
.close:hover, | ||
.close:focus { | ||
color: black; | ||
text-decoration: none; | ||
cursor: pointer; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p>Modal dialog sample</p> | ||
|
||
<input id="trigger-modal-btn" type="button" value="trigger modal" onclick="openModal();"> | ||
|
||
<a id="trigger-modal-link" href="javascript:openModal()">trigger modal</a> | ||
|
||
<!-- Modal structure --> | ||
<div id="modalBackground"> | ||
<div id="modalContent"> | ||
<span id="modal-close" class="close" onclick="closeModal()">×</span> | ||
<span id="modal-text">I am a modal</span> | ||
<input type="text" id="modal-input"/> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
function openModal() { | ||
// Display the modal and dim the background | ||
document.getElementById('modalBackground').style.display = 'block'; | ||
} | ||
|
||
function closeModal() { | ||
// Hide the modal and remove the dimming effect | ||
document.getElementById('modalBackground').style.display = 'none'; | ||
} | ||
|
||
// Optional: Close the modal when clicking outside of it | ||
window.onclick = function(event) { | ||
var modal = document.getElementById('modalBackground'); | ||
if (event.target == modal) { | ||
closeModal(); | ||
} | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.