소스 검색

make flashes dismissible.

master
Ben Kurtovic 7 년 전
부모
커밋
a28c3d8635
2개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. +5
    -0
      static/main.css
  2. +11
    -0
      static/main.js

+ 5
- 0
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;


+ 11
- 0
static/main.js 파일 보기

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


불러오는 중...
취소
저장