Vuetify Mobile Fill Entire Screen in Portrait - vue.js

When I test my app in mobile portrait mode it looks like this:
Mobile portrait
But I'm trying to make it look like this from Vuetify
In landscape its fantastic, portrait no luck. I'm using fluid and fill-height on the v-container but no luck.
I've also tried height="100vh" on the container but that also didn't work.
This is some sample code that's been simplified and it doesn't work either:
<template>
<v-container fluid fill-height>
<v-layout>
<v-row align="center" justify="center" class="mx-auto">
<v-col cols="8">
<v-card
outlined
class="d-flex"
>
<v-text-field
color="#F03C99"
label="Email"
placeholder="Email for Your Showroom"
outlined
class="ml-4"
></v-text-field>
</v-card>
</v-col>
</v-row>
</v-layout>
</v-container>
</template>
I'm starting to think that it might be that I'm using router-view this is what I have in my router
<template>
<v-app>
<router-view name="navigation" :key="$route.fullPath"></router-view>
<router-view class="fill-height" key="main"></router-view>
<router-view name="confirm"></router-view>
</v-app>
</template>
Here is my real code:
<template>
<v-container fluid fill-height>
<v-layout>
<v-row align="center" justify="center" class="mx-auto">
<v-col :cols="overallColumns">
<v-card
outlined
>
<v-row>
<v-col
:cols="accountForImage"
align="start"
>
<v-card-title>
<v-img src='small-bella-logo.png' max-height="41px" max-width="128px" contain></v-img>
</v-card-title>
<v-form>
<v-text-field
v-model="email"
color="#F03C99"
label="Email"
:rules="[rules.email]"
placeholder="Email for Your Showroom"
outlined
class="ml-4"
:class="marginRight"
:error-messages="errorMessage"
data-cy="login"
></v-text-field>
<v-text-field
v-model="password"
color="#F03C99"
label="Password"
placeholder="Enter your password"
outlined
class="ml-4"
:class="marginRight"
:append-icon="passwordVisible ? 'visibility' : 'visibility_off'"
:type="passwordVisible ? 'text' : 'password'"
#click:append="passwordVisible = !passwordVisible"
data-cy="password"
></v-text-field>
<v-row
class="mt-n5"
>
<v-col
:cols="stackColumns"
align="start">
<v-btn
color="#AF3482"
class="white--text ml-4"
data-cy="login-button"
#click="logInWithBella"
>LOGIN</v-btn>
</v-col>
<v-col
:cols="stackColumns"
:align="alignStackedColumnToEnd"
class="mt-2"
:class="marginLeftWhenStacked"
>
<h1
#click="forgotPassword"
class="caption font-weight-bold ml-4 pointer pink_text"
>FORGOT PASSWORD?</h1>
</v-col>
</v-row>
<v-row align="center" justify="center">
<v-col cols="12" align="center" justify="center">
<v-divider class="ml-4"></v-divider>
</v-col>
</v-row>
<v-row
justify="space-between"
>
<v-col
:cols="columnsFiveAndTwelve"
:align="alignStackedColumnToCenter"
justify="start">
<v-btn
class="ml-4 white--text"
color="#3B5998"
#click="logInWithFacebook()"
medium>
LOGIN WITH FACEBOOK
</v-btn>
</v-col>
<v-col
:cols="columnsFiveAndTwelve"
:align="alignStackedColumnToCenter"
justify="end">
<v-btn
class="white--text"
:class="marginLeftAndNegativeLeft"
color="#DB4437"
#click="logInWithGoogle()"
medium
>
LOGIN WITH GOOGLE
</v-btn>
</v-col>
</v-row>
<v-row align="center" justify="center">
<v-col cols="12" align="center" justify="center">
<v-divider class="ml-4"></v-divider>
</v-col>
</v-row>
<v-row align="start" justify="center">
<v-col cols="12" align="start" justify="center">
<h1 class=" ml-4 font title font-weight-regular">
No Account?
</h1>
<v-btn
class="ml-4 white--text mt-2"
:class="marginBottom"
color="#AF3482"
block
#click="sendAndCreateToken"
>
SIGN UP AND CREATE SHOWROOM
</v-btn>
</v-col>
</v-row>
</v-form>
</v-col>
<v-col
cols="6"
align="center"
class=""
v-if="removeImage"
>
<v-img src="login.png" class="mt-10" max-height="519px" max-width="187px" contain></v-img>
</v-col>
</v-row>
</v-card>
</v-col>
</v-row>
<p>{{ $vuetify.breakpoint.name }}</p>
</v-layout>
</v-container>
</template>

