- import vibe.core.path : relativeTo;
- auto tmp = req.requestPath;
- if (!tmp.endsWithSlash) tmp = tmp.parentPath;
- tmp = info.managePath.relativeTo(tmp);
- auto root_dir = tmp.toString();
- if (!root_dir.length) root_dir = "./";

ul.headerMenu.admin-global-nav
    li
        a(href=root_dir) Dashboard
    li
        a(href="#{root_dir}make_post") New post
    li
        a(href="#{root_dir}posts/") Manage posts
    - if (info.loginUser.isConfigAdmin())
        li
            a(href="#{root_dir}configs/") Manage configurations
    - if (info.loginUser.isUserAdmin())
        li
            a(href="#{root_dir}users/") Manage users
    - else
        li
            a(href="#{root_dir}users/#{info.loginUser.username}/") Manage account
