Browse Source

make flashes dismissible.

master
Ben Kurtovic 4 years ago
parent
commit
a28c3d8635
2 changed files with 16 additions and 0 deletions
  1. +5
    -0
      static/main.css
  2. +11
    -0
      static/main.js

+ 5
- 0
static/main.css View File

@@ -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;


+ 11
- 0
static/main.js View File

@@ -14,6 +14,17 @@ $(function() {
return false;
});

// Allow user to dismiss flashes:
$("#flashes > div").each(function() {
$(this).prepend($("<a>", {
addClass: "dismiss",
href: "#"
}).html("[&times;]").click(function() {
$(this).parent().remove();
return false;
}));
});

// Toggle character options on click:
var charopts = $("#character-options");
charopts.hide();


Loading…
Cancel
Save