4 changes: 2 additions & 2 deletions templates/item.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}

{% include 'partials/blog_item.html.twig' with {'truncate':false,'big_header':true} %}
{% include 'partials/blog_item.html.twig' with {'blog':page.parent, 'truncate':false, 'big_header':true} %}
</div>

<div class="col-sm-3 col-sm-offset-1 blog-sidebar">
{% include 'partials/sidebar.html.twig' %}
{% include 'partials/sidebar.html.twig' with {'blog':page.parent}%}
</div>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions templates/partials/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% include 'partials/metadata.html.twig' %}
<title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
<link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png') }}" />
<link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png', true) }}" />
{% block stylesheets %}
{% do assets.add('theme://css/font-awesome.min.css',99) %}
{% do assets.add('theme://css-compiled/theme.css',98) %}
Expand All @@ -30,7 +30,9 @@
</head>

<body class="{% block body_classes %}{{ page.header.body_classes }}{% endblock %}">

{% if config.plugins.langswitcher.enabled %}
{% include 'partials/langswitcher.html.twig' %}
{% endif %}
{% block header_navigation %}
{% include 'partials/navigation.html.twig' %}
{% endblock %}
Expand Down
15 changes: 13 additions & 2 deletions templates/partials/blog_item.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<div class="list-item">

{% set header_image = page.header.header_image|defined(true) %}
{% set header_image_width = page.header.header_image_width|defined(900) %}
{% set header_image_height = page.header.header_image_height|defined(300) %}
{% set header_image_file = page.header.header_image_file %}

<div class="list-blog-header">

{% if page.header.link %}
Expand All @@ -26,9 +31,15 @@
{% if big_header %}
{{ page.media.images|first.cropResize(900,600).html('','blog-header-image') }}
{% else %}
{{ page.media.images|first.cropZoom(900,300).html('','blog-header-image') }}
{% if header_image %}
{% if header_image_file %}
{% set header_image_media = page.media.images[header_image_file] %}
{% else %}
{% set header_image_media = page.media.images|first %}
{% endif %}
{{ header_image_media.cropZoom(header_image_width, header_image_height).html }}
{% endif %}
{% endif %}

</div>

<div class="list-blog-padding">
Expand Down
4 changes: 4 additions & 0 deletions templates/partials/navigation.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
<a href="{{ mitem.url }}">{{ mitem.text }}</a>
</li>
{% endfor %}

{% if config.plugins.login.enabled and grav.user.username %}
<li><i class="fa fa-lock"></i> {% include 'partials/login-status.html.twig' %}</li>
{% endif %}
</ul>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions templates/partials/sidebar.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% set feed_url = blog.url == '/' or blog.url == base_url_relative ? (base_url_relative~'/'~blog.slug) : blog.url %}
{% set new_base_url = blog.url == '/' ? '' : blog.url %}

{% if config.plugins.simplesearch.enabled %}
<div class="sidebar-content">
<h4>SimpleSearch</h4>
Expand All @@ -21,13 +24,13 @@
{% if config.plugins.taxonomylist.enabled %}
<div class="sidebar-content">
<h4>Popular Tags</h4>
{% include 'partials/taxonomylist.html.twig' with {'taxonomy':'tag'} %}
{% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag'} %}
</div>
{% endif %}
{% if config.plugins.archives.enabled %}
<div class="sidebar-content">
<h4>Archives</h4>
{% include 'partials/archives.html.twig' %}
{% include 'partials/archives.html.twig' with {'base_url':new_base_url} %}
</div>
{% endif %}
{% if config.plugins.feed.enabled %}
Expand Down