Related

Why are colors not visible in the vuetify buttons?

i have made a card for sign in and there are no colours on any of the created components. the bottom of card consitst of two button but even those colors are not visible. i have attached the template section of my code. even the blue color of text fields is not visible. what can be the possible error?
<template>
<div>
<v-container>
<v-layout wrap>
<v-row>
<v-col cols="5">
<v-img
src="https://image.freepik.com/free-vector/programmer-working-flat-style_52683-15041.jpg?w=740"
width="500"
height="400"
></v-img>
</v-col>
<v-col cols="7" align-self="end">
<v-flex sm12 md-8 offset-md3>
<v-card elevation="6" width="700">
<v-card-title>
<v-layout align-center justify-space-between>
<h3 class="headline">Sign In</h3>
</v-layout>
</v-card-title>
<v-divider></v-divider>
<v-card-text>
<p>Sign in with your username and password:</p>
<v-text-field
autofocus
label="Email"
v-model="email"
type="email"
></v-text-field>
<v-text-field
outline
hide-details
label="Password"
type="password"
v-model="password"
></v-text-field>
</v-card-text>
<br />
<v-divider></v-divider>
<v-container class="px-5" >
<v-checkbox
class="pl-1"
dense
label="Remember Me"
></v-checkbox>
</v-container>
<v-card-actions>
<v-btn class="green--text" color="info" flat to="/forgotdialogue">
Forgot password?
</v-btn>
<v-spacer></v-spacer>
<!-- <landingpage :username="username"></landingpage> -->
<v-btn #click="signUp" color="info">
<v-icon left>mdi-lock</v-icon>
Signup
</v-btn>
</v-card-actions>
</v-card>
</v-flex>
</v-col>
</v-row>
</v-layout>
</v-container>
</div>
</template>
Got it
i just had to change my App.vue file.
in App.vue I included the code in between v-app tags. After this all the colors were restored. Read about it here in this vuetify page https://vuetifyjs.com/en/components/application/

vuetify grid nested row : understanding 12 cols system

I'm new on vue.js and vuetify and i'm playing with vuetify grid exemple.
I'm trying to get the same size for cols-4 and cols-7 cards and cols-3 and cols-5 cards
what I have
expected
<div id="app"><v-app id="inspire">
<v-container class="grey lighten-5">
<v-row>
<v-col cols="12">
<v-card>
.col-12
</v-card>
</v-col>
</v-row>
<v-row>
<v-col cols="4">
<v-card>
.col-4
</v-card>
</v-col>
<v-col cols="3">
<v-card>
.col-3
</v-card>
</v-col>
<v-col cols="5">
<v-card>
.col-5
</v-card>
</v-col>
</v-row>
<v-row>
<v-col cols="7">
<v-row>
<v-col cols="12">
<v-card>
.col-12
</v-card>
</v-col>
</v-row>
<v-row>
<v-col cols="7">
<v-card>
.col-7
</v-card>
</v-col>
<v-col cols="5">
<v-card>
.col-5
</v-card>
</v-col>
</v-row>
</v-col>
<v-col cols="5">
<v-card>
.col-5 Subsequent columns continue along the new line.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
</v-card>
</v-col>
</v-row>
</v-container>
codepen : https://codepen.io/Biereblonde/pen/bGVPMKZ
thanks

How to add image to v-card in vuetify

