42 lines
1.1 KiB
HTML
42 lines
1.1 KiB
HTML
|
|
<!doctype html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8" />
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
|
<title>Y2K Alerts - WinXP Theme</title>
|
||
|
|
<link rel="stylesheet" href="../dist/y2k-alerts-winxp.css" />
|
||
|
|
<style>
|
||
|
|
body {
|
||
|
|
font-family: Tahoma, Verdana, sans-serif;
|
||
|
|
padding: 24px;
|
||
|
|
background: #3a6ea5;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<button id="show-alert">Show WinXP Alert</button>
|
||
|
|
|
||
|
|
<script src="../dist/y2k-alerts.js"></script>
|
||
|
|
<script>
|
||
|
|
document.getElementById("show-alert").addEventListener("click", function () {
|
||
|
|
var alertInstance = new y2kAlert(
|
||
|
|
"Confirmation",
|
||
|
|
Y2K.TYPE_INFO,
|
||
|
|
"Do you want to continue?",
|
||
|
|
{
|
||
|
|
input: {
|
||
|
|
placeholder: "Type yes"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
);
|
||
|
|
|
||
|
|
alertInstance.addEventListener("submit", function (event) {
|
||
|
|
console.log("User input:", event.detail.value);
|
||
|
|
});
|
||
|
|
|
||
|
|
alertInstance.show();
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|