9 changed files with 116 additions and 14 deletions
-
1README.md
-
4TODO.md
-
57app/assets/stylesheets/toastify.css
-
18app/javascript/controllers/flash_controller.js
-
2app/views/layouts/application.html.erb
-
9app/views/layouts/components/_flash.html.erb
-
4app/views/layouts/components/_navbar.html.erb
-
24app/views/notification/index.html.erb
-
11vendor/javascript/toastify-js.js
@ -1,4 +1,6 @@ |
|||
TODO |
|||
==== |
|||
|
|||
* [ ] resolve daisyui and daisyui-theme via importmap |
|||
* [ ] resolve daisyui and daisyui-theme via importmap |
|||
* [ ] use a simpler toast library |
|||
* [ ] https://codeshack.io/elegant-toast-notifications-javascript/ |
@ -0,0 +1,57 @@ |
|||
.toastify { |
|||
display: inline-block; |
|||
position: fixed; |
|||
opacity: 0; |
|||
transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1); |
|||
cursor: pointer; |
|||
max-width: calc(50% - 20px); |
|||
z-index: 1000; |
|||
} |
|||
|
|||
.toastify.on { |
|||
opacity: 1; |
|||
} |
|||
|
|||
.toast-close { |
|||
background: transparent; |
|||
cursor: pointer; |
|||
opacity: 0.4; |
|||
padding: 0 0 0 2em; |
|||
} |
|||
|
|||
.toastify-right { |
|||
right: 15px; |
|||
} |
|||
|
|||
.toastify-left { |
|||
left: 15px; |
|||
} |
|||
|
|||
.toastify-top { |
|||
top: -150px; |
|||
} |
|||
|
|||
.toastify-bottom { |
|||
bottom: -150px; |
|||
} |
|||
|
|||
.toastify-center { |
|||
margin-left: auto; |
|||
margin-right: auto; |
|||
left: 0; |
|||
right: 0; |
|||
max-width: fit-content; |
|||
max-width: -moz-fit-content; |
|||
} |
|||
|
|||
@media only screen and (max-width: 360px) { |
|||
|
|||
.toastify-right, |
|||
.toastify-left { |
|||
margin-left: auto; |
|||
margin-right: auto; |
|||
left: 0; |
|||
right: 0; |
|||
max-width: fit-content; |
|||
} |
|||
} |
11
vendor/javascript/toastify-js.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue