-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnew-post.html
More file actions
126 lines (106 loc) · 4.72 KB
/
new-post.html
File metadata and controls
126 lines (106 loc) · 4.72 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0" />
<title>Voi - New Post</title>
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap" rel="stylesheet">
</head>
<body>
<nav class="green lighten-1" role="navigation">
<div class="nav-wrapper container"><a id="logo-container" href="/" class="brand-logo voi">Voi</a>
<ul class="right hide-on-med-and-down">
</ul>
<ul id="nav-desktop" class="right nav-desktop">
</ul>
<ul id="nav-mobile" class="sidenav">
</ul>
<a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>
</div>
</nav>
<div class="row">
<div class="container" id="post_page">
</div>
</div>
<div class="row">
<div class="container" id="post_page_comments">
<div class="card darken-1">
<div class="card-content">
<h4>Podcast Title</h4>
<div class="input-field">
<input type="text" id="idea_title" data-length="10">
<label for="last_name">(max. 63)</label>
</div>
<h4>Description</h4>
<div class="input-field">
<textarea class="materialize-textarea" id="idea_short_desc" data-length="255"></textarea>
<label for="textarea1">(max. 255)</label>
</div>
<span>
<p>Record your voice:</p>
<button type="button" id="start" class="btn gren waves-effect waves-light">Start</button>
<button type="button" id="stop" class="btn gren waves-effect waves-light">Stop</button>
<p id="record-status"></p>
</span>
<div id="audio-drop" class="input-field" style="
background-color: #4CAF50;
border-radius: 13vh;
height: fit-content;
width: fit-content;
align-items: center;
justify-content: center;
align-content: center;
display: flex;
flex-direction: column;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 20px;
padding-right: 20px;
cursor: pointer;
">
<div>
<h4 style="color:azure;">Select Audio or drag it here </h4>
</div>
<input name="userfile" type="file" id="file-content" style="display: none;" />
</div>
<div id="audio-display">
</div>
<h4>Transcription</h4>
<div class="input-field">
<textarea class="materialize-textarea" id="idea_full_desc" data-length="1023"></textarea>
<label for="textarea1">(max. 1023)</label>
</div>
<button type="button" class="btn gren waves-effect waves-light" name="action" onclick="addPost()">Submit
<i class="material-icons right">send</i>
</button>
</div>
</div>
</div>
</div>
<footer id="footer" class="page-footer green">
</footer>
<!-- Scripts-->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="js/materialize.js"></script>
<script src="js/init.js"></script>
<script src="js/scripts.js"></script>
<script src="js/voice.js"></script>
<script>
let id = getCookie('user_id');
if (id == null) {
window.location.href = websiteUrl + "/login.html";
} else {
defaultHeaderButtons();
}
document.querySelector('#start').disabled = false;
document.querySelector('#stop').disabled = true;
fillContent();
listenToAudioDrop();
</script>
</body>
</html>