base_header.tmpl 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ## -*- coding: utf-8 -*-
  2. <%namespace name="base" file="base_helper.tmpl" import="*"/>
  3. <%def name="html_header()">
  4. <header id="header" role="banner">
  5. <div class="thomas">
  6. <img src="/assets/img/thomas.gif" alt="DJ THOMAS IN DA HAUS">
  7. <img src="/assets/img/thomas.png" alt="${blog_title}">
  8. </div>
  9. ${html_site_title()}
  10. ${html_translation_header()}
  11. ${html_navigation_links()}
  12. %if search_form:
  13. <div class="searchform" role="search">
  14. ${search_form}
  15. </div>
  16. %endif
  17. </header>
  18. ${template_hooks['page_header']()}
  19. </%def>
  20. <%def name="html_site_title()">
  21. <h1 id="brand"><a href="${abs_link('/')}" title="${blog_title}" rel="home">
  22. %if logo_url:
  23. <img src="${logo_url}" alt="${blog_title}" id="logo">
  24. %endif
  25. % if show_blog_title:
  26. <span id="blog-title">${blog_title}</span>
  27. % endif
  28. </a></h1>
  29. </%def>
  30. <%def name="html_navigation_links()">
  31. <nav id="menu" role="navigation">
  32. <ul>
  33. <li class="twitter"><a href="http://twitter.com/pleasantprog">@pleasantprog</a></li>
  34. %for url, text in navigation_links[lang]:
  35. % if isinstance(url, tuple):
  36. <li> ${text}
  37. <ul>
  38. %for suburl, text in url:
  39. % if rel_link(permalink, suburl) == "#":
  40. <li class="active"><a href="${permalink}">${text}</a></li>
  41. %else:
  42. <li><a href="${suburl}">${text}</a></li>
  43. %endif
  44. %endfor
  45. </ul>
  46. % else:
  47. % if rel_link(permalink, url) == "#":
  48. <li class="active"><a href="${permalink}">${text}</a></li>
  49. %else:
  50. <li><a href="${url}">${text}</a></li>
  51. %endif
  52. % endif
  53. %endfor
  54. ${template_hooks['menu']()}
  55. ${template_hooks['menu_alt']()}
  56. </ul>
  57. </nav>
  58. </%def>
  59. <%def name="html_translation_header()">
  60. %if len(translations) > 1:
  61. <div id="toptranslations">
  62. <h2>${messages("Languages:")}</h2>
  63. ${base.html_translations()}
  64. </div>
  65. %endif
  66. </%def>