-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhome.html
More file actions
235 lines (208 loc) · 10.2 KB
/
home.html
File metadata and controls
235 lines (208 loc) · 10.2 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
{% load staticfiles %} {% block title %}Profile{% endblock %} {% block head %} {% endblock %} {% block content %}
<!DOCTYPE html>
<html>
<title>Pitch- Find Your Pitch</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{%static 'css/w3.css' %}">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lora">
<link href="/static/css/custom.css" rel="stylesheet" type="text/css" />
<!-- To use Geocoding from Google Maps V3 you need to link https://maps.googleapis.com/maps/api/js?sensor=false -->
<link href= "{%static 'css/fullcalendar.css'%}" rel='stylesheet' />
<link href= "{%static 'css/fullcalendar.print.css'%}" rel='stylesheet' media='print' />
<script src="{%static 'js/moment.min.js'%}"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="{%static 'js/fullcalendar.min.js'%}"></script>
<script>
$(document).ready(function() {
data = {{events|safe}};
var date = Date();
console.log(date)
$('#calendar').fullCalendar({
//<!--Header Section Including Previous,Next and Today-->
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
//<!--Default Date-->
defaultDate: date,
editable: true,
//<!--Event Section-->
eventLimit: true, // allow "more" link when too many events
events: data
});
});
</script>
</head>
<body class="w3-light-grey w3-content" style="max-width:1600px; margin-top: 20px;">
<!-- Sidenav/menu -->
<nav class="w3-sidenav w3-white w3-animate-left w3-center w3-text-grey w3-collapse w3-top" style="z-index:3;width:300px;font-weight:bold" id="mySidenav"><br>
<h3 class="w3-padding-64">{{user.first_name}}<br> {{user.last_name}}</h3>
<a href="javascript:void(0)" onclick="w3_close()" class="w3-padding w3-hide-large">CLOSE</a>
<a href="/" onclick="w3_close()" class="w3-padding">PITCH</a>
<a href="/board/" onclick="w3_close()" class="w3-padding">GO TO BOARDS</a>
{% if not current_user %}
<a onclick="window.location.href='/home/profile/{{pk}}/' ">UPDATE PROFILE</a>
{% endif %}
<a href="#about" onclick="w3_close()" class="w3-padding"><strong>ABOUT ME</strong></a>
<a href="#contact" onclick="w3_close()" class="w3-padding">CONTACT</a>
{% if user.userprofile.type_user == 'Venue' %}
<a href="/my_events" onclick="w3_close()" class="w3-padding">MY EVENTS</a>
{% endif %}
{% if user.userprofile.type_user == 'Musician' %}
<a href="/my_ads" onclick="w3_close()" class="w3-padding">MY ADS</a>
{% endif %}
<a href="/logout/" onclick="w3_close()" class="w3-padding">LOGOUT</a>
</nav>
<!-- Top menu on small screens -->
<header class="w3-container w3-top w3-hide-large w3-white w3-xlarge w3-padding-16">
<span class="w3-left w3-padding">{{user.username}}</span>
<a href="javascript:void(0)" class="w3-right w3-btn w3-white" onclick="w3_open()">☰</a>
</header>
<!-- Overlay effect when opening sidenav on small screens -->
<div class="w3-overlay w3-hide-large w3-animate-opacity" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>
<!-- !PAGE CONTENT! -->
<div class="w3-main" id="w3-main" style="margin-left: 300px;">
<!-- About section -->
<div class="w3-container w3-dark-grey w3-center w3-text-light-grey w3-padding-32" id="about" style="
background: #43C6AC; /* fallback for old browsers */
background: -webkit-linear-gradient(to left, #43C6AC , #191654); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to left, #43C6AC , #191654); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
background: fill;">
<h4><b>ABOUT ME</b></h4> {% if profile_pic.url != None %}
<img src="{{profile_pic.url}}" class="w3-image w3-padding-32" width="600" height="650" style="border-radius:50px"> {% else %}
<img src="https://cdn0.iconfinder.com/data/icons/people-12/24/Anonymous-1-512.png" class="w3-image w3-padding-32" width="300" height="350"> {% endif %}
<div class="w3-content w3-justify" style="max-width:600px">
{% if user.userprofile.type_user == "Musician" %}
<h4>{{user.username}}: {{user.userprofile.type_user}}</h4>
<p>{{user.userprofile.bio}}</p>
<p>Email: {{user.email}}</p>
<p>Phone: {{user.userprofile.phonenumber}}</p>
{% if user.userprofile.soundcloud_username %}
<p style="font-size: 20px">
Check out my SoundCloud!
</p>
<iframe allowtransparency="true" scrolling="no" frameborder="no" src="https://w.soundcloud.com/icon/?url=http%3A%2F%2Fsoundcloud.com%2F{{soundcloud_username}}&color=orange_white&size=56" style="width: 56px; height: 56px;"></iframe>
{% endif %}
<p>
Availability: {{user.userprofile.available}}
</p>
<hr class="w3-opacity">
<h4 class="w3-padding-16">Type of Music I Play</h4>
<p class="w3-wide">{{user.userprofile.genre}}</p>
<hr class="w3-opacity">
<div class="w3-row-padding" style="margin:0 -16px">
{% else %}
<h4>{{user.username}}: {{user.userprofile.type_user}}</h4>
<p>{{user.userprofile.bio}}</p>
<p>Email: {{user.email}}</p>
<p>Phone: {{user.userprofile.phonenumber}}</p>
<p>
Website: {{user.userprofile.website}}
</p>
<p>
Submitted Events:
{% if all_events %}
<ul>
{% for event in all_events %}
<li><a href="/board/events/{{event.id}}/">{{event.event_name}}</a></li>
{% endfor %}
</ul>
<p>
<a href="/board">Go Back to Boards</a>
</p>
{% else %}
<p>No events are available.</p>
{% endif %}
</p>
<hr class="w3-opacity">
<h4 class="w3-padding-16">Type of Music We Look For:</h4>
<p class="w3-wide">{{user.userprofile.genre}}</p>
<hr class="w3-opacity">
<div class="w3-row-padding" style="margin:0 -16px">
{% endif %}
</div>
</div>
</div>
<!-- Calendar Placement -->
<div id = "calendar-container">
<div id="calendar" class="w3-row-padding">
</div>
</div>
<!-- Map Placement-->
<div class="w3-container w3-light-grey w3-padding-32 w3-padding-large" style="background: #43C6AC; /* fallback for old browsers */
background: -webkit-linear-gradient(to left, #43C6AC , #191654); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to left, #43C6AC , #191654); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
background: fill;">
<div class="w3-content" style="max-width:600px">
<input type="hidden" id="address" name="address" value="{{ address }}" readonly/>
<input type="hidden" id="address_lat" name="address_lat" value="" readonly/>
<input type="hidden" id="address_long" name="address_long" value="" readonly/>
<div id="map" style="height: 400px; width: 100%"></div>
</div>
</div>
</div>
<script>
// Script to open and close sidenav
function w3_open() {
document.getElementById("mySidenav").style.display = "block";
document.getElementById("myOverlay").style.display = "block";
}
function w3_close() {
document.getElementById("mySidenav").style.display = "none";
document.getElementById("myOverlay").style.display = "none";
}
// Modal Image Gallery
function onClick(element) {
document.getElementById("img01").src = element.src;
document.getElementById("modal01").style.display = "block";
var captionText = document.getElementById("caption");
captionText.innerHTML = element.alt;
}
</script>
<script>
function showResult(result) {
document.getElementById('address_lat').value = result.geometry.location.lat();
document.getElementById('address_long').value = result.geometry.location.lng();
}
function initMap() {
var lat = parseFloat(document.getElementById("address_lat").value);
var long = parseFloat(document.getElementById("address_long").value);
var uluru = {lat: lat, lng: long};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: uluru
});
var marker = new google.maps.Marker({
position: uluru,
map: map
});
}
function getLatitudeLongitude(callback, address) {
// If adress is not supplied, use default value 'Ferrol, Galicia, Spain'
address = address || 'New York, NY';
// Initialize the Geocoder
geocoder = new google.maps.Geocoder();
if (geocoder) {
geocoder.geocode({
'address': address
}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
callback(results[0]);
initMap();
}
});
}
}
// var button = document.getElementById('btn');
window.addEventListener("load", function () {
var address = document.getElementById('address').value;
getLatitudeLongitude(showResult, address);
});
</script>
<script
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCiXWhciRh1uFx6DSjrqLhFnAgvExifV-Q">
</script>
</body>
</html>
{% endblock %}