Login.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!--
  2. Copyright 2019 Hackware SpA <human@hackware.cl>
  3. This file is part of "Hackware Userland" and licensed under the terms
  4. of the GNU Affero General Public License version 3, or (at your option)
  5. a later version. You should have received a copy of this license along
  6. with the software. If not, see <https://www.gnu.org/licenses/>.
  7. -->
  8. <template>
  9. <div class="login">
  10. <router-view @login="$emit('login')" />
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'Login',
  16. };
  17. </script>
  18. <style lang="scss">
  19. @import "../assets/bootstrap/custom";
  20. .login {
  21. @extend .pt-5;
  22. background: url('~@/assets/login-bg.unsplash.jpg') no-repeat center center fixed;
  23. background-size: cover;
  24. min-height: 100vh;
  25. > form {
  26. @extend .p-3;
  27. background-color: rgba(255, 255, 255, 0.7);
  28. max-width: 25rem;
  29. text-align: center;
  30. margin: 0 auto;
  31. > h1 {
  32. @extend .pb-2;
  33. }
  34. > input[type=text], > input[type=password] {
  35. @extend .form-control;
  36. @extend .mt-2;
  37. }
  38. > input[type=text] {
  39. @extend .mt-3;
  40. }
  41. > button[type=submit] {
  42. @extend .my-3;
  43. @extend .btn;
  44. @extend .btn-primary;
  45. }
  46. > .checkbox-container {
  47. @extend .mt-2;
  48. @extend .custom-control;
  49. @extend .custom-switch;
  50. > input[type=checkbox] {
  51. @extend .custom-control-input;
  52. }
  53. > label {
  54. @extend .custom-control-label;
  55. font-size: .9rem;
  56. vertical-align: baseline;
  57. }
  58. text-align: right;
  59. }
  60. > .login-error {
  61. @extend .pb-2;
  62. color: var(--danger);
  63. }
  64. > .login-success {
  65. @extend .pb-2;
  66. color: var(--success);
  67. }
  68. }
  69. }
  70. </style>