templates/layouts/main.html.ep
author Vincent Tondellier <tonton+hg@team1664.org>
Tue, 20 Nov 2012 15:06:13 +0100
changeset 13 b5d8f0f977aa
parent 9 998910202673
child 28 0df70b8735e3
permissions -rw-r--r--
Add install instruction
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     1
<!DOCTYPE html>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     2
<html>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     3
  <head>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     4
    <title><%= title %></title>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     5
    <!--[if lt IE 9]>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     6
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     7
    <![endif]-->
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     8
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
     9
    %= stylesheet '/assets/css/bootstrap.css'
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    10
    %= stylesheet begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    11
      body {
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    12
        padding-top: 60px;
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    13
      }
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    14
    % end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    15
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    16
  </head>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    17
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    18
  <body>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    19
    <div class="navbar navbar-fixed-top">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    20
      <div class="navbar-inner">
9
998910202673 Use fluid layout
Vincent Tondellier <tonton+hg@team1664.org>
parents: 3
diff changeset
    21
        <div class="container-fluid">
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    22
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    23
            <span class="icon-bar"></span>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    24
            <span class="icon-bar"></span>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    25
            <span class="icon-bar"></span>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    26
          </a>
9
998910202673 Use fluid layout
Vincent Tondellier <tonton+hg@team1664.org>
parents: 3
diff changeset
    27
          %= link_to 'Crash test' => url_for('index') => (class => 'brand')
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    28
          <!--
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    29
            <ul class="nav">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    30
              <li class="wactive"><a href="#">Home</a></li>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    31
              <li><a href="#about">About</a></li>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    32
              <li><a href="#contact">Contact</a></li>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    33
            </ul>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    34
            -->
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    35
        </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    36
      </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    37
    </div>
9
998910202673 Use fluid layout
Vincent Tondellier <tonton+hg@team1664.org>
parents: 3
diff changeset
    38
    <div class="container-fluid">
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    39
      % content_for 'success_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    40
       % if ( defined($self->session->{success_messages}) && ( scalar( @{ $self->session->{success_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    41
        %foreach my $notice ( @{ $self->session->{success_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    42
         <div class="alert alert-success">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    43
          <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    44
          <p><%= $notice; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    45
         </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    46
        %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    47
        %delete($self->session->{success_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    48
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    49
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    50
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    51
      % content_for 'noticed_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    52
       % if ( defined($self->session->{notice_messages}) && ( scalar( @{ $self->session->{notice_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    53
        %foreach my $notice ( @{ $self->session->{notice_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    54
         <div class="alert alert-info">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    55
          <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    56
          <p><%= $notice; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    57
         </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    58
        %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    59
        %delete($self->session->{notice_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    60
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    61
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    62
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    63
      % content_for 'error_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    64
       % if ( defined($self->session->{error_messages}) && ( scalar( @{ $self->session->{error_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    65
        <div id="error-messages" class="error-messages">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    66
         %foreach my $error ( @{ $self->session->{error_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    67
          <div class="alert alert-error">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    68
           <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    69
           <p><%= $error; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    70
          </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    71
         %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    72
         %delete($self->session->{error_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    73
        </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    74
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    75
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    76
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    77
      <%= content_for 'hero_unit' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    78
      <%= content_for 'error_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    79
      <%= content_for 'noticed_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    80
      <%= content_for 'success_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    81
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    82
      <%= content %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    83
    </div>
3
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    84
    % if ( $self->app->mode eq 'development'){
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    85
    %= javascript '/assets/js/jquery.js'
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    86
    %= javascript '/assets/js/bootstrap.js'
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    87
    %} else {
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    88
    %= javascript '/assets/js/jquery.min.js'
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    89
    %= javascript '/assets/js/bootstrap.min.js'
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    90
    %}
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    91
    %= javascript '/assets/js/application.js'
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    92
  </body>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    93
</html>