-
Notifications
You must be signed in to change notification settings - Fork 1
/
finalpage.html
201 lines (169 loc) · 5.67 KB
/
finalpage.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Media Generator</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f2f2f2;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background:url("dariusz-sankowski-3OiYMgDKJ6k-unsplash.jpg");
background-size:cover;
background-position:center;
}
.navbar {
background-color: #333;
overflow: hidden;
}
.navbar a{
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
align-self: top;
}
.navbar a:hover{
background-color: #ddd;
color: black;
}
.navbar a.active{
background-color: #04AA6D;
color:white;
}
.navbar a.right {
float: right;
}
#media-container {
text-align: center;
background-color: #fff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
max-width: 600px;
box-sizing: border-box;
background:transparent;
backdrop-filter:blur(10px);
background-position: center;
}
h1 {
color: #FFDB58;
margin-bottom: 20px;
}
#script-box {
width: 80%;
height: 150px;
margin: 20px auto;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
resize: none;
}
#script-image {
width: 100%;
height: auto;
border-radius: 5px;
margin-top: 20px;
}
audio {
width: 100%;
margin-top: 20px;
}
#download-options {
margin: 20px 0;
}
.download-button {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 5px;
transition: background-color 0.3s ease-in-out;
}
.download-button:hover {
background-color: #45a049;
}
#generate-button {
background-color: #3498db;
color: white;
border: none;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin-top: 20px;
cursor: pointer;
border-radius: 5px;
transition: background-color 0.3s ease-in-out;
}
#generate-button:hover {
background-color: #2980b9;
}
</style>
</head>
<body>
<!-- <div class="navbar">
<p><a href ="index.html">Home</a></p>
<p><a href ="about.html">About</a></p>
<p><a href ="contact.html">Contact Us</a></p>
<p><a href ="feedback.html">Feedback</a></p>
<p><a href="signup.html" class="right">Sign Up</a></p>
<p><a href="login.html" class="right">Login</a></p>
</div> -->
<div id="media-container">
<h1>Interactive Story Generator</h1>
<textarea id="script-box" placeholder="Your generated script will appear here..." readonly></textarea>
<img id="script-image" src="" alt="Generated Image">
<audio controls>
<source src="relaxed-vlog-night-street-131746.mp3" type="audio/mp3">
Your browser does not support the audio element.
</audio>
<div id="download-options">
<a href="#" class="download-button" onclick="downloadMedia(true)">Download Story</a>
<a href="#" class="download-button" onclick="downloadMedia(false)">Download Story with Images</a>
</div>
<button id="generate-button" onclick="generateMedia()">Generate Another Story</button>
</div>
<script>
function generateMedia() {
const randomScript = "Your script content goes here";
const scriptBox = document.getElementById('script-box');
const scriptImage = document.getElementById('script-image');
// Placeholder image URL
const imageUrl = "https://via.placeholder.com/600x300";
// Placeholder audio file URL
const audioUrl = "placeholder-audio.mp3";
scriptBox.value = 'Generated Script: ${randomScript}';
scriptImage.src = imageUrl;
const audioElement = document.querySelector('audio');
audioElement.src = audioUrl;
}
function downloadMedia(withImages) {
const scriptContent = document.getElementById('script-box').value;
const filename = withImages ? 'media_with_images.txt' : 'media_without_images.txt';
const blob = new Blob([scriptContent], { type: 'text/plain' });
const link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
</script>
</body>
</html>