I want to achieve the design show in the image below:
My current design:
My code is:
<v-card v-for="book in books" :key="book.id" class="mb-2" tile="">
<v-img :src="book.image" max-width="80"></v-img>
<v-card-title>{{ book.title }} </v-card-title>
<v-card-subtitle>{{ book.author }}</v-card-subtitle>
</v-card>
Use the grid row>cols ...
<v-card class="mb-2" tile="">
<v-row align="start">
<v-col class="shrink">
<v-img src="//placehold.it/80x120" max-width="80" class="ml-3"></v-img>
</v-col>
<v-col>
<v-card-title class="pa-0">Title</v-card-title>
<v-card-subtitle>Author</v-card-subtitle>
</v-col>
</v-row>
</v-card>
Demo: https://codeply.com/p/7aOBDcIOke

Not getting designed layout

Vuetify official example
I have, say copied the layout from the vuetify docs but I am not getting the same layout. I cannot figure out what is blocking me. Is there some default properties that I have to deal with?
Login.vue:
<template>
<v-app id="inspire">
<v-content>
<v-container
class="fill-height"
fluid
>
<v-row
align="center"
justify="center"
>
<v-col
cols="12"
sm="8"
md="4"
>
<v-card class="elevation-12">
<v-toolbar
color="primary"
dark
flat
>
<v-toolbar-title>Login</v-toolbar-title>
<v-spacer />
</v-toolbar>
<v-card-text>
<v-form>
<v-text-field
label="Login"
name="login"
prepend-icon="person"
type="text"
v-model="username"
/>
<v-text-field
id="password"
label="Password"
name="password"
prepend-icon="lock"
type="password"
v-model="password"
/>
</v-form>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn #click="login" color="primary" >Login</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-container>
</v-content>
</v-app>
</template>
app.vue:
<template>
<v-app id="app">
<v-content>
<v-container fluid>
<router-view />
</v-container>
</v-content>
</v-app>
</template>
<script>
I do not have any custom designed css. I am using vue-cli.
Here is what my layout looks like:
With no error in console.

Center the different blocks in a v-card

I would like to center the login, password and login blocks.
I want to center the different blocks but I do not know how to do it at this level.
I tried with v-flex and v-layout but it does not pass.
In the code I tried to center the first and second block with v-layout and v-flex but without satisfactory result.
<template>
<div>
<v-app-bar
color="teal accent-3"
dark
>
<v-spacer></v-spacer>
<v-flex xs="12"><p class="text-justify">Application de traitement des opérations</p></v-flex>
<v-menu
left
bottom
>
<v-list>
<v-list-item
v-for="n in 5"
:key="n"
#click="() => {}"
>
<v-list-item-title>Option {{ n }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</v-app-bar>
<div>
<v-card
class="mx-auto"
height="100"
max-width="200"
outlined
color="orange lighten-2"
></v-card>
<v-card
class="mt-n12 mx-auto"
elevation="12"
height="400"
max-width="600"
>
<V-layout>
<v-flex xs="12">
<div class="text-xs-center">
<v-col cols="12" sm="6" md="3">
<v-text-field
label="Solo"
placeholder="Login"
solo
></v-text-field>
</v-col>
<v-col cols="12" sm="6" md="3">
<v-text-field
label="Solo"
placeholder="Mot de passe"
solo
></v-text-field>
</v-col>
</div>
<el-button type="primary" #click="dialogVisible = true" >Connexion</el-button>
<el-dialog
title="Verification de Connexion"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<span>Connexion reussi</span>
<span slot="footer" class="dialog-footer">
<el-button #click="dialogVisible = false">Annuler la connexion</el-button>
<el-button type="primary" #click="dialogVisible = false">Continuer</el-button>
</span>
</el-dialog>
</v-flex >
</V-layout>
</v-card>
</div>
</div>
</template>
There's a lot of ways to do this. You could use flex with display row, but it sounded like you tried that? If so you can also try setting these to display: block, and setting margin: auto.