diff --git a/static/main.css b/static/main.css index 494926e..1769fd3 100644 --- a/static/main.css +++ b/static/main.css @@ -224,6 +224,11 @@ footer ul li:not(:last-child)::after { background-color: rgba(255, 60, 30, 0.2); } +#flashes .dismiss { + float: right; + margin: 0 0 0.5em 0.5em; +} + #character-portrait { position: relative; display: inline-block; diff --git a/static/main.js b/static/main.js index 45be54a..a26ea39 100644 --- a/static/main.js +++ b/static/main.js @@ -14,6 +14,17 @@ $(function() { return false; }); + // Allow user to dismiss flashes: + $("#flashes > div").each(function() { + $(this).prepend($("", { + addClass: "dismiss", + href: "#" + }).html("[×]").click(function() { + $(this).parent().remove(); + return false; + })); + }); + // Toggle character options on click: var charopts = $("#character-options"); charopts.hide();