## -*- coding: utf-8 -*-
<%namespace name="base" file="base_helper.tmpl" import="*"/>

<%def name="html_header()">
    <header id="header" role="banner">
        <div class="thomas">
            <img src="/assets/img/thomas.gif" alt="DJ THOMAS IN DA HAUS">
            <img src="/assets/img/thomas.png" alt="${blog_title}">
        </div>
        ${html_site_title()}
        ${html_translation_header()}
        ${html_navigation_links()}
        %if search_form:
            <div class="searchform" role="search">
                ${search_form}
            </div>
        %endif
    </header>
    ${template_hooks['page_header']()}
</%def>

<%def name="html_site_title()">
    <h1 id="brand"><a href="${abs_link('/')}" title="${blog_title}" rel="home">
    %if logo_url:
        <img src="${logo_url}" alt="${blog_title}" id="logo">
    %endif

    % if show_blog_title:
        <span id="blog-title">${blog_title}</span>
    % endif
    </a></h1>
</%def>

<%def name="html_navigation_links()">
    <nav id="menu" role="navigation">
    <ul>
            <li class="twitter"><a href="http://twitter.com/pleasantprog">@pleasantprog</a></li>
    %for url, text in navigation_links[lang]:
        % if isinstance(url, tuple):
            <li> ${text}
            <ul>
            %for suburl, text in url:
                % if rel_link(permalink, suburl) == "#":
                    <li class="active"><a href="${permalink}">${text}</a></li>
                %else:
                    <li><a href="${suburl}">${text}</a></li>
                %endif
            %endfor
            </ul>
        % else:
            % if rel_link(permalink, url) == "#":
                <li class="active"><a href="${permalink}">${text}</a></li>
            %else:
                <li><a href="${url}">${text}</a></li>
            %endif
        % endif
    %endfor
    ${template_hooks['menu']()}
    ${template_hooks['menu_alt']()}
    </ul>
    </nav>
</%def>

<%def name="html_translation_header()">
    %if len(translations) > 1:
        <div id="toptranslations">
            <h2>${messages("Languages:")}</h2>
            ${base.html_translations()}
        </div>
    %endif
</%def>
