added date input & responsive

This commit is contained in:
Chneemann 2024-04-07 11:24:46 +02:00
parent 5f8813b9ba
commit 10925b2f10
3 changed files with 45 additions and 17 deletions

View file

@ -51,6 +51,26 @@
</div> </div>
</div> </div>
<div class="middle-spacer"><div class="line"></div></div> <div class="middle-spacer"><div class="line"></div></div>
<div class="right-side"></div> <div class="right-side">
<div class="date">
<p>Due date<span class="red-dot">*</span></p>
<input
type="date"
id="date"
name="date"
#date="ngModel"
placeholder="{{ taskData.date }}"
[(ngModel)]="taskData.date"
placeholder=""
autocomplete="off"
required
/>
<div class="error-msg">
@if (!date.valid && date.touched) {
<p>You must enter a date.</p>
}
</div>
</div>
</div>
</form> </form>
</section> </section>

View file

@ -6,24 +6,19 @@ section {
.content { .content {
display: flex; display: flex;
margin-top: 48px;
width: 100%;
} }
input { input,
color: var(--light-gray);
font-size: 20px;
font-weight: 400;
border-radius: 10px;
border: 1px solid var(--light-gray);
padding: 12px 21px;
}
textarea { textarea {
color: var(--light-gray); color: var(--light-gray);
font-size: 20px; font-size: 20px;
font-weight: 400; font-weight: 400;
border-radius: 10px; border-radius: 10px;
border: 1px solid var(--light-gray); border: 1px solid var(--light-gray);
padding: 18px 16px; padding: 12px 21px;
width: 80%;
resize: none; resize: none;
} }
@ -54,18 +49,30 @@ p {
font-size: 61px; font-size: 61px;
font-weight: 700; font-weight: 700;
} }
margin-bottom: 48px;
} }
/*------------- LEFT SIDE -------------*/ /*------------- LEFT SIDE -------------*/
.left-side {
width: 45%;
}
/*------------- MIDDLE -------------*/ /*------------- MIDDLE -------------*/
.middle-spacer {
display: flex;
justify-content: center;
width: 10%;
height: auto;
.line { .line {
width: 1px; width: 1px;
height: 520px;
background-color: var(--light-gray); background-color: var(--light-gray);
margin: 0 48px; margin: 0 6px;
}
} }
/*------------- RIGHT SIDE -------------*/ /*------------- RIGHT SIDE -------------*/
.right-side {
width: 45%;
}

View file

@ -12,6 +12,7 @@ export class AddTaskComponent {
taskData = { taskData = {
title: '', title: '',
description: '', description: '',
date: '',
}; };
onSubmit(ngForm: NgForm) { onSubmit(ngForm: NgForm) {