From c284e7441419f8e2f5195e8577fbc64cedcb5a85 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Sun, 1 Oct 2017 14:24:51 +0200 Subject: [PATCH] Get rid of childish bootstrap alert-styling --- production/views.py | 1 + scipost/static/scipost/assets/css/_alert.scss | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/production/views.py b/production/views.py index ead143d73..168eb2e49 100644 --- a/production/views.py +++ b/production/views.py @@ -152,6 +152,7 @@ def add_event(request, stream_id): prodevent.event = constants.EVENT_HOUR_REGISTRATION prodevent.noted_by = request.user.production_user prodevent.save() + messages.success(request, 'Comment added to Stream.') else: messages.warning(request, 'The form was invalidly filled.') return redirect(reverse('production:production')) diff --git a/scipost/static/scipost/assets/css/_alert.scss b/scipost/static/scipost/assets/css/_alert.scss index 67ca539f4..6b7a7e210 100644 --- a/scipost/static/scipost/assets/css/_alert.scss +++ b/scipost/static/scipost/assets/css/_alert.scss @@ -1,5 +1,5 @@ .alert { - padding: 0.75rem 1.25rem; + padding: 0.75rem 2.5rem 0.75rem 1.25rem; margin-bottom: 0.5rem; position: relative; clear: both; @@ -16,7 +16,6 @@ } } -.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. .alert-dismissible { // Adjust close link position .close { @@ -27,3 +26,15 @@ cursor: pointer; } } + + +@mixin scipost-alert-variant($background, $border, $color) { + background-color: $white; + border-top: 3px solid $color; +} + +@each $color, $value in $theme-colors { + .alert-#{$color} { + @include scipost-alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6)); + } +} -- GitLab