index.html 2.67 KB
Newer Older
ale's avatar
ale committed
1 2
<!DOCTYPE html>
<html lang="en">
ale's avatar
ale committed
3
  <head profile="http://a9.com/-/spec/opensearch/1.1/">
ale's avatar
ale committed
4
    <title>LIBER</title>
ale's avatar
ale committed
5
    <meta charset="utf-8">
ale's avatar
ale committed
6 7 8
    <link rel="shortcut icon" href="/static/favicon.ico">
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/home.css">
ale's avatar
ale committed
9 10 11 12
    <link rel="search"
          type="application/opensearchdescription+xml" 
          href="/opensearch.xml"
          title="Book search">
ale's avatar
ale committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
  </head>

  <body>
    <div class="site-wrapper">
      <div class="site-wrapper-inner">
        <div class="cover-container">

          <div class="inner cover">
            <h1 class="cover-heading">LIBER</h1>
            <p class="lead">
              Questa bilbioteca contiene ebook e riviste in formato ePub e
              PDF; per la gestione sul tuo computer ti consigliamo 
              <a href="http://calibre-ebook.org/">Calibre</a>: un
              programma libero, open source e multipiattaforma capace
              di convertire i file PDF in formato ePub.
            </p>

            <p class="lead">
              <form class="form-inline" role="form" method="get"
                    autocomplete="off" action="/search">
                <input type="text" class="input-lg form-control"
                       id="search_field" data-provide="typeahead"
ale's avatar
ale committed
35
                       name="q" size="30" autofocus>
ale's avatar
ale committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
                <button type="submit" class="btn btn-lg btn-primary">
                  Cerca
                </button>
              </form>
            </p>
          </div>

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

    <img id="bgimg" src="/static/img/lib3.jpg">

    {{template "_scripts.html" .}}
    <script>
$(function() {
    var bgImg = $("#bgimg");

    function resizeImg() {
      var imgwidth = bgImg.width();
      var imgheight = bgImg.height();

      var winwidth = $(window).width();
      var winheight = $(window).height();

      var widthratio = winwidth / imgwidth;
      var heightratio = winheight / imgheight;

      var widthdiff = heightratio * imgwidth;
      var heightdiff = widthratio * imgheight;

      var newwidth, newheight;
      if(heightdiff>winheight) {
          newwidth = winwidth;
          newheight = heightdiff;
      } else {
          newwidth = widthdiff;
          newheight = winheight;
      }
      var xoffset = (newwidth - winwidth) / 2,
        yoffset = (newheight - winheight) / 2;

      bgImg.css({
          width: newwidth+'px',
          height: newheight+'px',
          top: '-'+yoffset+'px',
          left: '-'+xoffset+'px'
      });
    } 
    resizeImg();
    bgImg.show();
    $(window).resize(function() {
      resizeImg();
    });
});

    </script>
  </body>
</html>