summaryrefslogtreecommitdiff
path: root/views/layouts/main.tt
blob: 763e8e07a0b20d16491c0495bb91cbe3513d87df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=<% settings.charset %>" />
    <title>StarGit</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="<% request.uri_base %>/javascripts/stargit.js"></script>
    <link rel="stylesheet" href="<% request.uri_base %>/css/style.css" />

    <script>
      $(document).ready(function(){
          if (document.getElementById("SiGMa")){
              $("#query_input").keypress(function(e){
                  if(e.which == 13) {
                      stargit.loadUser(this.value);
                      e.stopPropagation();
                      return false;
                  }
                  return true;
	      });
	      $("#query_size").change(stargit.setSize);
	      $("#query_color").change(stargit.setColor);
	      $("#query_buttons .edges").click(function(){
	          this.value = stargit.toggleEdges()?"hide edges":"display edges";
	      });
	      $("#query_buttons .labels").click(function(){
	          this.value = stargit.toggleLabels()?"hide labels":"display labels";
	      });
	      $("#query_buttons .fisheye").click(function(){
	          this.value = stargit.toggleFishEye()?"hide fisheye":"use fisheye";
	      });
	      flash = document.getElementById("SiGMa");
	      stargit.getGraphAttributes();
          }
      });
    </script>
  </head>

  <body>
    <div id="head">
      <div id="head_title"><a href="/">Stargit - Browse the Github collaborations network</a></div>
      <a id="head_api" href="/api">API</a>
      <a id="head_about" href="/about">About</a>
    </div>
    <% content %>
  </body>

</html>