MovieNight/static/main.html
2020-06-06 17:54:37 -07:00

120 lines
4.8 KiB
HTML

{{define "header"}}
<script>pageTitle = {{ .Title }}</script>
{{if .Chat}}
<script type="application/javascript" src="/static/js/wasm_exec.js"></script>
<script type="application/javascript" src="/static/js/chat.js"></script>
<script>
maxMessageCount = {{.MessageHistoryCount }}
</script>
{{end}}
{{if .Video}}
<script type="application/javascript" src="/static/js/flv.min.js"></script>
<script type="application/javascript" src="/static/js/video.js"></script>
{{end}}
{{/* end define header */}}
{{end}}
{{define "body"}}
{{ if and .Chat .Video }}
<div class="grid-root combined">
{{ else if .Video }}
<div class="grid-root video-only">
{{ else }}
<div class="grid-root">
{{ end }}
{{if .Video}}
<div id="videoWrapper">
<div id="videoOverlay">
<img src="/static/img/mute-icon.png" />
</div>
<video id="videoElement" x5-video-player-type="h5" x5-video-player-fullscreen="true" playsinline webkit-playsinline
autoplay muted controls>
Your browser is too old and doesn't support HTML5 video.
</video>
</div>
{{end}}
{{if .Chat}}
<div id="loadingFiles" class="contrast">
Files Loading
</div>
<div id="chatwindow">
<div id="notifyBox"></div>
<div id="chat" style="display: none;">
<div id="optionBox">Please hover to view options</div>
<div id="hidden">
<div id="chatButtons">
<input type="button" class="button pretty-button" onclick="auth();" value="Auth" />
<input type="button" class="button pretty-button" onclick="help();" value="Help" />
<input type="button" class="button pretty-button" onclick="showColors();" value="Color" />
<input type="button" class="button pretty-button" onclick="nick();" value="Nick" />
{{if .Video}}
<input type="button" class="button pretty-button" onclick="initPlayer();" value="Reload Player" />
{{end}}
</div>
<hr />
<label class="contrast">
<input type="checkbox" checked="false" onchange="setTimestamp(this.checked);" />
Show Timestamp
</label>
<hr />
<div id="hiddencolor" class="hiddendiv">
<div class="range-div" style="background-image: linear-gradient(to right, transparent, red);">
<input id="colorRed" type="range" min="0" max="255" value="0" oninput="updateColor();" />
<span id="colorRedLabel"></span>
</div>
<div class="range-div" style="background-image: linear-gradient(to right, transparent, green);">
<input id="colorGreen" type="range" min="0" max="255" value="0" oninput="updateColor();" />
<span id="colorGreenLabel"></span>
</div>
<div class="range-div" style="background-image: linear-gradient(to right, transparent, blue);">
<input id="colorBlue" type="range" min="0" max="255" value="0" oninput="updateColor();" />
<span id="colorBlueLabel"></span>
</div>
<div class="range-div">
<select id="colorSelect" onchange="colorSelectChange();"></select>
</div>
<div id="colorName" class="range-div">
NAME
</div>
<div id="colorWarning" class="range-div contrast">
</div>
<dvi class="range-div">
<input id="colorSubmit" type="button" class="button pretty-button" value="Select"
onclick="changeColor();" />
</dvi>
</div>
</div>
<a id="playing" target="_blank"></a>
<div id="messages" class="scrollbar"></div>
<div id="msgbox">
<div id="suggestions" class="scrollbar" style="display: none;"></div>
<textarea id="msg"></textarea>
</div>
<input id="send" type="button" class="button" onclick="sendChat();" value="Send" />
<div>
<!-- This is an empty div so there can be an empty space below the send button -->
</div>
</div>
<div id="joinbox">
<div style="color: #e5e0e5; text-align: center;">Please enter your name<br />to join the chat</div>
<div>
<input id="name" type="text" maxlength="36">
<input id="join" type="button" class="button pretty-button" onclick="join();" value="Join" />
{{if .Video}}
<div style="display: flex; flex-direction: column; align-items: center;">
<a href="/chat">Chat Only</a>
<a href="/video">Video Only</a>
<a href="/video" onclick="window.open('/chat', '_blank');">Both Separately</a>
</div>
{{end}}
</div>
</div>
</div>
{{end}}
{{end}}