Source

yt.hub / ythub / templates / layout.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>The yt Hub - {% block subpage %} Home {% endblock %}</title>
    <link rel="shortcut icon" href="favicon.png" />
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> 
    <script src="/static/bootstrap/js/bootstrap.js"></script> 
    <script src="/static/bootstrap/js/bootstrap-dropdown.js"></script> 
    <script src="/static/bootstrap/js/bootstrap-scrollspy.js"></script> 
    <script>
    /* From http://www.grimmdude.com/confirming-a-link-click-with-jquery/ */

    $(document).ready(function() {
        $('a.confirm').click(function(event) {
          event.preventDefault()
          var url = $(this).attr('href');
          var confirm_box = confirm('Are you sure you want to delete this and any affiliated data?');
          if (confirm_box) {
            window.location = url;
          }
          });
        });
    </script>

    <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="/static/css/style.css" rel="stylesheet">

    <link rel="shortcut icon" href="images/favicon.ico">
    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
  </head>

  <body>

    {% block toolbar %}
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" href="http://hub.yt-project.org/">yt Data Hub</a>
          <ul class="nav">
            <li><a href="http://yt-project.org/">yt Home</a></li>
            <li><a href="http://hub.yt-project.org/projects/">Projects</a></li>
            <li><a href="http://hub.yt-project.org/users">Users</a></li>
          </ul>
          {% with username = session['username'] %}
          {% if username %}
            <p class="navbar-text pull-right">Logged in as <a href="/user">{{username}}</a> (<a href="/logout">logout</a>)</p>
          {% else %}
            <p class="navbar-text pull-right"><a href="/login">Login</a> / 
                                              <a href="/create_user">Register</a></p>
          {% endif %}
          {% endwith %}
        </div>
      </div>
    </div>
    {% endblock %}

    <div class="container">

      {% with messages = get_flashed_messages() %}
        {% if messages %}
          <section name="alerts" style="padding-top: 5.0em;">
          {% for message in messages %}
            <div class="row">
              <div class="span6">
                <div class="alert alert-info">
                  <p><b>{{ message }}</b></p>
                </div>
              </div>
            </div>
          {% endfor %}
          </section>
        {% endif %}
      {% endwith %}

      {% block mainbody %}
      {% endblock %}
      <footer>
        <p> </p>
      </footer>

    </div> <!-- /container -->

  </body>
</html>