All files / src/components AuthLayout.vue

100% Statements 11/11
100% Branches 2/2
100% Functions 2/2
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154  87x 2x 2x         2x 2x   2x                             21x 21x     21x 1x                                                                                                                                                                                                                                                    
<template>
  <div class="auth-container">
    <div class="auth-content">
      <div class="auth-presentation">
        <div class="logo-title-container">
          <img class="logo-responsive" src="@/assets/logo.svg" alt="Flows" />
          <h1 class="display-5 flows-title">Flows</h1>
        </div>
        <h1 class="presentation-title">{{ presentationTitle }}</h1>
        <p class="presentation-subtitle">{{ presentationSubtitle }}</p>
      </div>
      <div class="auth-form">
        <slot />
      </div>
    </div>
  </div>
</template>
 
<script setup lang="ts">
import { onMounted, onUnmounted } from 'vue'
 
defineProps<{
  presentationTitle: string
  presentationSubtitle: string
}>()
 
onMounted(() => {
  document.body.classList.add('login')
})
 
onUnmounted(() => {
  document.body.classList.remove('login')
})
</script>
 
<style scoped>
/* Main container - full viewport height */
.auth-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
/* Content wrapper - max width and layout */
.auth-content {
  display: flex;
  gap: 0;
  min-width: 360px;
  max-width: 720px;
  color: #000000;
}
 
/* Presentation card - left side */
.auth-presentation {
  flex: 1;
  background: #ffffff;
  padding: 2em;
  color: #444444;
  text-align: center;
  border-radius: 0.375rem;
}
 
/* Auth form card - right side */
.auth-form {
  flex: 1;
  background: #dddddd;
  padding: 1.5rem;
  text-align: left;
  border-radius: 0.375rem;
}
 
/* Logo and title container */
.logo-title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
 
.logo-responsive {
  width: 220px;
}
 
.flows-title {
  margin: 0;
  font-weight: bold;
}
 
.presentation-title {
  margin-top: 1rem;
  font-size: 2.5rem;
}
 
.presentation-subtitle {
  margin-top: 1rem;
  font-size: 1.25rem;
}
 
/* Mobile responsive */
@media (max-width: 767px) {
  .auth-content {
    flex-direction: column;
    height: 100%;
    width: 100%;
  }
 
  .auth-presentation {
    padding: 0.5em;
    flex: 0 0 auto;
  }
 
  .auth-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
  }
 
  .logo-responsive {
    width: 60px;
  }
 
  .logo-title-container {
    justify-content: flex-start;
    margin-bottom: 0;
  }
 
  .flows-title {
    font-size: 2rem;
  }
 
  .presentation-title,
  .presentation-subtitle {
    display: none;
  }
}
 
/* Desktop - vertical logo layout */
@media (min-width: 768px) {
  .logo-title-container {
    flex-direction: column;
    gap: 0;
  }
}
</style>