mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 02:54:20 +00:00
core: improve alert and info boxes
Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
parent
5c709a5416
commit
4ca3aebc77
@ -47,7 +47,7 @@ class ComTest(TestCase):
|
|||||||
"""})
|
"""})
|
||||||
r = self.client.get(reverse("core:index"))
|
r = self.client.get(reverse("core:index"))
|
||||||
self.assertTrue(r.status_code == 200)
|
self.assertTrue(r.status_code == 200)
|
||||||
self.assertTrue("""<div id="alert_box">\\n <div class="markdown"><h3>ALERTE!</h3>\\n<p><strong>Caaaataaaapuuuulte!!!!</strong></p>""" in str(r.content))
|
self.assertTrue("""<div id="alert_box">\\n <div class="markdown"><h3>ALERTE!</h3>\\n<p><strong>Caaaataaaapuuuulte!!!!</strong></p>""" in str(r.content))
|
||||||
|
|
||||||
def test_info_msg(self):
|
def test_info_msg(self):
|
||||||
response = self.client.post(reverse("com:info_edit"), {"info_msg": """
|
response = self.client.post(reverse("com:info_edit"), {"info_msg": """
|
||||||
@ -55,4 +55,4 @@ class ComTest(TestCase):
|
|||||||
"""})
|
"""})
|
||||||
r = self.client.get(reverse("core:index"))
|
r = self.client.get(reverse("core:index"))
|
||||||
self.assertTrue(r.status_code == 200)
|
self.assertTrue(r.status_code == 200)
|
||||||
self.assertTrue("""<div id="info_box">\\n <div class="markdown"><h3>INFO: <strong>Caaaataaaapuuuulte!!!!</strong></h3>""" in str(r.content))
|
self.assertTrue("""<div id="info_box">\\n <div class="markdown"><h3>INFO: <strong>Caaaataaaapuuuulte!!!!</strong></h3>""" in str(r.content))
|
||||||
|
BIN
core/static/core/img/info.png
Normal file
BIN
core/static/core/img/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
BIN
core/static/core/img/warning.png
Normal file
BIN
core/static/core/img/warning.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -171,7 +171,7 @@ header {
|
|||||||
#info_boxes {
|
#info_boxes {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 0 auto;
|
margin: 1em auto;
|
||||||
p {
|
p {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
@ -180,20 +180,30 @@ header {
|
|||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
flex: auto;
|
flex: auto;
|
||||||
vertical-align: top;
|
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
margin: 0.2em 1.5%;
|
margin: 0.2em 1.5%;
|
||||||
min-width: 10%;
|
min-width: 10%;
|
||||||
max-width: 46%;
|
max-width: 46%;
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
|
&:before {
|
||||||
|
float: left;
|
||||||
|
margin: 0.2em;
|
||||||
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#info_box {
|
#info_box {
|
||||||
border: solid 1px $primary-neutral-light-color;
|
border: solid 1px $primary-neutral-light-color;
|
||||||
background: $white-color;
|
background: $white-color;
|
||||||
|
&:before {
|
||||||
|
content: url('img/info.png');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#alert_box {
|
#alert_box {
|
||||||
border: solid 1px grey;
|
border: solid 1px grey;
|
||||||
background: gold;
|
background: gold;
|
||||||
|
&:before {
|
||||||
|
content: url('img/warning.png');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +213,7 @@ header {
|
|||||||
nav {
|
nav {
|
||||||
display: block;
|
display: block;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 0px auto;
|
margin: 1em auto 0em auto;
|
||||||
background: $primary-color;
|
background: $primary-color;
|
||||||
color: $white-color;
|
color: $white-color;
|
||||||
a {
|
a {
|
||||||
|
Loading…
Reference in New Issue
Block a user