More global styling, improved modal form styling

This commit is contained in:
Colin Kallemein 2024-06-14 22:14:33 +02:00
parent 4e708dbd61
commit 92103cea9e
5 changed files with 71 additions and 30 deletions

View File

@ -13,3 +13,7 @@ $cyan: #368f8b;
$dark-cyan: #376362; $dark-cyan: #376362;
$light-cyan: #00b3b3; $light-cyan: #00b3b3;
$green: #09ad19; $green: #09ad19;
// Fonts
$titles: 'Poppins', serif;
$default: 'Inter', serif;

View File

@ -23,7 +23,7 @@ h5,
h6, h6,
button, button,
a { a {
font-family: 'Poppins', serif; font-family: $titles;
color: $white; color: $white;
font-weight: 500; font-weight: 500;
} }
@ -32,9 +32,10 @@ p,
span, span,
li, li,
label { label {
font-family: 'Inter', serif; font-family: $default;
color: $white; color: $white;
} }
button, button,
a { a {
font-weight: 500; font-weight: 500;
@ -45,6 +46,24 @@ button,
input { input {
border: none; border: none;
background-color: transparent; background-color: transparent;
&[type="number"] {
-webkit-appearance: textfield;
-moz-appearance: textfield;
appearance: textfield;
}
&[type=number]::-webkit-inner-spin-button,
&[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
}
}
.input-cyan {
border: 1px solid $cyan;
background-color: rgba($white, 0.8);
&:focus, &:focus-visible {
outline: $cyan auto 2px;
}
} }
button { button {

View File

@ -275,23 +275,37 @@ function handleResize() {
display: inline; display: inline;
.form-fields { .form-fields {
.form-field {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-bottom: 20px; margin-bottom: 20px;
label { label {
margin-bottom: 10px; margin-bottom: 5px;
font-family: 'Poppins'; font-family: $titles;
} }
input { input {
max-width: 250px; max-width: 250px;
font-family: 'Poppins'; font-family: $titles;
border: 1px solid $cyan;
border-radius: 5px; border-radius: 5px;
background-color: rgba($white, 0.8);
padding: 8px 10px; padding: 8px 10px;
} }
&.two-col {
flex-direction: row;
gap: 20px;
.field {
display: flex;
flex-direction: column;
margin-bottom: 0;
input {
max-width: 105px;
}
}
}
}
} }
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<Modal :isModalOpen="true" @modal:close="() => zoneEditorStore.toggleSettingsModal()"> <Modal :isModalOpen="true" @modal:close="() => zoneEditorStore.toggleSettingsModal()" :modal-height="440">
<template #modalHeader> <template #modalHeader>
<h3 class="modal-title">Zone settings</h3> <h3 class="modal-title">Zone settings</h3>
</template> </template>
@ -7,21 +7,23 @@
<template #modalBody> <template #modalBody>
<form method="post" @submit.prevent="" class="modal-form"> <form method="post" @submit.prevent="" class="modal-form">
<div class="form-fields"> <div class="form-fields">
<div> <div class="form-field">
<label for="name">Name</label> <label for="name">Name</label>
<input v-model="name" name="name" id="name" /> <input class="input-cyan" v-model="name" name="name" id="name" />
</div> </div>
<div> <div class="form-field two-col">
<div class="field">
<label for="name">Width</label> <label for="name">Width</label>
<input v-model="width" name="name" id="name" type="number" /> <input class="input-cyan" v-model="width" name="name" id="name" type="number" />
</div> </div>
<div> <div class="field">
<label for="name">Height</label> <label for="name">Height</label>
<input v-model="height" name="name" id="name" type="number" /> <input class="input-cyan" v-model="height" name="name" id="name" type="number" />
</div> </div>
<div> </div>
<div class="form-field">
<label for="name">PVP enabled</label> <label for="name">PVP enabled</label>
<input name="name" id="name" /> <input class="input-cyan" name="name" id="name" />
</div> </div>
</div> </div>
</form> </form>

View File

@ -46,8 +46,10 @@
<template #modalBody> <template #modalBody>
<form method="post" @submit.prevent="create" class="modal-form"> <form method="post" @submit.prevent="create" class="modal-form">
<div class="form-fields"> <div class="form-fields">
<div class="form-field">
<label for="name">Name</label> <label for="name">Name</label>
<input v-model="name" name="name" id="name" /> <input class="input-cyan" v-model="name" name="name" id="name" />
</div>
</div> </div>
<div class="submit"> <div class="submit">
<button class="btn-cyan" type="submit">CREATE</button> <button class="btn-cyan" type="submit">CREATE</button>