templates/view/login.html.twig line 1

Open in your IDE?
  1. {% extends 'layout/base.html.twig' %}
  2. {% block meta %}
  3.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  4.     <meta content="#0095ab" name="theme-color" />
  5.     <meta name="description" content="Morava servis login" />
  6. {% endblock %}
  7. {% block stylesheets %}
  8.     <link href="assets/logo.svg" rel="icon" type="image/svg" />
  9.     <link rel="apple-touch-icon" href="assets/logo.svg" />
  10.     <link
  11.             rel="preload"
  12.             href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
  13.             as="style"
  14.             onload="this.onload=null;this.rel='stylesheet'"
  15.     />
  16.     <noscript>
  17.         <link
  18.                 rel="stylesheet"
  19.                 href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
  20.         />
  21.     </noscript>
  22.     <link
  23.             rel="stylesheet"
  24.             href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
  25.     />
  26.     <link rel="preconnect" href="https://fonts.gstatic.com" />
  27.     <link
  28.             href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700&display=swap"
  29.             rel="preload"
  30.             as="font"
  31.             type="text/css"
  32.             crossorigin="anonymous"
  33.     />
  34.     <style>
  35.         body {
  36.             font-family: 'Montserrat', sans-serif !important;
  37.         }
  38.         a {
  39.             color: #000c40 !important;
  40.         }
  41.         .p-col-12 {
  42.             -webkit-box-flex: 0;
  43.             -ms-flex: 0 0 auto;
  44.             flex: 0 0 auto;
  45.             padding: 0.5rem;
  46.         }
  47.         .p-col-12 {
  48.             width: 100%;
  49.         }
  50.         .p-md-12,
  51.         .p-lg-6,
  52.         .p-lg-8,
  53.         .p-lg-9,
  54.         .p-xl-6 {
  55.             padding: 0.5rem;
  56.         }
  57.         @media screen and (min-width: 768px) {
  58.             .p-md-12 {
  59.                 -webkit-box-flex: 0;
  60.                 -ms-flex: 0 0 auto;
  61.                 flex: 0 0 auto;
  62.             }
  63.             .p-md-12 {
  64.                 width: 100%;
  65.             }
  66.         }
  67.         @media screen and (min-width: 992px) {
  68.             .p-lg-6,
  69.             .p-lg-8,
  70.             .p-lg-9 {
  71.                 -webkit-box-flex: 0;
  72.                 -ms-flex: 0 0 auto;
  73.                 flex: 0 0 auto;
  74.             }
  75.             .p-lg-6 {
  76.                 width: 50%;
  77.             }
  78.             .p-lg-8 {
  79.                 width: 66.6667%;
  80.             }
  81.             .p-lg-9 {
  82.                 width: 75%;
  83.             }
  84.         }
  85.         @media screen and (min-width: 1200px) {
  86.             .p-xl-6 {
  87.                 -webkit-box-flex: 0;
  88.                 -ms-flex: 0 0 auto;
  89.                 flex: 0 0 auto;
  90.             }
  91.             .p-xl-6 {
  92.                 width: 50%;
  93.             }
  94.         }
  95.         .p-mt-3 {
  96.             margin-top: 1rem !important;
  97.         }
  98.         .p-mt-5 {
  99.             margin-top: 2rem !important;
  100.         }
  101.         .p-py-5 {
  102.             padding-top: 2rem !important;
  103.             padding-bottom: 2rem !important;
  104.         }
  105.         .p-shadow-4 {
  106.             box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2),
  107.             0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);
  108.         }
  109.         button {
  110.             border-radius: 0;
  111.         }
  112.         .p-button {
  113.             margin: 0;
  114.             display: inline-flex;
  115.             align-items: center;
  116.             vertical-align: bottom;
  117.             text-align: center;
  118.             overflow: hidden;
  119.             position: relative;
  120.         }
  121.         .p-inputtext {
  122.             margin: 0;
  123.         }
  124.         .p-fluid .p-inputtext {
  125.             width: 100%;
  126.         }
  127.         button {
  128.             background: #000c40 !important;
  129.            
  130.         }
  131.         button:hover {
  132.             opacity: 0.7;
  133.             cursor: pointer;
  134.         }
  135.         .container {
  136.             width: 100%;
  137.             height: 100vh;
  138.             display: flex;
  139.             flex-wrap: wrap;
  140.         }
  141.         .formWrapper {
  142.             display: flex;
  143.             flex-direction: column;
  144.             align-items: center;
  145.             justify-content: space-evenly;
  146.             background-color: #fff;
  147.             border-radius: 5px;
  148.         }
  149.         .formWrapper > div {
  150.             width: 70% !important;
  151.         }
  152.         .formWrapper button > img {
  153.             width: 20% !important;
  154.         }
  155.         .formWrapper > button {
  156.             display: flex;
  157.             justify-content: space-between;
  158.         }
  159.         .container > div:first-child {
  160.             background: #0095ab;
  161.         }
  162.         .display-flex {
  163.             display: flex;
  164.             justify-content: center;
  165.             align-items: center;
  166.         }
  167.         input:not(:focus) {
  168.             background-color: #e9e5e5 !important;
  169.         }
  170.         @media only screen and (max-width: 1200px) {
  171.             .imageDiv {
  172.                 display: none !important;
  173.             }
  174.             .container > div:first-child {
  175.                 background: #fff;
  176.             }
  177.             .p-shadow-4 {
  178.                 box-shadow: none !important;
  179.             }
  180.             .loginWrapper {
  181.                 max-height: 100vh;
  182.             }
  183.             .formWrapper {
  184.                 height: 100vh;
  185.             }
  186.             .formWrapper > div {
  187.                 width: 100% !important;
  188.                 line-height: 4;
  189.             }
  190.         }
  191.         @media only screen and (min-width: 601px) and (max-width: 1200px) and (orientation: portrait) {
  192.             .p-inputtext {
  193.                 font-size: 1.5rem !important;
  194.             }
  195.             .formWrapper > div {
  196.                 width: 100% !important;
  197.                 line-height: 7 !important;
  198.             }
  199.             button {
  200.                 transform: scale(1.6);
  201.             }
  202.         }
  203.         :root {
  204.             --surface-a: #ffffff;
  205.             --surface-b: #f8f9fa;
  206.             --surface-c: #e9ecef;
  207.             --surface-d: #dee2e6;
  208.             --surface-e: #ffffff;
  209.             --surface-f: #ffffff;
  210.             --text-color: #495057;
  211.             --text-color-secondary: #6c757d;
  212.             --primary-color: #2196f3;
  213.             --primary-color-text: #ffffff;
  214.             --font-family: 'Montserrat', sans-serif !important;
  215.         }
  216.         * {
  217.             box-sizing: border-box;
  218.         }
  219.         .p-inputtext {
  220.             font-family: 'Montserrat', sans-serif !important;
  221.             font-size: 1rem;
  222.             color: #495057;
  223.             background: #ffffff;
  224.             padding: 0.5rem 0.5rem;
  225.             border: 1px solid #ced4da;
  226.             appearance: none;
  227.             border-radius: 3px;
  228.         }
  229.         .p-inputtext:enabled:focus {
  230.             outline: 0 none;
  231.             outline-offset: 0;
  232.             box-shadow: 0 0 0 0.2rem #a6d5fa;
  233.             border-color: #2196f3;
  234.         }
  235.         .p-button {
  236.             color: #ffffff;
  237.             background: #2196f3;
  238.             border: 1px solid #2196f3;
  239.             padding: 0.5rem 1rem;
  240.             font-size: 1rem;
  241.             border-radius: 3px;
  242.         }
  243.         form {
  244.             display: flex;
  245.             flex-direction: column;
  246.             align-items: center;
  247.         }
  248.         .p-text-center {
  249.             text-align: center !important;
  250.         }
  251.         .p-forget-password {
  252.             align-self: flex-start !important;
  253.             text-decoration: none !important;
  254.             font-size: .8rem;
  255.         }
  256.     </style>
  257. {% endblock %}
  258. {% block title %}Login - {{ parent() }}{% endblock %}
  259. {% block body %}
  260.     <section class="container">
  261.         <div class="loginWrapper display-flex p-col-12 p-md-12 p-xl-6">
  262.             <div class="formWrapper p-col-12 p-lg-8 p-shadow-4 p-py-5">
  263.                 <img src="assets/logo.svg" width="70%" alt="Morava Servis Logo" />
  264.                 <div class="p-fluid p-mt-3 p-text-center">
  265.                     {{ form_start(form) }}
  266.                         {{ form_widget(form.username, {'attr': {'placeholder': 'Enter your email address'|trans, 'autocomplete': 'email', 'class': 'p-col-12 p-lg-9 p-inputtext','autofocus': 'autofocus'} }) }}
  267.                         {{ form_widget(form.password, {'attr': {'placeholder': 'Enter your password'| trans, 'autocomplete': 'password', 'class': 'p-col-12 p-lg-9 p-mt-3 p-inputtext'} }) }}
  268.                         <a href="/lost-password" class="p-forget-password p-mt-3">{% trans %} Forgot your password? {% endtrans %}</a>
  269.                         
  270.                         <button type="submit" class="p-button p-mt-5">
  271.                             {% trans %} Sign in {% endtrans %}
  272.                             <img src="assets/login-icon.svg" alt="Login icon" width="50%" />
  273.                         </button>
  274.                        
  275.                     {{ form_end(form) }}
  276.                      <p>{% trans %} Don't have an account? Register {% endtrans %} <a href="/registration">{% trans %} here! {% endtrans %}</a></p>
  277.                 </div>
  278.             </div>
  279.         </div>
  280.         <div class="imageDiv display-flex p-col-12 p-lg-6">
  281.             <img
  282.                     src="assets/authentication_isometric.svg"
  283.                     alt="Login cover picture"
  284.                     width="100%"
  285.             />
  286.         </div>
  287.     </section>
  288. {% endblock %}