From c0cad33ac41b93b739f2eaa3cca1a51b2f78bc22 Mon Sep 17 00:00:00 2001 From: Pedro Moreno Date: Tue, 21 Feb 2023 22:03:51 +0100 Subject: [PATCH] Updated profile and form templates --- templates/form.html.twig | 62 +++++++++++++++++++++++++++++-------- templates/profile.html.twig | 44 ++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 13 deletions(-) create mode 100644 templates/profile.html.twig diff --git a/templates/form.html.twig b/templates/form.html.twig index a1b1ef2..83121c5 100644 --- a/templates/form.html.twig +++ b/templates/form.html.twig @@ -1,13 +1,49 @@ -{% extends 'partials/base.html.twig' %} -{% block content %} -
-
-
-

{{ page.header.title }}

-
-
-
- {{ content|raw }} - {% include "forms/form.html.twig" %} -
-{% endblock %} +{% extends 'partials/base.html.twig' %} + +{% block stylesheets %} + {{ parent() }} + {% set styles %} + #user-register .buttons { + display: flex; + flex-wrap: nowrap; + align-content: center; + justify-content: flex-start; + align-items: center; + margin: 1em 0; + } + + #user-register .button { + margin: 0 1em; + } + #user-register .button:first-child { + margin: 0; + } + @media screen and (max-width: 480px) { + #user-register .buttons { + flex-direction: column; + } + #user-register .button { + width: 100%; + margin: 1em 0; + } + } + {% endset %} + {% do assets.addInlineCss(styles) %} +{% endblock %} + +{% block menu %} + {% include 'partials/sidebar_right.html.twig' %} +{% endblock %} + +{% block content %} +
+
+
+

{{ page.header.title }}

+
+
+
+ {{ content|raw }} + {% include "forms/form.html.twig" %} +
+{% endblock %} diff --git a/templates/profile.html.twig b/templates/profile.html.twig new file mode 100644 index 0000000..a351067 --- /dev/null +++ b/templates/profile.html.twig @@ -0,0 +1,44 @@ +{% extends 'partials/base.html.twig' %} + +{% block stylesheets %} + {{ parent() }} + {% set styles %} + #user-profile .buttons { + display: flex; + flex-wrap: nowrap; + align-content: center; + justify-content: flex-start; + align-items: center; + margin: 1em 0; + } + + #user-profile .button { + margin: 0 1em; + } + #user-profile .button:first-child { + margin: 0; + } + @media screen and (max-width: 480px) { + #user-profile .buttons { + flex-direction: column; + } + #user-profile .button { + width: 100%; + margin: 1em 0; + } + } + {% endset %} + {% do assets.addInlineCss(styles) %} +{% endblock %} + +{% do form.setAllData(grav.user.toArray) %} + +{% block menu %} + {% include 'partials/sidebar_right.html.twig' %} +{% endblock %} + +{% block content %} + {% include 'partials/messages.html.twig' %} + {{ page.content|raw }} + {% include 'forms/form.html.twig' %} +{% endblock %} \ No newline at end of file