Inputs setup
This commit is contained in:
parent
34a36f8b1e
commit
d9ec085d2c
@ -1,8 +1,17 @@
|
||||
# English translations (some examples to remove)
|
||||
|
||||
login.guest.login=log in
|
||||
login.guest.register=register
|
||||
login.guest.welcome=Please Register here
|
||||
login.success=You are now registered as $name
|
||||
login.guest.firstname= Firstname
|
||||
login.guest.signin=Sign in
|
||||
login.guest.register=Register
|
||||
login.guest.alregister=Already Registered
|
||||
login.guest.welcome=WELCOME TO THE UNIVERSITY
|
||||
login.guest.email=E-MAIL
|
||||
login.guest.firstname= FIRSTNAME
|
||||
login.guest.surname=SURNAME
|
||||
login.guest.country=COUNTRY
|
||||
login.guest.address=ADDRESS
|
||||
login.guest.password=PASSWORD
|
||||
login.guest.nextpage=Next Page
|
||||
login.guest.lastpage=Last Page
|
||||
login.guest.submit=Submit
|
||||
|
||||
#=====================================================
|
||||
|
@ -1,8 +1,17 @@
|
||||
# Traductions françaises (Quelques examples a enlever)
|
||||
|
||||
login.guest.login=s'identifier
|
||||
login.guest.register=s'enregistrer
|
||||
login.guest.welcome=Veuillez vous enregistrer ici
|
||||
login.success=Vous êtes maintenant identifié comme $name
|
||||
login.guest.firstrname= Prénom
|
||||
login.guest.signin=SE CONNECTER
|
||||
login.guest.register=S'enregistrer
|
||||
login.guest.alregister=Déjà Enregistré
|
||||
login.guest.welcome=BIENVENUE A L'UNIVERSITE
|
||||
login.guest.email=E-MAIL
|
||||
login.guest.firstname= PRENOM
|
||||
login.guest.surname= NOM
|
||||
login.guest.country= PAYS
|
||||
login.guest.address=ADRESSE
|
||||
login.guest.password= MOT DE PASSE
|
||||
login.guest.nextpage=Prochaine Page
|
||||
login.guest.lastpage=Derniere Page
|
||||
login.guest.submit=Envoyer
|
||||
|
||||
#=====================================================
|
||||
|
@ -1,11 +1,21 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import i18n from './i18n.js'
|
||||
|
||||
const login= ref(true)
|
||||
const page = ref(0)
|
||||
|
||||
const message = ref(i18n("login.guest.login") )
|
||||
const emailIN=ref("")
|
||||
const passwordIN=ref("")
|
||||
const surname=ref("")
|
||||
const firstname=ref("")
|
||||
const passwordOUT=ref("")
|
||||
const emailOUT=ref("")
|
||||
const address=ref("")
|
||||
const country=ref("")
|
||||
|
||||
const inputs = [emailIN,passwordIN]
|
||||
const outputs= [surname,firstname,passwordOUT,emailOUT,address,country]
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -16,66 +26,71 @@
|
||||
|
||||
<div v-if="login">
|
||||
<div class="form">
|
||||
<h1 style="color:rgb(239,60,168); font-family: sans-serif;">SIGN IN</h1>
|
||||
<h1 style="color:rgb(239,60,168); font-family: sans-serif;">{{i18n("login.guest.signin")}}</h1>
|
||||
<div class="inputBox">
|
||||
<p>USERNAME</p>
|
||||
<input type="text" required>
|
||||
<p>ID / {{i18n("login.guest.email")}}</p>
|
||||
<input type="text" v-model="emailIN">
|
||||
</div>
|
||||
<div class="inputBox">
|
||||
<p>PASSWORD</p>
|
||||
<input type="password" required>
|
||||
<p>{{i18n("login.guest.password")}}</p>
|
||||
<input type="password" v-model="passwordIN">
|
||||
</div>
|
||||
<div class="register">
|
||||
<a @click="login=!login">Register</a>
|
||||
<a @click="login=!login">{{i18n("login.guest.register")}}</a>
|
||||
</div>
|
||||
<div class="inputBox">
|
||||
<input type="submit" value="Login">
|
||||
<button @click="console.log(inputs)">{{i18n("login.guest.submit")}}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div class="form">
|
||||
<h1 style="color:rgb(239,60,168); font-family: sans-serif; text-align:center;">WELCOME TO THE UNIVERSITY</h1>
|
||||
<h1 style="color:rgb(239,60,168); font-family: sans-serif; text-align:center;">{{i18n("login.guest.welcome")}}</h1>
|
||||
|
||||
<div v-if="page === 0">
|
||||
<div class="inputBox">
|
||||
<p>LASTNAME</p>
|
||||
<input type="text" required>
|
||||
<p>{{i18n("login.guest.surname")}}</p>
|
||||
<input type="text" v-model="surname">
|
||||
</div>
|
||||
<div class="inputBox">
|
||||
<p>{{ message }}</p>
|
||||
<input type="text" required>
|
||||
<p>{{i18n("login.guest.firstname")}}</p>
|
||||
<input type="text" v-model="firstname">
|
||||
</div>
|
||||
<div class="inputBox">
|
||||
<p>PASSWORD</p>
|
||||
<input type="password" required>
|
||||
<p>{{i18n("login.guest.password")}}</p>
|
||||
<input type="password" v-model="passwordOUT">
|
||||
</div>
|
||||
<div class="inputBox">
|
||||
<button @click="page++">Next page</button>
|
||||
<div class="switchpage">
|
||||
<button @click="page++">{{i18n("login.guest.nextpage")}}</button>
|
||||
|
||||
</div>
|
||||
<div @click="(login=!login) && (page=0)" class="register">
|
||||
<a>Already Registered</a>
|
||||
<a>{{i18n("login.guest.alregister")}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="inputBox">
|
||||
<p>E-MAIL</p>
|
||||
<input type="mail" required>
|
||||
<p>{{i18n("login.guest.email")}}</p>
|
||||
<input type="mail" v-model="emailOUT">
|
||||
</div>
|
||||
<div class="inputBox">
|
||||
<p>ADDRESS</p>
|
||||
<input type="text" required>
|
||||
<p>{{i18n("login.guest.address")}}</p>
|
||||
<input type="text" v-model="address">
|
||||
</div>
|
||||
<div class="inputBox">
|
||||
<p>COUNTRY</p>
|
||||
<input type="text" required>
|
||||
<p>{{i18n("login.guest.country")}}</p>
|
||||
<input type="text" v-model="country">
|
||||
</div>
|
||||
<div class="inputBox">
|
||||
<button @click="page--">Last page</button>
|
||||
<div style="align-self:center;" class="inputBox">
|
||||
<button style="margin-top:25px;" @click="console.log(outputs)">{{i18n("login.guest.submit")}}</button>
|
||||
</div>
|
||||
<div @click="(login=!login) && (page=0)" class="register">
|
||||
<a>Already Registered</a>
|
||||
<div class="switchpage">
|
||||
<button @click="page--">{{i18n("login.guest.lastpage")}}</button>
|
||||
</div>
|
||||
<div @click="(login=!login) && (page=0)" class="register">
|
||||
<a>{{i18n("login.guest.alregister")}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -119,7 +134,8 @@
|
||||
}
|
||||
|
||||
|
||||
.inputBox input {
|
||||
.inputBox input,button {
|
||||
|
||||
width:100%;
|
||||
background:rgb(255, 0 255);
|
||||
border: none;
|
||||
@ -148,9 +164,21 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.switchpage{
|
||||
width:100px;
|
||||
background:rgb(255, 0 255);
|
||||
border: none;
|
||||
padding-right:0;
|
||||
padding-top:10px;
|
||||
padding-bottom:10px;
|
||||
outline:none;
|
||||
border-radius: 4px;
|
||||
font-size:0.8em;
|
||||
align-self:right;
|
||||
|
||||
button , input[type = "submit"] {
|
||||
margin-top:40px;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-bottom:20px;
|
||||
background-color: rgb(239,60,168);
|
||||
cursor: pointer;
|
||||
@ -161,7 +189,7 @@ button , input[type = "submit"] {
|
||||
|
||||
}
|
||||
|
||||
button:active , input[type = "submit"]:active{
|
||||
button:active ,.switchpage:active{
|
||||
opacity:0.8;
|
||||
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ export async function loadLangs(lang){
|
||||
lang = lang != null ? lang : getCookie("lang");
|
||||
lang = lang != "" ? lang : default_lang;
|
||||
|
||||
const filename = "./i18n/" + lang.toUpperCase() + ".txt";
|
||||
const filename = "/i18n/" + lang.toUpperCase() + ".txt";
|
||||
const content = await (await fetch(filename)).text();
|
||||
const lines = content.split("\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user