Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: add cursor:pointer for JS dismissable
  • Loading branch information
Christian Kruse committed Jul 9, 2019
1 parent a851688 commit d107ae5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions assets/css/alerts.scss
Expand Up @@ -58,6 +58,10 @@
opacity: 0.2;
}

.cf-js-alert {
cursor: pointer;
}

@include default-breakpoint() {
#alerts-container {
padding-left: 2em;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/modules/alerts.js
Expand Up @@ -33,7 +33,7 @@ alertsContainer.addEventListener("click", ev => {
});

export const alert = (type, text, timeout) => {
const alert = parse(`<div class="cf-${type} cf-alert fade in" role="alert">
const alert = parse(`<div class="cf-${type} cf-alert cf-js-alert fade in" role="alert">
<button type="button" class="close" aria-label=${t("close")}>
<span aria-hidden="true">&times;</span>
</button>
Expand Down
4 changes: 2 additions & 2 deletions lib/cforum_web/templates/layout/alerts.html.eex
@@ -1,6 +1,6 @@
<div id="alerts-container">
<%= if get_flash(@conn, :info) do %>
<div class="cf-success cf-alert fade in" role="alert">
<div class="cf-success cf-alert cf-js-alert fade in" role="alert">
<button type="button" class="close" data-dismiss="cf-alert" aria-label="<%= gettext("close") %>">
<span aria-hidden="true">&times;</span>
</button>
Expand All @@ -9,7 +9,7 @@
</div>
<% end %>
<%= if get_flash(@conn, :error) do %>
<div class="cf-error cf-alert fade in" role="alert">
<div class="cf-error cf-alert cf-js-alert fade in" role="alert">
<button type="button" class="close" data-dismiss="cf-alert" aria-label="<%= gettext("close") %>">
<span aria-hidden="true">&times;</span>
</button>
Expand Down

0 comments on commit d107ae5

Please sign in to comment.