{%- macro header(username, userid, name, login_url, logout_url) %}
<header id="site-header">
    <div class="wrapper">
        <nav>
          {% if userid %}
            <a href="/auth/prefs/">Account</a>
            <a href="/u/{{username}}/">{{name}}</a>
            <a href="{{logout_url}}">Log Out</a>
          {% else %}
            <a href="/auth/create_account">Register</a>
            <a href="{{login_url}}">Log In</a>
          {% endif %}
        </nav>
    </div>
</header>
{%- endmacro %}

{%- macro footer(year) %}
<footer id="site-footer">
  <nav>
	  This project is powered by <a href="http://sourceforge.net/p/allura/home/">Allura</a>.
	</nav>
</footer>
{%- endmacro %}

{%- macro custom_js(path_to_static) %}

{%- endmacro %}

{%- macro custom_tracking_js(account, user, project) %}
    {# This should be overridden in your custom theme (e.g., sftheme) to implement custom tracking code. #}
    var _gaq = _gaq || [];

    function _add_tracking(prefix, tracking_id) {
        _gaq.push(
            [prefix+'._setAccount', tracking_id],
            [prefix+'._trackPageview'],
            [prefix+'._trackPageLoadTime']
        );
    }

    {% if account -%}
        _add_tracking('sfnt', '{{account}}');
    {%- endif %}
    {% if project and project.neighborhood.features['google_analytics'] -%}
      {% if project.neighborhood.tracking_id -%}
          _add_tracking('nbhd', '{{project.neighborhood.tracking_id}}');
      {%- endif %}
      {% if project.tracking_id -%}
          _add_tracking('proj', '{{project.tracking_id}}');
      {%- endif %}
    {%- endif %}

    (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
{%- endmacro %}

{%- macro extra_header(path_to_static) %}

{%- endmacro %}
