# Call to get uptime info for template.
_UPTIME = %x[uptime]
# Call to get current date for template.
_DATE =%x[date +%Y-%m-%d]

# Main page.
%{
	<HTML> <HEAD> <!-- This HTML file has been created by a ruby servlet -->
	<TITLE>Camera Single Live View</TITLE>
	<link rel="stylesheet" type="text/css" href="/style.css">
	<SCRIPT type="text/javascript">
	<!--
	function reloadImage(){
		if (document.getElementById("myImage")){
			var tempImage = document.getElementById("myImage").src.split("&");
			document.getElementById("myImage").src = tempImage[0]+"&rand="+ Math.random();
			setTimeout("reloadImage()", #{image_sleep}*1000);
		}
	}
	//-->
	</SCRIPT>
	</HEAD>
	<BODY onload="reloadImage();">
	<TABLE border="1" cellpadding="5" >
		<TBODY>
			<TR>
				<TD align="center">
					<A HREF="/"><img src="ifetch.png" align="left" width=50 heigth=50></A>
					#{_DATE}
					#{_UPTIME}
					<BR>
					<FONT size=+1>Cam #{cameraName} #{image_alt}</FONT>
					<BR>
					<a href="/archive" >Archive</a> <a href="/live" >Live</a> <a href="/monitor" >Monitor</a>
				</TD>
			</TR>
		</TBODY>
	</TABLE>
	#{myTempRespond}
	<br>version: #{VER}
	</BODY>
	</HTML>
}
