mirror of
https://github.com/flextype/flextype.git
synced 2025-08-13 08:34:19 +02:00
Flextype Slim Integration - Admin Panel - next round of integration
This commit is contained in:
123
site/plugins/admin/views/partials/base.html
Normal file
123
site/plugins/admin/views/partials/base.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ registry.settings.locale }}">
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
{{ emmiter_emmit('onAdminThemeMeta') }}
|
||||
|
||||
<title>FLEXTYPE</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
|
||||
|
||||
{% set admin_build = base_url() ~ '/site/plugins/admin/assets/dist/css/admin-build.min.css' %}
|
||||
{% set admin_elegant = base_url() ~ '/site/plugins/admin/assets/dist/css/elegant.css' %}
|
||||
{% set admin_light = base_url() ~ '/site/plugins/admin/assets/dist/css/admin-light.min.css' %}
|
||||
{% set admin_monokai = base_url() ~ '/site/plugins/admin/assets/dist/css/monokai.css' %}
|
||||
|
||||
{% do assets_add('css', admin_build, 'admin', 1) %}
|
||||
|
||||
{% if registry.settings.locale == 'light' %}
|
||||
{% do assets_add('css', admin_elegant, 'admin', 2) %}
|
||||
{% do assets_add('css', admin_light, 'admin', 3) %}
|
||||
{% else %}
|
||||
{% do assets_add('css', admin_monokai, 'admin', 4) %}
|
||||
{% endif %}
|
||||
|
||||
{% for assets_admin in assets_get('css', 'admin') %}
|
||||
{% for assets_by_priorities in assets_admin %}
|
||||
<link href="{{ assets_by_priorities.asset }}" rel="stylesheet">
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<style media="screen">
|
||||
.content-full-size .main-panel .navbar-fixed+.content {
|
||||
padding-top: 61px;
|
||||
}
|
||||
|
||||
.content-full-size .main-panel .content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.content-full-size .container-fluid {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
{{ emmiter_emmit('onAdminThemeHeader') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body {% if preview %} class="content-full-size" {% endif %}>
|
||||
<div class="wrapper">
|
||||
|
||||
{% if not user.is_logged %}
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-wrapper">
|
||||
<div class="flextype-logo">
|
||||
<a href="{{ base_url() }}/admin">
|
||||
FLEXTYPE
|
||||
</a>
|
||||
<a href="{{ base_url() }}" class="view-site-link" target="_blank">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="nav">
|
||||
{% for item in content_navigation_items %}
|
||||
<li class="nav-item {% if item.item == active_menu_item %} active {% endif %}">
|
||||
<a href="{{ item.link }}" {{ item.attributes }}>{{ item.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for item in extends_navigation_items %}
|
||||
<li class="nav-item {% if item.item == active_menu_item %} active {% endif %}">
|
||||
<a href="{{ item.link }}" {{ item.attributes }}>{{ item.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for item in settings_navigation_items %}
|
||||
<li class="nav-item {% if item.item == active_menu_item %} active {% endif %}">
|
||||
<a href="{{ item.link }}" {{ item.attributes }}>{{ item.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for item in help_navigation_items %}
|
||||
<li class="nav-item {% if item.item == active_menu_item %} active {% endif %}">
|
||||
<a href="{{ item.link }}" {{ item.attributes }}>{{ item.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="flextype-user">
|
||||
<ul class="nav">
|
||||
<li class="nav-item {% if active_menu_item == 'profile' %} active {% endif %}">
|
||||
<a class="nav-link" href="{{ base_url() }}/admin/profile">
|
||||
<i class="fas fa-user-circle"></i>
|
||||
<p>
|
||||
{{ username }}
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-off-canvas"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="main-panel {{ main_panel_class }}>">
|
||||
|
||||
['entries', 'templates', 'snippets', 'fieldsets', 'menus']
|
||||
<div class="content {% if sidebar_menu_item in entry-editor-area %} entry-editor {% endif %}">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
</div> <!-- .col-md-12 -->
|
||||
</div> <!-- .row -->
|
||||
</div> <!-- .container-fluid -->
|
||||
</div> <!-- .content -->
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
11
site/plugins/admin/views/templates/users/profile.html
Normal file
11
site/plugins/admin/views/templates/users/profile.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "plugins/admin/views/partials/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="profile">
|
||||
<i class="fas fa-user-circle"></i>
|
||||
{{ tr('admin_username') }}: {{ username }} <br>
|
||||
{{ tr('admin_role') }}: {{ rolename }}<br>
|
||||
<br>
|
||||
<a class="btn btn-default" href="{{ base_url() }}/admin/logout">{{ tr('admin_logout') }}</a>
|
||||
</div>
|
||||
{% endblock %}
|
30
site/plugins/admin/views/templates/users/registration.html
Normal file
30
site/plugins/admin/views/templates/users/registration.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends "plugins/admin/views/partials/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||||
<div class="row">
|
||||
<div class="col-4 float-center">
|
||||
<h3 class="h3 auth-header text-center">{{ tr('admin_create_new_user') }}</h3>
|
||||
<div class="form-group">
|
||||
<label>{{ tr('admin_username') }}</label>
|
||||
<input type="text" name="username" value="" class="form-control" placeholder="lowercase chars only, e.g. admin" pattern="^[a-z0-9_-]{3,16}$" required="required">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">{{ tr('admin_email') }}</label>
|
||||
<input type="text" name="email" value="" class="form-control" placeholder="valid email address" required="required">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">{{ tr('admin_password') }}</label>
|
||||
<input type="password" name="password" value="" class="form-control" placeholder="complex string at least 8 chars long" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" required="required">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" name="registration" value="{{ tr('admin_create_user') }}" class="btn btn-black btn-block">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user