mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +01:00
slowly prettying up the registration form
This commit is contained in:
@@ -1,47 +1,52 @@
|
|||||||
---
|
---
|
||||||
form:
|
form:
|
||||||
fields:
|
fields:
|
||||||
-
|
- name: spacer
|
||||||
name: username
|
title: Required
|
||||||
|
type: spacer
|
||||||
|
|
||||||
|
- name: username
|
||||||
type: text
|
type: text
|
||||||
placeholder: "Choose a username"
|
placeholder: "Choose a username"
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
-
|
- name: email
|
||||||
name: title
|
|
||||||
type: text
|
|
||||||
placeholder: "Enter a title"
|
|
||||||
|
|
||||||
-
|
|
||||||
name: email
|
|
||||||
type: text
|
type: text
|
||||||
placeholder: "Enter your email"
|
placeholder: "Enter your email"
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
-
|
- name: password1
|
||||||
name: password1
|
|
||||||
type: password
|
type: password
|
||||||
placeholder: Enter password
|
placeholder: Enter password
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
-
|
- name: password2
|
||||||
name: password2
|
|
||||||
type: password
|
type: password
|
||||||
placeholder: Confirm password
|
placeholder: Confirm password
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
- name: spacer
|
||||||
|
title: Optional
|
||||||
|
type: spacer
|
||||||
|
|
||||||
|
- name: fullname
|
||||||
|
type: text
|
||||||
|
placeholder: "Enter your fullname"
|
||||||
|
|
||||||
|
- name: title
|
||||||
|
type: text
|
||||||
|
placeholder: "Enter a title"
|
||||||
|
|
||||||
|
|
||||||
buttons:
|
buttons:
|
||||||
-
|
- type: submit
|
||||||
type: submit
|
value: Submit
|
||||||
value: Submit
|
- type: reset
|
||||||
-
|
value: Reset
|
||||||
type: reset
|
|
||||||
value: Reset
|
|
||||||
|
|
||||||
process:
|
process:
|
||||||
register_user:
|
register_user:
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -4,6 +4,30 @@
|
|||||||
max-width: 24rem;
|
max-width: 24rem;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
|
&.wide {
|
||||||
|
max-width: 50rem;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
> .padding {
|
||||||
|
padding: 3rem 2rem 6rem 2rem;
|
||||||
|
> div {
|
||||||
|
width: 50%;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-field {
|
||||||
|
padding: 0 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.form-field {
|
.form-field {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -17,6 +41,25 @@
|
|||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wrapper-spacer {
|
||||||
|
width: 100% !important;
|
||||||
|
display: block !important;
|
||||||
|
padding: 0 1rem;
|
||||||
|
h3 {
|
||||||
|
padding-left: 1rem;
|
||||||
|
color: rgba(white, 0.4);
|
||||||
|
border-bottom: 3px solid rgba(white, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.instructions {
|
||||||
|
display: block;
|
||||||
|
padding: 2rem 4rem 0;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
color: rgba(white,0.8);
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
background: $darker-accent-bg url(../images/logo.png) 50% 50% no-repeat;
|
background: $darker-accent-bg url(../images/logo.png) 50% 50% no-repeat;
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
@@ -26,7 +69,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
form {
|
form {
|
||||||
padding: 2rem 3rem;
|
position: relative;
|
||||||
|
|
||||||
|
.padding {
|
||||||
|
padding: 3rem 3rem 6rem 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
background: $page-bg;
|
background: $page-bg;
|
||||||
@@ -43,8 +91,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-actions {
|
.form-actions {
|
||||||
|
display: block !important;
|
||||||
|
width: 100% !important;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 -3rem -3rem -3rem;
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
padding: 1.5rem 3rem;
|
padding: 1.5rem 3rem;
|
||||||
|
|
||||||
button:first-child {
|
button:first-child {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends 'partials/base.html.twig' %}
|
{% extends 'partials/base.html.twig' %}
|
||||||
|
|
||||||
{% block page %}
|
{% block page %}
|
||||||
<section id="admin-login" class="default-glow-shadow">
|
<section id="admin-login" class="default-glow-shadow {{ classes }}">
|
||||||
<h1>
|
<h1>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h1>
|
</h1>
|
||||||
@@ -11,9 +11,11 @@
|
|||||||
{% block instructions %}{% endblock %}
|
{% block instructions %}{% endblock %}
|
||||||
|
|
||||||
<form method="post" action="{{ base_url_relative }}">
|
<form method="post" action="{{ base_url_relative }}">
|
||||||
|
<div class="padding">
|
||||||
{% block form %}{% endblock %}
|
{% block form %}{% endblock %}
|
||||||
|
|
||||||
{{ nonce_field('admin-form', 'admin-nonce') }}
|
{{ nonce_field('admin-form', 'admin-nonce') }}
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
{% embed 'partials/login.html.twig' with {title:'Grav Register Admin User'} %}
|
{% embed 'partials/login.html.twig' with {title:'Grav Register Admin User', classes:'wide'} %}
|
||||||
|
|
||||||
{% block instructions %}
|
{% block instructions %}
|
||||||
<p>No users found, you will need to register an account...</p>
|
<div class="instructions">
|
||||||
|
The Admin plugin has been installed, but no user accounts could be found. Please create a user account to ensure your Grav install is secure...
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form %}
|
{% block form %}
|
||||||
{% for field in page.header.form.fields %}
|
{% for field in page.header.form.fields %}
|
||||||
{% if field.type %}
|
{% if field.type %}
|
||||||
<div>
|
<div class="wrapper-{{ field.name }}">
|
||||||
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
|
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user