From 831920bd373ec2a7d9f779de28ab1a92a440e6ef Mon Sep 17 00:00:00 2001 From: Rajab Natshah <rajabn@gmail.com> Date: Mon, 8 Jan 2018 14:03:23 +0200 Subject: [PATCH] Issue #2933028: Added [Better Login] module 1.x-dev and style for vartheme and VARTHEM_SUBTHEME --- .../betterlogin/page--user--login.html.twig | 34 ++++++++++++++++ .../page--user--password.html.twig | 40 +++++++++++++++++++ .../page--user--register.html.twig | 31 ++++++++++++++ .../betterlogin/page--user--reset.html.twig | 40 +++++++++++++++++++ .../page--user--password.html.twig | 8 +++- .../betterlogin/page--user--reset.html.twig | 8 +++- 6 files changed, 157 insertions(+), 4 deletions(-) create mode 100644 themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--login.html.twig create mode 100644 themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--password.html.twig create mode 100644 themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--register.html.twig create mode 100644 themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--reset.html.twig diff --git a/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--login.html.twig b/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--login.html.twig new file mode 100644 index 00000000..d11e7cad --- /dev/null +++ b/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--login.html.twig @@ -0,0 +1,34 @@ +{# Main #} +{% block main %} +<div role="main" class="main-container container"> + <div class="row"> + <div id="auth-box" class="login col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-4"> + <div id="top-part"> + <h1 id="the-logo"> + <a href="{{ url('<front>') }}"> + <img src="{{ logo }}" alt="{{ site_name }}" /> + </a> + </h1> + </div> + <div id="middle-part"> + <h2 class="title">{{ title }}</h2> + {{ page.header|without('VARTHEME_SUBTHEME_local_tasks', 'VARTHEME_SUBTHEME_breadcrumbs', 'VARTHEME_SUBTHEME_local_actions', 'VARTHEME_SUBTHEME_page_title') }} + {{ page.content }} + </div> + <div id="bottom-part"> + <div class="password-link"> + <a href="{{ path('user.pass') }}"><span class="icon glyphicon glyphicon-log-in" aria-hidden="true"></span> {{ 'Forgot your password?'|t }}</a> + </div> + {% if not logged_in and not user_settings_register_admin_only %} + <div class="register-link"> + <a href="{{ path('user.register') }}"><span class="icon glyphicon glyphicon-user" aria-hidden="true"></span> {{ 'Register a new account'|t }}</a> + </div> + {% endif %} + <div class="back-link"> + <a href="{{ url('<front>') }}"><span class="icon glyphicon glyphicon-home" aria-hidden="true"></span> {{ 'Back to'|t }} {{ site_name }}</a> + </div> + </div> + </div> + </div> +</div> +{% endblock main %} diff --git a/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--password.html.twig b/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--password.html.twig new file mode 100644 index 00000000..0691f3e7 --- /dev/null +++ b/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--password.html.twig @@ -0,0 +1,40 @@ +{# Main #} +{% block main %} +<div role="main" class="main-container container"> + <div class="row"> + <div id="auth-box" class="login col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-4"> + <div id="top-part"> + <h1 id="the-logo"> + <a href="{{ url('<front>') }}"> + <img src="{{ logo }}" alt="{{ site_name }}" /> + </a> + </h1> + </div> + <div id="middle-part"> + {% if logged_in %} + {{ page.header|without('VARTHEME_SUBTHEME_local_tasks', 'VARTHEME_SUBTHEME_breadcrumbs', 'VARTHEME_SUBTHEME_local_actions') }} + {% else %} + <h2 class="title">{{ title }}</h2> + {{ page.header|without('VARTHEME_SUBTHEME_local_tasks', 'VARTHEME_SUBTHEME_breadcrumbs', 'VARTHEME_SUBTHEME_local_actions', 'VARTHEME_SUBTHEME_page_title') }} + {% endif %} + {{ page.content }} + </div> + <div id="bottom-part"> + {% if not logged_in %} + <div class="login-link"> + <a href="{{ path('user.login') }}"><span class="icon glyphicon glyphicon-log-in" aria-hidden="true"></span> {{ 'Login'|t }}</a> + </div> + {% endif %} + {% if not logged_in and not user_settings_register_admin_only %} + <div class="register-link"> + <a href="{{ path('user.register') }}"><span class="icon glyphicon glyphicon-user" aria-hidden="true"></span> {{ 'Register a new account'|t }}</a> + </div> + {% endif %} + <div class="back-link"> + <a href="{{ url('<front>') }}"><span class="icon glyphicon glyphicon-home" aria-hidden="true"></span> {{ 'Back to'|t }} {{ site_name }}</a> + </div> + </div> + </div> + </div> +</div> +{% endblock main %} diff --git a/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--register.html.twig b/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--register.html.twig new file mode 100644 index 00000000..be413799 --- /dev/null +++ b/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--register.html.twig @@ -0,0 +1,31 @@ +{# Main #} +{% block main %} +<div role="main" class="main-container container"> + <div class="row"> + <div id="auth-box" class="login col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-4"> + <div id="top-part"> + <h1 id="the-logo"> + <a href="{{ url('<front>') }}"> + <img src="{{ logo }}" alt="{{ site_name }}" /> + </a> + </h1> + </div> + <div id="middle-part"> + <h2 class="title">{{ title }}</h2> + {{ page.header|without('VARTHEME_SUBTHEME_local_tasks', 'VARTHEME_SUBTHEME_breadcrumbs', 'VARTHEME_SUBTHEME_local_actions', 'VARTHEME_SUBTHEME_page_title') }} + {{ page.content }} + </div> + <div id="bottom-part"> + {% if not logged_in %} + <div class="login-link"> + <a href="{{ path('user.login') }}"><span class="icon glyphicon glyphicon-log-in" aria-hidden="true"></span> {{ 'Login'|t }}</a> + </div> + {% endif %} + <div class="back-link"> + <a href="{{ url('<front>') }}"><span class="icon glyphicon glyphicon-home" aria-hidden="true"></span> {{ 'Back to'|t }} {{ site_name }}</a> + </div> + </div> + </div> + </div> +</div> +{% endblock main %} diff --git a/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--reset.html.twig b/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--reset.html.twig new file mode 100644 index 00000000..0691f3e7 --- /dev/null +++ b/themes/vartheme/VARTHEME_SUBTHEME/templates/betterlogin/page--user--reset.html.twig @@ -0,0 +1,40 @@ +{# Main #} +{% block main %} +<div role="main" class="main-container container"> + <div class="row"> + <div id="auth-box" class="login col-xs-10 col-xs-offset-1 col-sm-4 col-sm-offset-4"> + <div id="top-part"> + <h1 id="the-logo"> + <a href="{{ url('<front>') }}"> + <img src="{{ logo }}" alt="{{ site_name }}" /> + </a> + </h1> + </div> + <div id="middle-part"> + {% if logged_in %} + {{ page.header|without('VARTHEME_SUBTHEME_local_tasks', 'VARTHEME_SUBTHEME_breadcrumbs', 'VARTHEME_SUBTHEME_local_actions') }} + {% else %} + <h2 class="title">{{ title }}</h2> + {{ page.header|without('VARTHEME_SUBTHEME_local_tasks', 'VARTHEME_SUBTHEME_breadcrumbs', 'VARTHEME_SUBTHEME_local_actions', 'VARTHEME_SUBTHEME_page_title') }} + {% endif %} + {{ page.content }} + </div> + <div id="bottom-part"> + {% if not logged_in %} + <div class="login-link"> + <a href="{{ path('user.login') }}"><span class="icon glyphicon glyphicon-log-in" aria-hidden="true"></span> {{ 'Login'|t }}</a> + </div> + {% endif %} + {% if not logged_in and not user_settings_register_admin_only %} + <div class="register-link"> + <a href="{{ path('user.register') }}"><span class="icon glyphicon glyphicon-user" aria-hidden="true"></span> {{ 'Register a new account'|t }}</a> + </div> + {% endif %} + <div class="back-link"> + <a href="{{ url('<front>') }}"><span class="icon glyphicon glyphicon-home" aria-hidden="true"></span> {{ 'Back to'|t }} {{ site_name }}</a> + </div> + </div> + </div> + </div> +</div> +{% endblock main %} diff --git a/themes/vartheme/templates/betterlogin/page--user--password.html.twig b/themes/vartheme/templates/betterlogin/page--user--password.html.twig index 9b6dd6bf..9de0b54d 100644 --- a/themes/vartheme/templates/betterlogin/page--user--password.html.twig +++ b/themes/vartheme/templates/betterlogin/page--user--password.html.twig @@ -11,8 +11,12 @@ </h1> </div> <div id="middle-part"> - <h2 class="title">{{ title }}</h2> - {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions', 'vartheme_page_title') }} + {% if logged_in %} + {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions') }} + {% else %} + <h2 class="title">{{ title }}</h2> + {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions', 'vartheme_page_title') }} + {% endif %} {{ page.content }} </div> <div id="bottom-part"> diff --git a/themes/vartheme/templates/betterlogin/page--user--reset.html.twig b/themes/vartheme/templates/betterlogin/page--user--reset.html.twig index 9b6dd6bf..9de0b54d 100644 --- a/themes/vartheme/templates/betterlogin/page--user--reset.html.twig +++ b/themes/vartheme/templates/betterlogin/page--user--reset.html.twig @@ -11,8 +11,12 @@ </h1> </div> <div id="middle-part"> - <h2 class="title">{{ title }}</h2> - {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions', 'vartheme_page_title') }} + {% if logged_in %} + {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions') }} + {% else %} + <h2 class="title">{{ title }}</h2> + {{ page.header|without('vartheme_local_tasks', 'vartheme_breadcrumbs', 'vartheme_local_actions', 'vartheme_page_title') }} + {% endif %} {{ page.content }} </div> <div id="bottom-part"> -- GitLab