]> git.plutz.net Git - serve0/blobdiff - templates/view.html.sh
html/css cleanup
[serve0] / templates / view.html.sh
index 42f74ac08ee029e2c8878da607f9632be81baf81..b2856a52fc1508ad5e72d0ffdddd97f34903314f 100755 (executable)
@@ -2,9 +2,9 @@
 
 cat <<viewEND
   <div class="panel" id="videoview">
-    <span style="float:right;"><a href="#" onclick="javascript:hide_block('videoview');" class="panel">Dismiss</a></span>
+    <a href="#" onclick="javascript:hide('videoview');" class="panel">Dismiss</a>
     <div class="video">
-      <a href="$video">Full</a> <!-- a href="$reenc">Mobile</a --><br>
+      <a href="$video">Full</a> <!-- a href="$reenc">Mobile</a -->
       <!--iframe src="$video" width="100%" height="400px"-->
       <video controls>
         <!-- source src="$reenc" type='video/webm; codecs="vp8.0, mp3"' -->
@@ -13,40 +13,47 @@ cat <<viewEND
     </div>
   
     <div class="videoinfo" id="viewmeta">
-      <b>$info</b><a class="panel" href="#" onclick="javascript:hide_inline('viewmeta');show_inline('editmeta')">Edit</a><br>
-      <span class="coord">$(($length / 60)):$(($length % 60)) min</span>
-      <span class="coord">Width: $width</span><span class="coord">Height: $height</span><br>
-      <br><br>Tags:<span class="tag">$(sed 's,|$,,;s,|,</span> <span class="tag">,g' <<<"$tags")</span>
-      <br><br>$(_wiki <<<"$description")
+      <h2>$info</h2>
+      <a class="meta edit" href="#" onclick="javascript:hide('viewmeta');show_iblock('editmeta')">Edit</a>
+
+      <span class="info property">$(($length / 60)):$(($length % 60)) min</span>
+      <span class="info property">Width: $width</span>
+      <span class="info property">Height: $height</span><br>
+
+      <span class="label tags">Tags:</span>
+      $(echo "$tags" |sed -r 's:\|*([^|]+)\|*:<span class="info tag">\1</span>:g')
+      $([ -n "$description" ] && echo "<span class=\"info description\">$(_wiki <<<"$description")</span>")
     </div>
   
-    <div class="videoinfo" id="editmeta" style="display: none;">
-      <form action="?action=meta&amp;i=$info" method="post" accept-charset="UTF-8">
-        <input type="hidden" name="f" value="$filter"> <input type="hidden" name="s" value="$search"> <input type="hidden" name="p" value="$page"> <input type="hidden" name="o" value="$order">
-        <input type="hidden" name="length" value="$length"> <input type="hidden" name="width" value="$width">
-        <input type="hidden" name="height" value="$height">
-        <b>$info</b><a class="panel" href="#" onclick="javascript:hide_inline('editmeta');show_inline('viewmeta')">Cancel</a><br>
-        <span class="coord">$(($length / 60)):$(($length % 60)) min</span>
-        <span class="coord">Width: $width</span><span class="coord">Height: $height</span><br><br>
+    <form class="videoinfo" id="editmeta" style="display: none;"
+          action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
+      <input type="hidden" name="length" value="$length">
+      <input type="hidden" name="width" value="$width">
+      <input type="hidden" name="height" value="$height">
+
+      <h2>$info</h2>
+      <a class="meta cancel" href="#" onclick="javascript:hide('editmeta');show_iblock('viewmeta')">Cancel</a>
+
+      <span class="info property">$(($length / 60)):$(($length % 60)) min</span>
+      <span class="info property">Width: $width</span>
+      <span class="info property">Height: $height</span>
   
-        <div>
-          Tags:<br>
-          <select name="tag" size="16" multiple>
-            $(echo "$taglist" |while read line; do
-              echo "<option $(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && echo -n selected)>$line</option>"
-            done)
-          </select><br>
-        </div><div>
-          Additional Tags (one per line):<br>
-          <textarea name="tags" rows="16" style="width: 99%"></textarea><br><br>
-        </div>
-        Description:<br>
-        <textarea name="description" rows="4" style="width: 99%">$description</textarea><br>
-        <input type="submit" value="Submit">
-        <input type="submit" name="trash" value="Delete Video">
-        <!-- input type="submit" name="cancel" value="Cancel" -->
-      </form>
-    </div>
+      <span class="label tags">Tags:</span>
+      <select class="edit tags" name="tag" size="16" multiple>
+        $(echo "$taglist" |while read line; do
+          echo "<option $(egrep -q "(^|.*\|)$line(\|.*|$)" "$meta" && echo -n selected)>$line</option>"
+        done)
+      </select>
+
+      <span class="label moretags">Additional Tags (one per line):</span>
+      <textarea class="edit moretags" name="tags" rows="4"></textarea>
+
+      <span class="label description">Description:</span>
+      <textarea class="edit description" name="description" rows="4">$description</textarea>
+      <input type="submit" value="Submit">
+      <input type="submit" name="trash" value="Delete Video">
+      <!-- input type="submit" name="cancel" value="Cancel" -->
+    </form>
   </div>
 viewEND