% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
% use Mojo::Util qw(url_escape);
% my $twitter_url = 'https://twitter.com/share';
% my $url    = url_for('/')->to_abs();
% $twitter_url .= '?url='.url_escape("$url")
%              .'&via=framasky'
%              .'&text=Check out this %23Lutim instance! ';
<!DOCTYPE html>
<html>
    <head>
        <title>Lutim</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta charset="utf-8" />
        <meta name="mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="icon" type="image/png" href="<%= url_for('/') %>img/favicon.png">
        <link rel="icon" sizes="128x128" href="<%= url_for('/') %>img/lutim128.png">
        <link rel="icon" sizes="196x196" href="<%= url_for('/') %>img/lutim196.png">
        <link rel="apple-touch-icon" href="<%= url_for('/') %>img/lutim60.png">
        <link rel="apple-touch-icon" sizes="76x76" href="<%= url_for('/') %>img/lutim76.png">
        <link rel="apple-touch-icon" sizes="120x120" href="<%= url_for('/') %>img/lutim120.png">
        <link rel="apple-touch-icon" sizes="152x152" href="<%= url_for('/') %>img/lutim152.png">
        <link rel="apple-touch-icon-precomposed" sizes="128x128" href="<%= url_for('/') %>img/lutim128.png">
% if (current_route 'stats') {
        %= asset 'stats.css'
% } elsif (current_route 'about') {
        %= asset 'about.css'
% } else {
        %= asset 'index.css'
% }
    </head>
    <body>
        <div class="container-fluid">
            <div>
% if (defined(config('hosted_by'))) {
                <div class="pull-right">
                    <%== config('hosted_by') %>
                </div>
% }
                <div>
                    <div class="pull-left hidden-xs logo">
                        <img src="<%= url_for('/') %>img/Lutim_small.png" alt="Lutim logo">
                    </div>
                    <a class="link_nocol" href="<%= url_for('/') %>" title="<%=l 'homepage' %>"><h1 class="hennypenny">Let's Upload That Image!</h1></a>
                    <p>
                        &copy; 2014 <%= link_to 'http://www.fiat-tux.fr' => begin %>Luc Didry<% end %> — 
                        <%=l 'license' %> <%= link_to 'https://www.gnu.org/licenses/agpl-3.0.html' => begin %>AGPL<% end %> — 
                        <%= link_to url_for('about') => begin %><%=l 'informations' %><% end %> — 
                        <%= link_to 'https://github.com/ldidry/lutim' => (title => l 'fork-me') => begin %><i class="lead icon icon-github-circled"></i><% end %> 
                        <%= link_to $twitter_url                      => (title => l 'share-twitter')   => begin %><i class="lead icon icon-twitter"></i><% end %> 
                        <%= link_to 'https://flattr.com/submit/auto?user_id=_SKy_&url='.$url.'&title=Lutim&category=software' => (title => 'Flattr this') => begin %><i class="lead icon icon-flattr"></i><% end %> 
                        <%= link_to 'bitcoin:1K3n4MXNRSMHk28oTfXEvDunWFthePvd8v?label=lutim' => (title => 'Give Bitcoins') => begin %><i class="lead icon icon-bitcoin"></i><% end %> 
                        <a class="btn btn-default btn-xs" href="#" id="install-app"><img src="<%= url_for('/') %>img/rocket.png" alt="mozilla rocket logo"> <%=l 'install_as_webapp' %></a>
                    </p>
                </div>
            </div>
% if (defined(config('broadcast_message'))) {
            <div class="alert alert-info">
                <strong><%= config('broadcast_message') %></strong>
            </div>
% }
% if (defined(stash('stop_upload'))) {
            <div class="alert alert-danger">
                <strong><%= stash('stop_upload') %></strong>
            </div>
% }
        %= javascript begin
            var manifestUrl = '<%== url_for('manifest.webapp')->to_abs() %>';
        % end
% if (current_route 'stats') {
        %= asset 'stats.js'
% } elsif (!(current_route 'about')) {
        %= asset 'index.js'
% }
            <%= content %>
        </div>
% if (defined(config('piwik_img'))) {
        <img src="<%== config('piwik_img') %>" style="border:0" alt="" />
% }
    </body>
</html>
