From c1ebb6cdf7efd7af3b266592478fd0a58d529ea4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 11 Aug 2015 18:37:07 +0300 Subject: [PATCH] update notice/error css classes --- css/tt-rss.css | 93 +++++++++++++++++++++++++----------------- css/utility.css | 70 +++++++++++++++++++------------ include/functions2.php | 9 ++-- 3 files changed, 103 insertions(+), 69 deletions(-) diff --git a/css/tt-rss.css b/css/tt-rss.css index f7d56b31..ac73fece 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -272,58 +272,77 @@ div.filterTestHolder { } #content-insert pre, #headlines-frame pre, .dijitContentPane pre { - margin : 5px 0px 5px 0px; - padding : 10px; - color : #555; - font-family : monospace; - font-size : 12px; - border-width : 0px; - border-color : #ccc; - border-style : solid; - background : #f5f5f5; - display : block; - max-width : 98%; - overflow : auto; + margin: 5px 0px 5px 0px; + padding: 10px; + color: #555; + font-family: monospace; + font-size: 12px; + border-width: 0px; + border-color: #ccc; + border-style: solid; + background: #f5f5f5; + display: block; + max-width: 98%; + overflow: auto; } -div.notice, div.warning, div.error { - padding : 4px 10px 4px 4px; - display : inline-block; - margin : 2px 0px 4px 0px; - font-size : 12px; - border-style : solid; - border-color : #ccc; - border-width : 1px; +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } -div.notice div.inner, div.warning div.inner, div.error div.inner { - vertical-align : middle; +.alert, +.alert h4 { + color: #c09853; } -div.notice { - background : #ecf4ff; - border-color : #88b0f0; +.alert h4 { + margin: 0; } -div.warning { - background : #fff7d5; - border-color : #e7d796;; +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; } -div.error { - background : #ffcccc; - border-color : #ff0000; +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; } -div.warning img, div.notice img, div.error img { - margin : 4px; - vertical-align : middle; +.alert-success h4 { + color: #468847; } -div.warning span, div.notice span, div.error span { - display : table-cell; - vertical-align : middle; +.alert-danger, +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-info h4 { + color: #3a87ad; } ul.nomarks { diff --git a/css/utility.css b/css/utility.css index 77452a9a..fc1d6bc1 100644 --- a/css/utility.css +++ b/css/utility.css @@ -57,45 +57,63 @@ a:hover { color : black; } -div.notice, div.warning, div.error { - padding : 4px 10px 4px 4px; - display : inline-block; - margin : 2px 0px 4px 0px; - font-size : 12px; - border-style : solid; - border-color : #ccc; - border-width : 1px; - box-shadow : inset 0px 0px 2px rgba(0,0,0,0.1); +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } -div.notice div.inner, div.warning div.inner, div.error div.inner { - vertical-align : middle; +.alert, +.alert h4 { + color: #c09853; } -div.notice { - background : #ecf4ff; - border-color : #88b0f0; +.alert h4 { + margin: 0; } -div.warning { - border-color : #EFDC88; - background : #fff7d5; +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; } -div.error { - background : #ffcccc; - border-color : #ff0000; +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; } -div.warning img, div.notice img, div.error img { - margin : 4px; - vertical-align : middle; +.alert-success h4 { + color: #468847; } -div.warning span, div.notice span, div.error span { - display : table-cell; - vertical-align : middle; +.alert-danger, +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-info h4 { + color: #3a87ad; } h1 { diff --git a/include/functions2.php b/include/functions2.php index a6cb019f..781cd067 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -1154,18 +1154,15 @@ } function format_warning($msg, $id = "") { - return "
- $msg
"; + return "
$msg
"; } function format_notice($msg, $id = "") { - return "
- $msg
"; + return "
$msg
"; } function format_error($msg, $id = "") { - return "
- $msg
"; + return "
$msg
"; } function print_notice($msg) {