-#!/bin/zsh
-
-cat <<viewEND
- <div class="panel" id="videoview">
- <span style="float:right;"><a href="#" onclick="javascript:hide_block('videoview');" class="panel">Dismiss</a></span>
- <div class="video">
- <a href="$video">Full</a> <!-- a href="$reenc">Mobile</a --><br>
- <!--iframe src="$video" width="100%" height="400px"-->
- <video controls>
- <!-- source src="$reenc" type='video/webm; codecs="vp8.0, mp3"' -->
- <source src="$video" type='video/mp4; codecs="avc1.4D401E, mp3"'>"
- </video><!--/iframe-->
- </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")
- </div>
-
- <div class="videoinfo" id="editmeta" style="display: none;">
- <form action="?action=meta&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>
+# Copyright 2014 - 2016 Paul Hänsch
+#
+# This file is part of Serve0
+#
+# Serve0 is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Serve0 is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with Serve0 If not, see <http://www.gnu.org/licenses/>.
+
+cat <<EOF
+<input type=radio name=topmenu id=btn_search checked><label for=btn_search>Search</label>
+<form class="panel" id="search" action="?" method="get" accept-charset="UTF-8">
+ <input type="text" name="s" value="$search" placeholder="Search">
+
+ <select class="order" size="1" name="o" id="o1">
+ <option class="label" selected disabled>Order by</option>
+ <option>Name</option>
+ <option>Date</option>
+ <option>Length</option>
+ </select>
+ <!-- input type="submit" name="submit" value="Find" -->
+
+ <a class="panel" href="${info:+?p=list&${page_this}}${directory:+?p=browse&d=${directory}&${page_this}}#$(urlsafe $info)">Dismiss</a>
+</form>
+
+<input type=radio name=topmenu id=btn_preferences><label for=btn_preferences>Preferences</label>
+ $(. $_EXEC/templates/preferences.html.sh)
+
+<input type=radio name=topmenu id=btn_morelinks><label for=btn_morelinks>{+}</label>
+<div class="panel switchable top" id="morelinks">
+ <a class="panel toggle" href="#">Hide</a>
+
+ <a class="panel listview" href="?p=list">Index view</a>
+ <a class="panel treeview" href="?p=browse">Browse Folders</a>
+</div>
+
+
+<div id="videoview">
+ <h1>$(htmlsafe "$info")</h1>
+
+ <a href="$(urlsafe "$video")">Download</a>
+ <a href="/?p=stereoview&r=180&i=$(urlsafe "$info")">View 180º Steroscopic</a>
+ <a href="/?p=stereoview&r=360&i=$(urlsafe "$info")">View 360º Steroscopic</a>
+ <video autoplay controls>
+ <source src="$(urlsafe "$video")" type='video/mp4; codecs="avc1.4D401E, mp3"'>"
+ </video>
+
+ <span class="info length">$(printf "%d:%02d min" $(($length / 60)) $(($length % 60)) )</span>
+ <span class="info width" >Width: $width</span>
+ <span class="info height">Height: $height</span><br>