<html>
<head>
<title><%=title%></title>
<script src='js/jquery.min.js'></script>
<script src='js/jquery-ui.min.js'></script>
<script src='js/bootstrap.min.js'></script>
<script src='js/bootstrap-typeahead.min.js'></script>
<link href='css/bootstrap.min.css' rel='stylesheet'>
<link rel='stylesheet' href='css/jquery-ui.min.css'>
<script src='js/pkgndep.js'></script>
<link href='css/pkgndep.css' rel='stylesheet'>
<script src='js/ion.rangeSlider.min.js'></script>
<link href='css/ion.rangeSlider.min.css' rel='stylesheet'>

<script src='js/cytoscape.min.js'></script>
<script src='js/dagre.min.js'></script>
<script src='js/cytoscape-dagre.js'></script>
<script src="js/cytoscape-euler.js"></script>

<script>
$( function() {
	$("#typeahead").typeahead({
	    source: <%=jsonlite::toJSON(all_pkgs)%>,
	    lookup: function (event) {
	        var that = this, items;
	        if (that.ajax) {
	            that.ajaxer();
	        } else {
	            that.query = that.$element.val();

	            if (!that.query) {
	                return that.shown ? that.hide() : that;
	            }

	            items = that.grepper(that.source);

	            if (!items) {
	                return that.shown ? that.hide() : that;
	            }
	            return that.render(items.slice(0, that.options.items)).show();
	        }
	    }
	});
});
</script>
</head>
<body>
<%
t = range(as.Date(ALL_BIOC_RELEASES$Date))
t[1] = t[1] - 30
p = as.numeric(as.Date(pkgndep_opt$heaviness_db_version) - t[1])/as.numeric(t[2] - t[1])
%>
<div style='width:1600px; margin-left:20px;' id="main">
	<div id="timeline-topbar" style="height:4px;width:<%=p*100%>%;background-color:#BBBBBB"></div>
	<nav class="navbar navbar-default">
	  <div class="container-fluid">
	    <div class="navbar-header">
	      <img src="image/icons8-fitness-64.png" style="float:left;padding-right:20px;" />
	      <a class="navbar-brand" href="main">Dependency Heaviness Database of R Packages</a>
	      	
	      	<form class="navbar-form navbar-right" method="get">
		      <div class="input-group" style="margin-left:380px;">
		        <input type="text" class="form-control" id="typeahead" placeholder="" name="package" value="<%=package%>" />
		        <div class="input-group-btn">
		          <button class="btn btn-default" type="submit">Search package</button>
		        </div>
		      </div>
		    </form>

	      	<form id="form-version" class="navbar-form navbar-right" method="get" action="change_version">
	      		<input type="hidden" name="url" value="<%=url%>" />
		      <div class="input-group">
				<select class="form-control" name="version" onchange="load_version_change();$('#form-version').submit()">
		        	 <%=version_select_txt%>
		        </select>
		        
		      </div>
		    </form>

	     	

	    </div>
	 </div>
	 </nav>
