Преглед изворни кода

make appearance better on mobile

Daniel Sheffield пре 1 година
родитељ
комит
ca6b3c6d1c
3 измењених фајлова са 8 додато и 5 уклоњено
  1. 0 1
      app/rest/filter-item.tpl
  2. 4 4
      app/rest/form.tpl
  3. 4 0
      app/rest/trend.tpl

+ 0 - 1
app/rest/filter-item.tpl

@@ -3,7 +3,6 @@
   type="text"
   id={{fname}}"
   name="{{fname}}"
-  size="{{10 if fname == 'unit' else size}}"
   pattern="((.*\\|)*(.*))?(!(.*\\|)*(.*))?"
   title="Must be of the form include!exclude where include and exclude are | separated lists"
   value="{{fvalue}}" />

+ 4 - 4
app/rest/form.tpl

@@ -1,6 +1,6 @@
 <form id="filter" style="display: inline-flex"  method="{{ method }}" action="{{ action }}">
     <div>
-    <table class="pure-table pure-table-bordered pure-table-striped" style="width: 60vw">
+    <table class="pure-table pure-table-bordered pure-table-striped">
         <thead style="position: sticky; top: 0">
             <tr>
 {{! ''.join( header )}}
@@ -15,7 +15,7 @@
     </table>
     </div>
     <div>
-    <table class="pure-table pure-table-bordered pure-table-striped" style="width: 20vw; position: sticky; top: 0">
+    <table class="pure-table pure-table-bordered pure-table-striped" style="max-width: 32vw; position: sticky; top: 0">
         <thead>
             <tr>
                 <th>Tags</th>
@@ -32,7 +32,7 @@
                         type="text"
                         id="tag"
                         name="tag"
-                        size="26"
+                        size="10"
                         pattern="((.*\\|)*(.*))?(!(.*\\|)*(.*))?"
                         title="Must be of the form include!exclude where include and exclude are | separated lists"
                         value="{{tag}}"
@@ -43,7 +43,7 @@
                         type="text"
                         id="unit"
                         name="unit"
-                        size="10"
+                        size="6"
                         pattern="{{pattern}}"
                         title="Must be one of: {{units}}"
                         value="{{unit}}"

+ 4 - 0
app/rest/trend.tpl

@@ -1,6 +1,10 @@
 <!DOCTYPE html>
 <html>
     <head>
+        <style>
+svg {width: 100vw}
+input {max-width: 22vw}
+        </style>
         <title>Trend</title>
         <meta name="viewport" content="width=device-width, initial-scale=1"/>
         <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous"/>