templates/layouts/main.html.ep
author Vincent Tondellier <tonton+hg@team1664.org>
Fri, 08 Aug 2014 23:02:44 +0200
changeset 40 373c7f784bc2
parent 28 0df70b8735e3
child 57 cebbfcd7deff
permissions -rw-r--r--
Set columns size
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
28
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
     9
    % if ( $self->app->mode eq 'development'){
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    10
    %= stylesheet '/assets/css/bootstrap.css'
28
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    11
    %= stylesheet '/assets/css/bootstrap-theme.css'
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    12
    %} else {
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    13
    %= stylesheet '/assets/css/bootstrap.min.css'
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    14
    %= stylesheet '/assets/css/bootstrap-theme.min.css'
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    15
    %}
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    16
    %= stylesheet begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    17
      body {
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    18
        padding-top: 60px;
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    19
      }
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    20
    % end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    21
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    22
  </head>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    23
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    24
  <body>
28
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    25
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    26
      <div class="container-fluid">
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    27
          %= link_to 'Crash test' => url_for('index') => (class => 'navbar-brand')
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    28
      </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    29
    </div>
9
998910202673 Use fluid layout
Vincent Tondellier <tonton+hg@team1664.org>
parents: 3
diff changeset
    30
    <div class="container-fluid">
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    31
      % content_for 'success_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    32
       % if ( defined($self->session->{success_messages}) && ( scalar( @{ $self->session->{success_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    33
        %foreach my $notice ( @{ $self->session->{success_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    34
         <div class="alert alert-success">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    35
          <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    36
          <p><%= $notice; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    37
         </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    38
        %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    39
        %delete($self->session->{success_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    40
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    41
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    42
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    43
      % content_for 'noticed_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    44
       % if ( defined($self->session->{notice_messages}) && ( scalar( @{ $self->session->{notice_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    45
        %foreach my $notice ( @{ $self->session->{notice_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    46
         <div class="alert alert-info">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    47
          <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    48
          <p><%= $notice; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    49
         </div>
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
        %delete($self->session->{notice_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    52
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    53
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    54
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    55
      % content_for 'error_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    56
       % if ( defined($self->session->{error_messages}) && ( scalar( @{ $self->session->{error_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    57
        <div id="error-messages" class="error-messages">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    58
         %foreach my $error ( @{ $self->session->{error_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    59
          <div class="alert alert-error">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    60
           <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    61
           <p><%= $error; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    62
          </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    63
         %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    64
         %delete($self->session->{error_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    65
        </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    66
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    67
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    68
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    69
      <%= content_for 'hero_unit' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    70
      <%= content_for 'error_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    71
      <%= content_for 'noticed_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    72
      <%= content_for 'success_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    73
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    74
      <%= content %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    75
    </div>
3
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    76
    % 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
    77
    %= 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
    78
    %= 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
    79
    %} else {
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    80
    %= 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
    81
    %= 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
    82
    %}
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    83
    %= javascript '/assets/js/application.js'
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    84
  </body>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    85
</html>