mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-27 01:40:02 +01:00
hooked into config
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user