templates/layouts/main.html.ep
author Vincent Tondellier <tonton+hg@team1664.org>
Sat, 12 Dec 2015 15:55:55 +0100
changeset 79 4ae8bb6f8a96
parent 72 ec517ae81b39
child 82 f15cbfb7a8e5
permissions -rw-r--r--
Small config reorganization
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
      }
64
f66d935647bc Prettyprint function names using prettify.js
Vincent Tondellier <tonton+hg@team1664.org>
parents: 63
diff changeset
    20
      code.prettyprint {
f66d935647bc Prettyprint function names using prettify.js
Vincent Tondellier <tonton+hg@team1664.org>
parents: 63
diff changeset
    21
        background-color: transparent;
f66d935647bc Prettyprint function names using prettify.js
Vincent Tondellier <tonton+hg@team1664.org>
parents: 63
diff changeset
    22
      }
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    23
    % end
64
f66d935647bc Prettyprint function names using prettify.js
Vincent Tondellier <tonton+hg@team1664.org>
parents: 63
diff changeset
    24
    <link href="/mojo/prettify/prettify-mojo-light.css" type="text/css" rel="stylesheet" />
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    25
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    26
  </head>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    27
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    28
  <body>
28
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    29
    <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
    30
      <div class="container-fluid">
0df70b8735e3 Update Twitter bootstrap to 3.2.0
Vincent Tondellier <tonton+hg@team1664.org>
parents: 9
diff changeset
    31
          %= link_to 'Crash test' => url_for('index') => (class => 'navbar-brand')
57
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    32
          <form id="search-box" class="navbar-form navbar-right" method="get" action="<%= url_for("index") %>" role="search">
63
150e11f0fb7c Embiggen search box
Vincent Tondellier <tonton+hg@team1664.org>
parents: 57
diff changeset
    33
            <div class="input-group">
150e11f0fb7c Embiggen search box
Vincent Tondellier <tonton+hg@team1664.org>
parents: 57
diff changeset
    34
              <input name="search" type="text" style="width:400px;" class="form-control" placeholder="Search" value="<%= param("search") %>">
150e11f0fb7c Embiggen search box
Vincent Tondellier <tonton+hg@team1664.org>
parents: 57
diff changeset
    35
              <span class="input-group-btn">
150e11f0fb7c Embiggen search box
Vincent Tondellier <tonton+hg@team1664.org>
parents: 57
diff changeset
    36
                <button class="btn btn-default" type="submit">Go!</button>
150e11f0fb7c Embiggen search box
Vincent Tondellier <tonton+hg@team1664.org>
parents: 57
diff changeset
    37
              </span>
57
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    38
            </div>
cebbfcd7deff Add search box, using perl Search::Query syntax
Vincent Tondellier <tonton+hg@team1664.org>
parents: 28
diff changeset
    39
          </form>
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    40
      </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    41
    </div>
9
998910202673 Use fluid layout
Vincent Tondellier <tonton+hg@team1664.org>
parents: 3
diff changeset
    42
    <div class="container-fluid">
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    43
      % content_for 'success_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    44
       % if ( defined($self->session->{success_messages}) && ( scalar( @{ $self->session->{success_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    45
        %foreach my $notice ( @{ $self->session->{success_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    46
         <div class="alert alert-success">
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->{success_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 'noticed_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    56
       % if ( defined($self->session->{notice_messages}) && ( scalar( @{ $self->session->{notice_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    57
        %foreach my $notice ( @{ $self->session->{notice_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    58
         <div class="alert alert-info">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    59
          <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    60
          <p><%= $notice; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    61
         </div>
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
        %delete($self->session->{notice_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    64
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    65
      %end
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
      % content_for 'error_messages' => begin
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    68
       % if ( defined($self->session->{error_messages}) && ( scalar( @{ $self->session->{error_messages}} ) > 0 ) ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    69
        <div id="error-messages" class="error-messages">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    70
         %foreach my $error ( @{ $self->session->{error_messages}} ){
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    71
          <div class="alert alert-error">
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    72
           <a class="close" data-dismiss="alert">×</a>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    73
           <p><%= $error; %></p>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    74
          </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    75
         %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    76
         %delete($self->session->{error_messages});
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    77
        </div>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    78
       %}
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    79
      %end
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    80
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    81
      <%= content_for 'hero_unit' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    82
      <%= content_for 'error_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    83
      <%= content_for 'noticed_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    84
      <%= content_for 'success_messages' %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    85
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    86
      <%= content %>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    87
    </div>
3
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    88
    % 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
    89
    %= 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
    90
    %= 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
    91
    %} else {
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    92
    %= 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
    93
    %= 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
    94
    %}
72
ec517ae81b39 Fix path of prettify.js (may need change on != debian)
Vincent Tondellier <tonton+hg@team1664.org>
parents: 66
diff changeset
    95
    %= javascript '/assets/prettify/prettify.js'
3
2ff78fe4abda Create helper to shorten signatures and create links to the repository
Vincent Tondellier <tonton+hg@team1664.org>
parents: 1
diff changeset
    96
    %= javascript '/assets/js/application.js'
0
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    97
  </body>
5b78b8c79d9c Initial commit
Vincent Tondellier <tonton+hg@team1664.org>
parents:
diff changeset
    98
</html>