-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
135 lines (118 loc) · 4.48 KB
/
Copy pathindex.html
File metadata and controls
135 lines (118 loc) · 4.48 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Phone Book | Home</title>
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="images/phone_logo.png" type="image/icon">
</head>
<body>
<header>
<h1>Phone Book</h1>
</header>
<main>
<div class="container">
<!-- Control Row -->
<p id="peopleAmount" class="people-amount"> <!--People Amount gets from script equals array length--> </p>
<div class="search-bar">
<div>
<input type="text" id="searchInput" placeholder="Search..." oninput="searchContacts()">
</div>
<div class="btns">
<button class="add-contact-btn" onclick="openPopup('addContactModal')">
<img src="./images/add_contact_btn.png" alt="add contact">
</button>
<button class="delete-all-btn" onclick="deleteAllContacts()">
<img src="./images/delete_all_btn.png" alt="delete all">
</button>
</div>
</div>
<!-- The Contacts List -->
<ul class="contact-list" id="contactList">
<!-- Contacts will be added here from Script dynamically-->
</ul>
</div>
</main>
<footer>
<p>All Rights Reserved Bshara © 2024</p>
</footer>
<!-- Contact Info Popup -->
<div id="infoContactModal" class="popup" onclick="closePopup(event, 'infoContactModal')">
<div class="window-style">
<button class="close-btn">×</button>
<div id="userDetailsContainer" class="user-details">
<!-- Contact details will be added here from Script in popup -->
</div>
</div>
</div>
<!-- Add Contact Popup -->
<div id="addContactModal" class="popup" onclick="closePopup(event, 'addContactModal')">
<div class="window-style">
<button class="close-btn">×</button>
<h2>Add Contact</h2>
<form>
<div class="form-group">
<label for="newContactName">Name:<span class="star">*</span></label>
<input type="text" id="newContactName" required>
</div>
<div class="form-group">
<label for="newContactPhone">Phone:<span class="star">*</span></label>
<input type="text" id="newContactPhone" required>
</div>
<div class="form-group">
<label for="newContactAddress">Address:</label>
<input type="text" id="newContactAddress">
</div>
<div class="form-group">
<label for="newContactEmail">Email:</label>
<input type="email" id="newContactEmail">
</div>
<div class="form-group">
<label for="new-image-url">Image URL:</label>
<input type="text" id="new-image-url" placeholder="Default Picsum Image">
</div>
<div class="form-group">
<textarea id="newContactMessage" placeholder="Your message" rows="5" cols="37"></textarea>
</div>
<button type="submit" class="btn-save" onclick="saveNewContact()">Save</button>
</form>
</div>
</div>
<!-- Edit Contact Popup -->
<div id="editContactModal" class="popup" onclick="closePopup(event, 'editContactModal')">
<div class="window-style">
<button class="close-btn">×</button>
<h2>Edit Contact</h2>
<form>
<div class="form-group">
<label for="editContactName">Name:<span class="star">*</span></label>
<input type="text" id="editContactName" required>
</div>
<div class="form-group">
<label for="editContactPhone">Phone:<span class="star">*</span></label>
<input type="text" id="editContactPhone" required>
</div>
<div class="form-group">
<label for="editContactAddress">Address:</label>
<input type="text" id="editContactAddress">
</div>
<div class="form-group">
<label for="editContactEmail">Email:</label>
<input type="email" id="editContactEmail">
</div>
<div class="form-group">
<label for="edit-image-url">Image URL:</label>
<input type="text" id="edit-image-url">
</div>
<div class="form-group">
<textarea id="editContactMessage" placeholder="Your message" rows="5" cols="37"></textarea>
</div>
<button type="button" class="btn-save" onclick="saveEditedContact()">Save</button>
</form>
</div>
</div>
<button class="toggleDarktBtn" onclick="toggleMode()">Dark Mode</button>
<script src="scripts.js"></script>
</body>
</html>