{% from '_layout/input.twig' import input_checkbox_raw %} {% set site_menu = [ { 'title': 'Home', 'url': '/', 'menu': [ { 'title': 'Members', 'url': '/members.php', }, { 'title': 'Changelog', 'url': '/changelog.php', }, { 'title': 'Contact', 'url': '/info.php/contact', }, { 'title': 'Rules', 'url': '/info.php/rules', }, { 'title': 'Twitter', 'url': 'https://twitter.com/flashiinet', }, ], }, { 'title': 'News', 'url': '/news.php', }, { 'title': 'Forum', 'url': '/forum', }, { 'title': 'Chat', 'url': 'https://chat.flashii.net', }, ] %} {% set user_menu = current_user is defined ? [ { 'title': 'Profile', 'url': url('user-profile', {'user': current_user.user_id}), 'icon': 'fas fa-user fa-fw', }, { 'title': 'Settings', 'url': '/settings.php', 'icon': 'fas fa-cog fa-fw', }, { 'title': 'Return to Site', 'url': site_link|default('/'), 'icon': 'fas fa-door-open fa-fw', 'display': has_manage_access and manage_menu is defined }, { 'title': 'Manage', 'url': manage_link|default('/manage/index.php'), 'icon': 'fas fa-door-closed fa-fw', 'display': has_manage_access and manage_menu is not defined }, { 'title': 'Log out', 'url': '/auth.php?m=logout&s=' ~ csrf_token('logout'), 'icon': 'fas fa-sign-out-alt fa-fw', }, ] : [ { 'title': 'Register', 'url': '/auth.php?m=register', 'icon': 'fas fa-user-plus fa-fw', }, { 'title': 'Log in', 'url': '/auth.php?m=login', 'icon': 'fas fa-sign-in-alt fa-fw', 'class': 'js-login-button', }, ] %}