index.html 2.32 KB
Newer Older
Kjetil Thuen's avatar
Kjetil Thuen committed
1 2
<!DOCTYPE html>
<html lang="en">
Kjetil Thuen's avatar
Kjetil Thuen committed
3 4 5
   <head>
       <meta charset="utf-8">
       <title>ScrollMagnifyer</title>
6
       <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
Kjetil Thuen's avatar
Kjetil Thuen committed
7
       <script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js"></script>
Kjetil Thuen's avatar
Kjetil Thuen committed
8
       <!--
9 10
       <script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>
       <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script>
Kjetil Thuen's avatar
Kjetil Thuen committed
11
       -->
12 13 14
       <script src="utils.js"></script>
       <script src="studylist.js"></script>
       <script src="listPeek.js"></script>
Kjetil Thuen's avatar
Kjetil Thuen committed
15 16
       <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
       <link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.0/css/font-awesome.min.css" rel="stylesheet">
17
       <link href="listPeek.css" rel="stylesheet">
Kjetil Thuen's avatar
Kjetil Thuen committed
18
       <script>
19 20 21
         var jsondata = {};
         var build_list = function() {
             var template = Handlebars.templates['studylist'];
Kjetil Thuen's avatar
Kjetil Thuen committed
22 23
             var listhtml = template(jsondata);
             $('#content').html(listhtml);
24 25
             initialize_list_peek();
         };
Kjetil Thuen's avatar
Kjetil Thuen committed
26

27
         var load_data = function() {
28 29 30 31 32 33 34 35 36 37
            $.ajax({
               url: "https://nesstar-dev.nsd.uib.no/nesstardrop/study/list",
               datatype: "json",
               context: document.body
            }).done(function(data) {
               jsondata = data;
               build_list();
            }).error(function(jqXHR, exception) {
               alert("Loading data failed:\n" + exception);
            });
38
         };
Kjetil Thuen's avatar
Kjetil Thuen committed
39 40 41 42 43 44 45
       </script>
   </head>
   <body>
      <div class="hero-unit">
         <h1>Data fra Skolenesstar</h1>
         Finn interresante studier i listen under.
      </div>
46
      <div id="content"></div>
Kjetil Thuen's avatar
Kjetil Thuen committed
47
      <h2 id="target"></h2>
48
      <div id="expander">
Kjetil Thuen's avatar
Kjetil Thuen committed
49 50 51
         <div class="metadata">
            <div class="abstract lead"></div>
            <div class="buttons">
Kjetil Thuen's avatar
Kjetil Thuen committed
52 53
               <button class="btn btn-info"><i class="icon-info-sign"></i> Mer metadata</button>
               <button class="btn btn-success"><i class="icon-ok-sign"></i> Velg studie</button>
Kjetil Thuen's avatar
Kjetil Thuen committed
54 55 56 57 58 59 60
            </div>
         </div>
      </div>
      <script>
         load_data();
      </script>
   </body>
Kjetil Thuen's avatar
Kjetil Thuen committed
61
</html>