forked from RamezKamel4/Programming-Forum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
151 lines (131 loc) · 6.45 KB
/
main.html
File metadata and controls
151 lines (131 loc) · 6.45 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
148
149
150
151
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ProgZone - Main</title>
<link rel="stylesheet" href="css/main.css">
<script type="text/javascript" src="js/animations.js" defer></script>
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body {
margin-top: 20px;
}
.avatar {
width: 200px;
height: 200px;
}
</style>
</head>
<body style="">
<!-- HEADER -->
<header>
<h1 class="logo"><a class="logo2" href="main.html">ProgZone</a></h1>
<div id="profileButton" onclick="toggleCategory('guides')">
<a href="profile.html">
<img src="img/test1.jpg" alt="Profile Picture">
</a>
</div>
<nav class="top">
<ul class="categories">
<li><a class="discussions" href="discussions.html" onclick="toggleCategory('discussions')">Discussions</a></li>
<li><a class="questions" href="questions.html" onclick="toggleCategory('questions')">Questions</a></li>
<li><a class="guides" href="guides.html" onclick="toggleCategory('guides')">Guides</a></li>
</ul>
</nav>
</header>
<!-- HEADER -->
<div class="container bootstrap snippets bootdey">
<h1 class="text-primary">Edit Profile</h1>
<hr>
<div class="row">
<div class="col-md-3">
<div class="text-center">
<img src="https://bootdey.com/img/Content/avatar/avatar7.png" class="avatar img-circle img-thumbnail" alt="avatar" id="profile-pic">
<h6>Upload a different photo...</h6>
<input type="file" class="form-control" id="input-file">
</div>
</div>
<div class="col-md-9 personal-info">
<div class="alert alert-info alert-dismissable">
<a class="panel-close close" data-dismiss="alert">×</a>
<i class="fa fa-coffee"></i>
This is an <strong>.alert</strong>. Use this to show important messages to the user.
</div>
<h3>Personal info</h3>
<form class="form-horizontal" role="form">
<div class="form-group">
<label class="col-lg-3 control-label">First name:</label>
<div class="col-lg-8">
<input class="form-control" type="text" id="first-name" value="dey-dey">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Last name:</label>
<div class="col-lg-8">
<input class="form-control" type="text" id="last-name" value="bootdey">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Company:</label>
<div class="col-lg-8">
<input class="form-control" type="text" id="company" value="">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Email:</label>
<div class="col-lg-8">
<input class="form-control" type="text" id="email" value="janesemail@gmail.com">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Time Zone:</label>
<div class="col-lg-8">
<div class="ui-select">
<select id="user_time_zone" class="form-control">
<option value="Hawaii">(GMT-10:00) Hawaii</option>
<option value="Alaska">(GMT-09:00) Alaska</option>
<option value="Pacific Time (US & Canada)">(GMT-08:00) Pacific Time (US & Canada)</option>
<option value="Arizona">(GMT-07:00) Arizona</option>
<option value="Mountain Time (US & Canada)">(GMT-07:00) Mountain Time (US & Canada)</option>
<option value="Central Time (US & Canada)" selected="selected">(GMT-06:00) Central Time (US & Canada)</option>
<option value="Eastern Time (US & Canada)">(GMT-05:00) Eastern Time (US & Canada)</option>
<option value="Indiana (East)">(GMT-05:00) Indiana (East)</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-12">
<button type="button" class="btn btn-primary" onclick="saveChanges()">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
</div>
<hr>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script type="text/javascript">
let Default_pfp = document.getElementById("profile-pic");
let inputFile = document.getElementById("input-file");
function saveChanges() {
// Get the selected file from the input
let selectedFile = inputFile.files[0];
// Check if a file is selected
if (selectedFile) {
// Use FileReader to read the file
let reader = new FileReader();
reader.onload = function (e) {
// Set the profile picture source to the read data (base64)
Default_pfp.src = e.target.result;
// You can send this information to the server for storage or perform other actions
};
// Read the file as a data URL
reader.readAsDataURL(selectedFile);
}
}
</script>
</body>
</html>