mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 19:36:08 +01:00
Fixes #30
This commit is contained in:
@@ -180,7 +180,7 @@ class AdminPlugin extends Plugin
|
||||
// Replace page service with admin.
|
||||
$this->grav['page'] = function () use ($self) {
|
||||
$page = new Page;
|
||||
$page->init(new \SplFileInfo(__DIR__ . "/pages/admin/{$self->template}.md"));
|
||||
$page->init(new \SplFileInfo(str_ireplace('task:', '',__DIR__ . "/pages/admin/{$self->template}.md")));
|
||||
$page->slug(basename($self->template));
|
||||
return $page;
|
||||
};
|
||||
|
||||
14
pages/admin/logout.md
Normal file
14
pages/admin/logout.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Dashboard Logout
|
||||
|
||||
form:
|
||||
fields:
|
||||
- name: username
|
||||
type: text
|
||||
placeholder: Username
|
||||
autofocus: true
|
||||
|
||||
- name: password
|
||||
type: password
|
||||
placeholder: Password
|
||||
---
|
||||
17
themes/grav/templates/logout.html.twig
Normal file
17
themes/grav/templates/logout.html.twig
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block head %}
|
||||
{{ parent() }}
|
||||
<meta http-equiv="refresh" content="5; URL={{ base_url_relative }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block page %}
|
||||
<section id="admin-login" class="default-glow-shadow">
|
||||
<h1>
|
||||
{{ title }}
|
||||
</h1>
|
||||
|
||||
<div class="info alert">{{ 'LOGGED_OUT'|t }}</div>
|
||||
{% include 'partials/messages.html.twig' %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user