diff --git a/umap/static/umap/img/alert-icon-error.svg b/umap/static/umap/img/alert-icon-error.svg new file mode 100644 index 00000000..a4aeec46 --- /dev/null +++ b/umap/static/umap/img/alert-icon-error.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/umap/static/umap/img/alert-icon-info.svg b/umap/static/umap/img/alert-icon-info.svg new file mode 100644 index 00000000..16a9195a --- /dev/null +++ b/umap/static/umap/img/alert-icon-info.svg @@ -0,0 +1,4 @@ + + + + diff --git a/umap/static/umap/img/alert-icon-success.svg b/umap/static/umap/img/alert-icon-success.svg new file mode 100644 index 00000000..0007889a --- /dev/null +++ b/umap/static/umap/img/alert-icon-success.svg @@ -0,0 +1,3 @@ + + + diff --git a/umap/static/umap/img/icon-external-link.svg b/umap/static/umap/img/icon-external-link.svg new file mode 100644 index 00000000..028212ec --- /dev/null +++ b/umap/static/umap/img/icon-external-link.svg @@ -0,0 +1,3 @@ + + + diff --git a/umap/static/umap/js/components/alerts/alert.css b/umap/static/umap/js/components/alerts/alert.css index 70f0ba2d..da1b92db 100644 --- a/umap/static/umap/js/components/alerts/alert.css +++ b/umap/static/umap/js/components/alerts/alert.css @@ -5,7 +5,7 @@ padding: var(--panel-gutter); position: absolute; box-shadow: 0 1px 7px #999999; - background: none repeat scroll 0 0 var(--color-darkGray); + background: var(--color-darkGray); font-weight: bold; color: #fff; font-size: 0.8em; @@ -19,14 +19,47 @@ transform: translate(-50%, 0); min-width: 80%; } +[role="dialog"] > div { + margin: 0 auto; + min-width: 60%; + background-size: 20px; + background-position: 0 15px; + padding-left: 28px; +} +[role="dialog"][data-level="info"] > div { + background-image: url('../../../img/alert-icon-info.svg'); + background-repeat: no-repeat; +} +[role="dialog"][data-level="success"] > div { + background-image: url('../../../img/alert-icon-success.svg'); + background-repeat: no-repeat; +} +[role="dialog"][data-level="error"] > div { + background-image: url('../../../img/alert-icon-error.svg'); + background-repeat: no-repeat; +} [role="dialog"][data-level="error"] { - background-color: var(--color-red); + background-color: var(--color-darkRed); } [role="dialog"] a { text-decoration: underline; } -[role="dialog"] > div { - margin: 0 auto; +[role="dialog"] label { + font-size: .8rem; + font-weight: normal; +} +[role="dialog"] a[target="_blank"] { + background: url('../../../img/icon-external-link.svg') no-repeat right center; + padding-right: 14px; + background-size: 12px; +} +h3[role="alert"] { + margin-bottom: 0; + margin-top: 1rem; + line-height: initial; +} +h3[role="alert"] + p { + margin-top: 0; } [role="group"] { display: inline-flex; @@ -48,7 +81,7 @@ margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; - width: 33%; + width: 45%; } [role="group"] input[type="submit"] { background: var(--color-darkGray); @@ -93,6 +126,10 @@ #link-wrapper { margin-bottom: 1rem; } +[role="dialog"] #conflict-wrapper a[target="_blank"] { + background-position-y: 16px; +} + #conflict-wrapper form { display: flex; justify-content: space-around; @@ -101,7 +138,7 @@ width: initial; background: inherit; color: var(--color-light); - border: 1px solid var(--color-red); + border: 1px solid var(--color-light); font-weight: bold; } #conflict-wrapper form [type="submit"]:hover { diff --git a/umap/static/umap/js/components/alerts/alert.html b/umap/static/umap/js/components/alerts/alert.html index b65cfdde..44b452d3 100644 --- a/umap/static/umap/js/components/alerts/alert.html +++ b/umap/static/umap/js/components/alerts/alert.html @@ -22,26 +22,26 @@