<div id="sidebar" role="complementary">
    <ul>
{#  if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : #}
        <li>
	    {% include 'searchform.html.twig' %}
        </li>
        <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
        <li>
	    <h2>{{ __('Author', 'kubrick') }}</h2>
            <p>A little something about you, the author. Nothing lengthy, just an overview.</p>
        </li>
        -->

	{% if is_404() or is_category() or is_day() or is_month() or is_year() or is_search() or is_paged() %}
	<li>
	    {% if (is_404()) %}
	    {% elseif is_category() %}
        	<p>You are currently browsing the archives for the {{ single_cat_title('', false) }} category.</p>
            {% elseif is_day() %}
                <p><You are currently browsing the <a href="{{ bloginfo('url') }}/">{{ bloginfo('name') }}</a> blog archives for the day {{ the_time(__('l, F jS, Y', 'kubrick')) }}.</p>
            {% elseif is_month() %}
                <p><You are currently browsing the <a href="{{ bloginfo('url') }}/">{{ bloginfo('name') }}</a> blog archives for {{ the_time(__('F, Y', 'kubrick')) }}.</p>
            {% elseif is_year() %}
                <p><You are currently browsing the <a href="{{ bloginfo('url') }}/">{{ bloginfo('name') }}</a> blog archives for the year {{ the_time('Y') }}</p>
	    {% elseif is_search() %}
                <p>You have searched the <a href="{{ bloginfo('url') }}/">{{ bloginfo('name') }}</a> blog archives for <strong>&#8216;{{ get_search_query() }}&#8217;</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
            {% elseif is_paged() %}
                <p><You are currently browsing the <a href="{{ bloginfo('url') }}/">{{ bloginfo('name') }}</a> blog archives.</p>
	    {% endif %}
	</li>
	{% endif %}
    </ul>
    <ul role="navigation">
        {{ wp_list_pages('title_li=<h2>' ~  __('Pages', 'kubrick') ~ '</h2>' ) }}
        <li>
	    <h2>{{ __('Archives', 'kubrick') }}</h2>
    	    <ul>
	        {{ wp_get_archives('type=monthly') }}
            </ul>
        </li>
        {{ wp_list_categories('show_count=1&title_li=<h2>' ~ __('Categories', 'kubrick') ~ '</h2>') }}
    </ul>
    <ul>
        {# If this is the frontpage #}
	{% if is_home() or is_page() %}
            {{ wp_list_bookmarks() }}

            <li><h2>{{ __('Meta', 'kubrick') }}</h2>
            <ul>
                {{ wp_register() }}
                <li>{{ wp_loginout() }}</li>
                <li><a href="http://validator.w3.org/check/referer" title="{{ __('This page validates as XHTML 1.0 Transitional', 'kubrick') }}">{{ __('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>', 'kubrick') }}</a></li>
                <li><a href="http://gmpg.org/xfn/"><abbr title="{{ __('XHTML Friends Network', 'kubrick') }}">{{ __('XFN', 'kubrick') }}</abbr></a></li>
                <li><a href="http://wordpress.org/" title="{{ __('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'kubrick') }}">WordPress</a></li>
                {{ wp_meta() }}
            </ul>
            </li>
	{% endif %}

{# endif #}
    </ul>
</div>