made problems be copied more nicely from the web front end

Sun, 23 Jun 2019 00:26:10 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 23 Jun 2019 00:26:10 +0300
changeset 72
62d0b5b9d797
parent 71
4e24867a0110
child 73
9664583cd1c9

made problems be copied more nicely from the web front end

static/style.css file | annotate | diff | comparison | revisions
templates/webfront.html file | annotate | diff | comparison | revisions
--- a/static/style.css	Sun Jun 23 00:07:55 2019 +0300
+++ b/static/style.css	Sun Jun 23 00:26:10 2019 +0300
@@ -28,6 +28,16 @@
     background-color: #b44;
     border-color: red;
     color: white;
+    background-image: url(../static/hold.svg);
+    background-repeat: no-repeat;
+    background-position: left;
+    background-size: 32px;
+}
+
+.problem-content
+{
+    display: inline-block;
+    padding-left: 40px;
 }
 
 .problems-list li.problem-warning
@@ -35,6 +45,10 @@
     background-color: #def;
     border-color: #024;
     color: black;
+    background-image: url(../static/warning.svg);
+    background-repeat: no-repeat;
+    background-position: left;
+    background-size: 32px;
 }
 
 .problem-icon
@@ -72,3 +86,8 @@
     padding-right: 5%;
     padding-top: 2vh;
 }
+
+.problem-description
+{
+    display: inline-block;
+}
--- a/templates/webfront.html	Sun Jun 23 00:07:55 2019 +0300
+++ b/templates/webfront.html	Sun Jun 23 00:26:10 2019 +0300
@@ -21,16 +21,14 @@
         <ul class="problems-list">
         {% for problem in report['problems'] %}
             <li class="problem-{{problem['severity']}}">
-                <img
-                    src="static/{{problem['severity']}}.svg"
-                    width="32" height="32"
-                    class="problem-icon"
-                />
-                {{problem.severity}}:
+                <div class='problem-content'>
+                <div class='problem-description'>
                 Line {{problem.line_number}}:
-                {{problem.message_str}}
+                {{problem.message_str}} &mdash; {{problem.severity.upper()}}
                 <br />
                 <span class="ldraw-code">{{problem.ldraw_code}}</span>
+                </div>
+                </div>
             </li>
         {% endfor %}
         </ul>

mercurial