adjustable toast position

This commit is contained in:
ed 2023-02-02 22:28:31 +00:00
parent bc339f774a
commit 405f3ee5fe
2 changed files with 12 additions and 8 deletions

View file

@ -42,6 +42,10 @@ html {
text-shadow: 1px 1px 0 #000; text-shadow: 1px 1px 0 #000;
color: #fff; color: #fff;
} }
#toast.top {
top: 2em;
bottom: unset;
}
#toast a { #toast a {
color: inherit; color: inherit;
text-shadow: inherit; text-shadow: inherit;

View file

@ -1280,17 +1280,17 @@ var toast = (function () {
r.tag = tag; r.tag = tag;
}; };
r.ok = function (sec, txt, tag) { r.ok = function (sec, txt, tag, cls) {
r.show('ok', sec, txt, tag); r.show('ok ' + (cls || ''), sec, txt, tag);
}; };
r.inf = function (sec, txt, tag) { r.inf = function (sec, txt, tag, cls) {
r.show('inf', sec, txt, tag); r.show('inf ' + (cls || ''), sec, txt, tag);
}; };
r.warn = function (sec, txt, tag) { r.warn = function (sec, txt, tag, cls) {
r.show('warn', sec, txt, tag); r.show('warn ' + (cls || ''), sec, txt, tag);
}; };
r.err = function (sec, txt, tag) { r.err = function (sec, txt, tag, cls) {
r.show('err', sec, txt, tag); r.show('err ' + (cls || ''), sec, txt, tag);
}; };
return r; return r;