Pārlūkot izejas kodu

displaying nicely, still working on details, highlighting and capturing input data

bscheibel 4 gadi atpakaļ
vecāks
revīzija
5ed2a872e4
2 mainītis faili ar 80 papildinājumiem un 70 dzēšanām
  1. 34 16
      app/static/css/style.css
  2. 46 54
      app/templates/show_image.html

+ 34 - 16
app/static/css/style.css

@@ -1,12 +1,12 @@
 body {
-  background-color: #f1f1f1;
+  background-color: #f2f2f2;
 }
-.column {
+/*.column {
   float: left;
   width: 50%;
-}
+}'/
 /* Split the screen in half */
-.split {
+/*.split {
   height: 100%;
   width: 50%;
   position: fixed;
@@ -17,15 +17,19 @@ body {
 }
 
 /* Control the left side */
-.left {
+/*.left {
   left: 0;
   background-color: white;
 }
 
 /* Control the right side */
-.right {
+/*.right {
   right: 0;
-  background-color: #f1f1f1;
+  background-color: white;
+}
+.column {
+  float: left;
+  width: 33.33%;
 }
 .top {
   height: 50vh;
@@ -35,7 +39,7 @@ body {
 .bottom {
   height: 50vh;
   background-color: #f1f1f1;
-}
+}*/
 /* If you want the content centered horizontally and vertically */
 .centered {
   position: absolute;
@@ -58,16 +62,30 @@ body {
         border: 3px solid black;
         border-collapse: collapse;
 }
-.indent {
-    margin-left: 10
-}
-.text {
-    font-size: 2px;
-    font-size: 1vw;
-}
+
 /* Style the image inside the centered container, if needed */
 .centered img {
   max-width: 140%;
-  /*border-radius: 50%;
 }
 
+.container {
+    display: flex;
+}
+
+.column {
+    flex: 1;
+
+    /*for demo purposes only */
+    background: #f2f2f2;
+    border: 1px solid #e6e6e6;
+    box-sizing: border-box;
+}
+.column-one {
+    order: 1;
+}
+.column-two {
+    order: 2;
+}
+.column-three {
+    order: 3;
+}

+ 46 - 54
app/templates/show_image.html

@@ -5,62 +5,54 @@
 </head>
 
 <body>
-<div class="split left">
-<div class="header_centered">
-  <h1>Drawing</h1>
-           <p><a  href="http://localhost:5000/"> Upload another drawing </a></p>
-</div>
-  <div class="centered">
-
-    {% if filename %}
-      <img src="{{ url_for('send_file', filename=filename) }}"/>
-    {% else %}
-      <h1>no image for whatever reason</h1>
-    {% endif %}
-
-  </div>
-</div>
-
-<div class="split right">
-  <div class="top">
-      <h1>Extracted Tolerances</h1>
-            <font size="1" face="Courier New" >
-            <table>
-                <tr>
-                  <td><h2>Important?</h2></td>
-                  <td><h2>Target Values</h2></td>
-                  <td><h2>Actual Values</h2></td>
-                </tr>
-                {% for d in dims %}
-                <tr>
-                        <td><input type="checkbox" name="check" value="checked"></td>
-                        <td> {{ d }}</td>
-                        <td><input type="text" name="actual"></td>
-                </tr>
-                {% endfor %}
-        </table>
-        </font>
-    </div>
-
-
-  <div class="bottom indent">
-    <div style="text-indent:50px;">
-      <h1>Additional Requirements:</h1>
-      <div style="text-indent:20px">
-      <table>
-
-        {% for k in isos %}
-                <tr>
-                        <td><a href="{{ url_for('generate', name=k) }}" > {{ k }} </a> </td>
-                </tr>
-        {% endfor %}
-      </table>
+<!--<div class="split left">-->
+<div class="container">
+    <div class="column column-one">
+            <h1>Drawing</h1>
+            <p> <a href="http://localhost:5000/"> Upload another drawing </a> </p>
+        {% if filename %}
+        <img src="{{ url_for('send_file', filename=filename) }}"/>
+        {% else %}
+        <h1>no image for whatever reason</h1>
+        {% endif %}
     </div>
+<!--<div class="split middle">-->
+    <div class="column column-two">
+            <h1>Extracted Measurements</h1>
+                <font size="3" face="Courier New" >
+                <form method="post" action="">
+                <table>
+                    <tr>
+                        <td style="text-align:center"><h3>Key Value</h3></td>
+                        <td style="text-align:center"><h3>Target Value</h3></td>
+                        <td style="text-align:center"><h3>Correct</h3></td>
+                        <td style="text-align:center"><h3>Actual Value</h3></td>
+                    </tr>
+                    {% for d in dims %}
+                    <tr>
+                        <td style="text-align:center"><input type="checkbox" name="check" value="checked"></td>
+                        <td style="text-align:center"> {{ d }}</td>
+                        <td style="text-align:center"><input type="checkbox" name="check" value="checked"></td>
+                        <td style="text-align:center"><input type="text" name="actual" size="10"></td>
+                    </tr>
+                    {% endfor %}
+
+
+                </table>
+                    <button type="button" >Submit</button>
+                </form>
+                </font>
     </div>
+    <!--<div class="split right">-->
+    <div class="column column-three">
+            <h1>Additional Infos:</h1>
+                <table>
+                    {% for k in isos %}
+                     <tr>
+                        <td><a href="{{ url_for('generate', name=k) }}" > {{ k }} </a> </td>
+                    </tr>
+                {% endfor %}
+                </table>
     </div>
 </div>
-
-
 </body>
-
- <!--<img src="{{ url_for('send_file', filename=filename) }}" type="application/pdf" /-->