<% 
	function resolveImgURL(from, path) {
        // check if the url provided is
        if (from !== null && !is_remote_url(path)) {
            // format `from` path
            // remove .html at the end of url
            if (from.indexOf('.html') >= 0) {
                from = from.replace('.html', '')
            }
            // remove end `/` of `from` path
            if (from.length === from.lastIndexOf('/') + 1) {
                from = from.substr(0, from.lastIndexOf('/'))
            }
            // remove end `/` of `url` path
            if (path.indexOf('/') === 1) {
                path = url.substr(1);
            }
            return url_for(from + '/' + path);

        }
        else {
            return path;
        }
    }
%>
<div id="header">
	<div class="btn-bar"><i></i></div>
	<h1><a href="/"><%= config.title %></a></h1>
	<a class="me" href="<%= theme.sidebar.menu.about.url %>">
        <img src="<%= resolveImgURL(theme.image_dir,theme.author.gravatar) %>" alt="<%= theme.author.name %>" alt="<%= theme.author.name %>">
    </a>
</div>
<div id="sidebar-mask"></div>