hooked into config

This commit is contained in:
Andy Miller
2016-05-05 17:22:50 -06:00
parent 4266034979
commit 7fb9be054e
4 changed files with 35 additions and 3 deletions

View File

@@ -2,6 +2,10 @@ enabled: true
route: '/admin'
theme: grav
logo_text: ''
body_classes: ''
sidebar:
activate: hover
size: small
dashboard:
days_of_stats: 7
session:

View File

@@ -52,6 +52,32 @@ form:
placeholder: "Grav"
help: Text to display in place of the default Grav logo
body_classes:
type: text
label: Body classes
size: medium
help: add a space seperated name of custom body classes
sidebar.activate:
type: select
label: Sidebar Activation
help: Control how the sidebar is activated
size: small
default: tab
options:
tab: Tab
hover: Hover
sidebar.size:
type: select
label: Sidebar Size
help: Control the width of the sidebar
size: medium
default: auto
options:
auto: Automatically width
small: Small width
theme:
type: hidden
label: Theme

View File

@@ -30,7 +30,7 @@
{% endblock %}
</head>
{% block body %}
<body>
<body class="{{ config.plugins.admin.sidebar.size == 'small' ? 'sidebar-closed' : '' }} {{ config.plugins.admin.body_classes }}">
{% block page %}
<div class="remodal-bg">

View File

@@ -1,6 +1,8 @@
{% if authorize(['admin.login', 'admin.super']) %}
<nav id="admin-sidebar" data-quickopen="true">
<nav id="admin-sidebar" data-quickopen="{{ config.plugins.admin.sidebar.activate == 'hover' ? 'true' : 'false' }}">
{% if config.plugins.admin.sidebar.activate != 'hover' %}
<div id="open-handle" data-sidebar-toggle><i class="fa fa-angle-double-right"></i></div>
{% endif %}
<div id="admin-logo">
{% include 'partials/logo.html.twig' %}
</div>
@@ -84,4 +86,4 @@
</ul>
</div>
</nav>
{% endif %}
{% endif %}