-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
147 lines (122 loc) · 5.12 KB
/
index.html
File metadata and controls
147 lines (122 loc) · 5.12 KB
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
<!DOCTYPE html>
<!-- Alpine Variable -->
<html lang="en"
x-data="{
name:'',
age:'',
gender:'',
Salary:'',
wtype:'',
darkMode: false,
info:[
{ names:'Twanst',ages:'21',genders:'Male',salarys:2000,worktypes:'FullStack' },
],
deleteEmployee(infos) {
// Delete employee logic
this.info.splice(infos, 1);
},
}">
<!-- Alpine Variable -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Employ List Salary</title>
<link rel="icon" type="image/x-icon" href="/image/company.png">
<!-- bootstrap Style -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<!-- alpine js -->
<script src="//unpkg.com/alpinejs" defer></script>
<!-- default style Coustumize -->
<style>
.custom-shadow{
box-shadow: 1px 8px 8px 1px rgba(0, 140, 255, 0.2); /* Change the color by modifying the rgba values */
}
</style>
<link rel="stylesheet" href="./style.css">
<!-- default style Coustumize -->
</head>
<body :class="{ 'dark': darkMode }">
<div class="container">
<!-- navBar -->
<nav class="navbar navbar-expand-lg bg-body-tertiary rounded-3 mt-2 custom-shadow ">
<div class="container-fluid">
<a class="navbar-brand" href="index.html"><img src="./image/company.png" width="50px"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
</ul>
</div>
</div>
<div class="d-flex">
<button class="border-0 btn" @click="darkMode = !darkMode"><img src="./image/moon.png" width="50"></button>
</div>
</nav>
<!-- navBar -->
<h3 class="text-center display-5 mt-3 mb-3">Employ List Salary </h3>
<!-- alpine js -->
<div class="row">
<div class="col-12 col-lg-4 col-xl-4">
<input type="text" class="form-control form-control-sm" x-model="name" placeholder="Name">
</div>
<div class="col-12 col-lg-4 col-xl-4">
<input type="text" class="form-control form-control-sm" x-model="age" placeholder="Age">
</div>
<div class="col-12 col-lg-4 col-xl-4">
<select x-model="gender" class="form-control form-control-sm">
<optgroup label="Gender">
<option value="Male" >Male</option>
<option value="Female" >Female</option>
</optgroup>
</select>
</div>
<div class="col-12 col-lg-4 col-xl-4 mt-2">
<input type="number" class="form-control form-control-sm" x-model="salary" placeholder="Salary">
</div>
<div class="col-12 col-lg-4 col-xl-4 mt-2">
<select x-model="wtype" class="form-control form-control-sm">
<optgroup label="Work Type">
<option value="Frontend" >Frontend</option>
<option value="Backend" >Backend</option>
<option value="Ux/Ui" >Ux/Ui</option>
<option value="Graphic" >Graphic</option>
<option value="fullstack" >fullstack</option>
<option value="cybersecurity" >cybersecurity</option>
</optgroup>
</select>
</div>
<div class="col-12 col-lg-4 col-xl-4 mt-2">
<button class="btn btn-success w-100 btn-sm" @click="info.push({names:name,ages:age,genders:gender,salarys:salary,worktypes:wtype})">ADD</button>
</div>
</div>
<div class="row mt-4 ">
<template x-for="infos in info">
<div class="card m-2" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title" x-text="'Name: '+infos.names"></h5>
<h6 class="card-subtitle mb-2 text-body-secondary" x-text="'Age: '+infos.ages+' Years'"></h6>
<p class="card-text" x-text="'Gender: '+infos.genders"></p>
<p class="card-text" x-text="'Salary: '+infos.salarys+' $'"></p>
<p class="card-text" x-text="'Work Type: '+infos.worktypes"></p>
<button @click="deleteEmployee(infos)" class="btn btn-danger btn-sm">Delete</button>
</div>
</div>
</div>
</div>
</template>
</div>
</div>
</body>
</html>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>