diff options
| author | Shulhan <ms@kilabit.info> | 2021-09-05 22:46:05 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-09-05 22:46:05 +0700 |
| commit | e3da79cf1adfb6dc2d9fed2e982bcde7fe7a7161 (patch) | |
| tree | 74b71ed9f9c3b58d93269a9cda32729a9c679d2a /notif/example.html | |
| parent | 903561a9074da0632e1e001db3879cc45f974493 (diff) | |
| download | pakakeh.ts-e3da79cf1adfb6dc2d9fed2e982bcde7fe7a7161.tar.xz | |
notif: convert the example using TypeScript and load it with type="module"
Diffstat (limited to 'notif/example.html')
| -rw-r--r-- | notif/example.html | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/notif/example.html b/notif/example.html deleted file mode 100644 index b1211b0..0000000 --- a/notif/example.html +++ /dev/null @@ -1,51 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="UTF-8" /> - <title>WUI - notif</title> - <style> - #input_msg { - width: calc(100% - 1em); - height: 4em; - } - .empty { - height: 100vh; - } - </style> - </head> - <body onload="main()"> - <p class="empty">Empty spaces.</p> - <textarea id="input_msg"></textarea> - <button onclick="notifInfo()">Info</button> - <button onclick="notifError()">Error</button - <p></p> - <script> - var exports = {} - let inputMsg = document.getElementById("input_msg") - let wuiNotif = null - </script> - <script src="notif.js"></script> - <script> - function main() { - wuiNotif = new WuiNotif() - inputMsg.value = `Hello world, this is a notification with HTML format using <b>bold</b> and <u>underline</u> words.` - - let previewError = document.createElement("div") - previewError.classList.add(`${WUI_NOTIF_CLASS_ERROR}`) - previewError.innerText = `Preview of error style`; - document.body.appendChild(previewError) - - let previewInfo = document.createElement("div") - previewInfo.classList.add(`${WUI_NOTIF_CLASS_INFO}`) - previewInfo.innerText = `Preview of info style`; - document.body.appendChild(previewInfo) - } - function notifInfo() { - wuiNotif.Info(inputMsg.value) - } - function notifError() { - wuiNotif.Error(inputMsg.value) - } - </script> - </body> -</html> |
