Skip to content

Commit

Permalink
[#111] Remove dependency on Bootstrap's alert style
Browse files Browse the repository at this point in the history
  • Loading branch information
cyChop committed Nov 23, 2016
1 parent f447873 commit 5c4b7ea
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/js/template/beverages.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="beverages-container">
<div rv-class-up="error | toBoolean | not" class="alert alert-danger slide" role="alert">
<div rv-class-up="error | toBoolean | not" class="bubble error slide" role="alert">
<i class="icon-error"></i> {error}
</div>
<div rv-class-up="ready | or error" class="alert alert-info slide">
<div rv-class-up="ready | or error" class="bubble info slide">
<i class="icon icon-loading spin"></i> {i18n.loading}
</div>
<div rv-class-up="ready | not | or error" class="slide">
Expand Down Expand Up @@ -68,7 +68,7 @@ <h6 rv-if="orders:total | eq 0" class="dropdown-header">{i18n.orders.none}</h6>
<input type="text" class="form-control" id="field-text-search" rv-value="filters:text"/>
</div>
</div>
<div class="slide alert alert-info" role="alert" rv-class-up="beverages._shown | eq 0 | not">
<div class="slide bubble info" role="alert" rv-class-up="beverages._shown | eq 0 | not">
<i class="icon-info"></i> {i18n.error.empty}
</div>
<div class="beverage slide" rv-class-up="b._show | not" rv-addclass="b:basis" rv-class-detailed="b._detailed"
Expand Down
2 changes: 1 addition & 1 deletion src/scss/_bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
//@import "node_modules/bootstrap/scss/pagination";
@import "node_modules/bootstrap/scss/tags";
//@import "node_modules/bootstrap/scss/jumbotron";
@import "node_modules/bootstrap/scss/alert";
//@import "node_modules/bootstrap/scss/alert";
//@import "node_modules/bootstrap/scss/progress";
//@import "node_modules/bootstrap/scss/media";
//@import "node_modules/bootstrap/scss/list-group";
Expand Down
5 changes: 5 additions & 0 deletions src/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ $moment-icons: (
unknown: $icon-question
);

$bubble-variants: (
info: map-get(map-get($bev-variants, tea-oolong), color),
error: map-get(map-get($bev-variants, tea-rooibos), color)
);

$white: #fff;
$border-color: #ccc;
$bev-icon-back-color: #666;
14 changes: 14 additions & 0 deletions src/scss/beverages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,20 @@
}
}

//* Information messages */
.bubble {
margin: 5px;
padding: 15px;
font-size: 1.5rem;

@each $type, $color in $bubble-variants {
&.#{$type} {
background-color: $color;
color: tint($color, 90%);
}
}
}

//* Utility classes */
.tag {
@each $bev-variant, $icon-map in $bev-variants {
Expand Down

0 comments on commit 5c4b7ea

Please sign in to comment.