Upload index.html
Browse files- templates/index.html +145 -169
templates/index.html
CHANGED
@@ -1,198 +1,174 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
-
<html lang="
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<
|
7 |
-
|
8 |
-
<
|
9 |
-
<!--
|
10 |
-
<link rel="
|
11 |
-
|
12 |
-
<!-- Fonts et styles -->
|
13 |
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
|
14 |
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
|
15 |
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
|
16 |
-
<!-- SweetAlert2 pour les alertes -->
|
17 |
-
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
18 |
-
<!-- Marked.js pour le parsing Markdown -->
|
19 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
|
20 |
-
<!-- Prism.js pour la coloration syntaxique -->
|
21 |
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.min.css">
|
22 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/prism.min.js"></script>
|
23 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/components/prism-python.min.js"></script>
|
24 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/components/prism-javascript.min.js"></script>
|
25 |
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
26 |
</head>
|
27 |
<body>
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
<div class="app-container">
|
34 |
-
<!-- Side navigation bar -->
|
35 |
-
<div class="side-nav" id="sideNav">
|
36 |
-
<div class="side-nav-header">
|
37 |
-
<div class="logo">
|
38 |
-
<i class="bi bi-stars"></i>
|
39 |
-
</div>
|
40 |
-
<h1>Mariam AI</h1>
|
41 |
-
<button id="closeSideNavButton" class="close-button">
|
42 |
-
<i class="bi bi-x-lg"></i>
|
43 |
-
</button>
|
44 |
-
</div>
|
45 |
-
|
46 |
-
<div class="side-nav-section">
|
47 |
-
<div class="section-header">
|
48 |
-
<h3>Historique</h3>
|
49 |
-
<button id="saveCurrentChatButton" class="action-button-small" title="Sauvegarder cette conversation">
|
50 |
-
<i class="bi bi-save"></i>
|
51 |
-
</button>
|
52 |
-
</div>
|
53 |
-
<div id="chatHistoryList" class="history-list">
|
54 |
-
<!-- History items will be added here -->
|
55 |
-
<div class="empty-state">Aucune conversation sauvegardée</div>
|
56 |
-
</div>
|
57 |
-
</div>
|
58 |
-
|
59 |
-
<div class="side-nav-footer">
|
60 |
-
<button id="clearButtonNav" class="nav-button" title="Effacer la conversation">
|
61 |
-
<i class="bi bi-trash"></i> Effacer la conversation
|
62 |
-
</button>
|
63 |
-
<button id="settingsButtonNav" class="nav-button" title="Paramètres">
|
64 |
-
<i class="bi bi-gear"></i> Paramètres
|
65 |
-
</button>
|
66 |
-
</div>
|
67 |
-
</div>
|
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 |
</div>
|
94 |
-
<h2>Bienvenue sur Mariam AI</h2>
|
95 |
-
<p class="welcome-subtitle">Comment puis-je vous aider aujourd'hui ?</p>
|
96 |
</div>
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
</div>
|
111 |
</div>
|
112 |
</div>
|
113 |
-
<!-- Messages will be dynamically inserted here -->
|
114 |
</div>
|
115 |
-
|
116 |
-
|
117 |
-
<div
|
118 |
-
<
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
<div class="input-container">
|
129 |
-
<textarea id="userInput" placeholder="Écrivez votre message..." rows="1"></textarea>
|
130 |
-
<button id="sendButton" class="send-button" title="Envoyer">
|
131 |
-
<i class="bi bi-send"></i>
|
132 |
</button>
|
133 |
</div>
|
134 |
</div>
|
135 |
</div>
|
136 |
-
</div>
|
137 |
-
</div>
|
138 |
-
</div>
|
139 |
-
|
140 |
-
<!-- Loading indicator template -->
|
141 |
-
<template id="loadingTemplate">
|
142 |
-
<div class="message-container bot">
|
143 |
-
<div class="message-bubble loading">
|
144 |
-
<div class="dot-typing"></div>
|
145 |
-
</div>
|
146 |
-
</div>
|
147 |
-
</template>
|
148 |
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
<template id="userImageMessageTemplate">
|
160 |
-
<div class="message-container user">
|
161 |
-
<div class="message-bubble">
|
162 |
-
<div class="image-container">
|
163 |
-
<img src="" alt="Uploaded image" class="chat-image">
|
164 |
</div>
|
165 |
-
<p></p>
|
166 |
-
</div>
|
167 |
-
</div>
|
168 |
-
</template>
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
<div class="message-actions">
|
175 |
-
<button class="copy-button" title="Copier le message">
|
176 |
-
<i class="bi bi-clipboard"></i>
|
177 |
-
</button>
|
178 |
</div>
|
179 |
-
<p></p>
|
180 |
</div>
|
181 |
</div>
|
182 |
-
</template>
|
183 |
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
<p></p>
|
189 |
-
<button class="retry-button">Réessayer</button>
|
190 |
-
</div>
|
191 |
-
</div>
|
192 |
-
</template>
|
193 |
|
194 |
-
|
195 |
-
|
196 |
-
|
|
|
197 |
</body>
|
198 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
+
<html lang="en" data-bs-theme="dark">
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Gemini Podcast Generator</title>
|
7 |
+
<!-- Bootstrap CSS (Replit Theme) -->
|
8 |
+
<link href="https://cdn.replit.com/agent/bootstrap-agent-dark-theme.min.css" rel="stylesheet">
|
9 |
+
<!-- Font Awesome for icons -->
|
10 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
11 |
+
<!-- Custom CSS -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
13 |
</head>
|
14 |
<body>
|
15 |
+
<div class="container py-4">
|
16 |
+
<header class="mb-5 text-center">
|
17 |
+
<h1 class="display-4">Gemini Podcast Generator</h1>
|
18 |
+
<p class="lead">Créez un podcast à partir d'un scénario avec des personnages multiples</p>
|
19 |
+
</header>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
<div class="row justify-content-center">
|
22 |
+
<div class="col-lg-10">
|
23 |
+
<ul class="nav nav-tabs mb-3" id="myTab" role="tablist">
|
24 |
+
<li class="nav-item" role="presentation">
|
25 |
+
<button class="nav-link active" id="simple-tab" data-bs-toggle="tab" data-bs-target="#simple-tts" type="button" role="tab" aria-controls="simple-tts" aria-selected="true">
|
26 |
+
<i class="fas fa-comment me-2"></i>Texte Simple
|
27 |
+
</button>
|
28 |
+
</li>
|
29 |
+
<li class="nav-item" role="presentation">
|
30 |
+
<button class="nav-link" id="scenario-tab" data-bs-toggle="tab" data-bs-target="#scenario-podcast" type="button" role="tab" aria-controls="scenario-podcast" aria-selected="false">
|
31 |
+
<i class="fas fa-microphone-alt me-2"></i>Scénario Podcast
|
32 |
+
</button>
|
33 |
+
</li>
|
34 |
+
</ul>
|
35 |
+
|
36 |
+
<div class="tab-content" id="myTabContent">
|
37 |
+
<!-- Simple Text-to-Speech Tab -->
|
38 |
+
<div class="tab-pane fade show active" id="simple-tts" role="tabpanel" aria-labelledby="simple-tab">
|
39 |
+
<div class="card shadow-sm">
|
40 |
+
<div class="card-body">
|
41 |
+
<form id="ttsForm">
|
42 |
+
<div class="mb-3">
|
43 |
+
<label for="textInput" class="form-label">Entrez votre texte</label>
|
44 |
+
<textarea
|
45 |
+
class="form-control"
|
46 |
+
id="textInput"
|
47 |
+
rows="5"
|
48 |
+
placeholder="Saisissez le texte que vous souhaitez convertir en parole..."
|
49 |
+
required
|
50 |
+
></textarea>
|
51 |
+
</div>
|
52 |
+
|
53 |
+
<div class="mb-3">
|
54 |
+
<label for="voiceSelect" class="form-label">Sélectionnez une voix</label>
|
55 |
+
<select class="form-select" id="voiceSelect">
|
56 |
+
{% for voice in voices %}
|
57 |
+
<option value="{{ voice }}">{{ voice }}</option>
|
58 |
+
{% endfor %}
|
59 |
+
</select>
|
60 |
+
</div>
|
61 |
|
62 |
+
<div class="d-grid">
|
63 |
+
<button
|
64 |
+
type="submit"
|
65 |
+
class="btn btn-primary"
|
66 |
+
id="generateBtn"
|
67 |
+
>
|
68 |
+
<i class="fas fa-microphone me-2"></i>Générer l'audio
|
69 |
+
</button>
|
70 |
+
</div>
|
71 |
+
</form>
|
72 |
</div>
|
|
|
|
|
73 |
</div>
|
74 |
+
</div>
|
75 |
+
|
76 |
+
<!-- Scenario Podcast Tab -->
|
77 |
+
<div class="tab-pane fade" id="scenario-podcast" role="tabpanel" aria-labelledby="scenario-tab">
|
78 |
+
<div class="card shadow-sm">
|
79 |
+
<div class="card-body">
|
80 |
+
<form id="podcastForm">
|
81 |
+
<div class="mb-3">
|
82 |
+
<label for="scenarioInput" class="form-label">Entrez votre scénario (JSON)</label>
|
83 |
+
<textarea
|
84 |
+
class="form-control"
|
85 |
+
id="scenarioInput"
|
86 |
+
rows="12"
|
87 |
+
placeholder='{"title": "Titre du podcast", "language": "fr-FR", "characters": [{"name": "Personnage1", "voice": "Kore", "text": "Texte du personnage 1"}, {"name": "Personnage2", "voice": "Puck", "text": "Texte du personnage 2"}]}'
|
88 |
+
required
|
89 |
+
></textarea>
|
90 |
+
</div>
|
91 |
+
|
92 |
+
<div class="alert alert-info">
|
93 |
+
<h6><i class="fas fa-info-circle me-2"></i>Format du scénario:</h6>
|
94 |
+
<pre class="mb-0"><code>{
|
95 |
+
"title": "Titre du podcast",
|
96 |
+
"language": "fr-FR",
|
97 |
+
"characters": [
|
98 |
+
{
|
99 |
+
"name": "Personnage1",
|
100 |
+
"voice": "Kore",
|
101 |
+
"text": "Texte du personnage 1"
|
102 |
+
},
|
103 |
+
{
|
104 |
+
"name": "Personnage2",
|
105 |
+
"voice": "Puck",
|
106 |
+
"text": "Texte du personnage 2"
|
107 |
+
}
|
108 |
+
]
|
109 |
+
}</code></pre>
|
110 |
+
</div>
|
111 |
+
|
112 |
+
<div class="d-grid mt-4">
|
113 |
+
<button
|
114 |
+
type="submit"
|
115 |
+
class="btn btn-primary"
|
116 |
+
id="generatePodcastBtn"
|
117 |
+
>
|
118 |
+
<i class="fas fa-podcast me-2"></i>Générer le podcast
|
119 |
+
</button>
|
120 |
+
</div>
|
121 |
+
</form>
|
122 |
</div>
|
123 |
</div>
|
124 |
</div>
|
|
|
125 |
</div>
|
126 |
+
|
127 |
+
<div class="card mt-4 shadow-sm d-none" id="audioCard">
|
128 |
+
<div class="card-body">
|
129 |
+
<h5 class="card-title">Audio généré</h5>
|
130 |
+
<div class="text-center my-4">
|
131 |
+
<div id="audioPlayerContainer" class="mb-3">
|
132 |
+
<audio id="audioPlayer" controls class="w-100"></audio>
|
133 |
+
</div>
|
134 |
+
<button class="btn btn-success me-2" id="downloadBtn">
|
135 |
+
<i class="fas fa-download me-2"></i>Télécharger
|
136 |
+
</button>
|
137 |
+
<button class="btn btn-secondary" id="newGenerationBtn">
|
138 |
+
<i class="fas fa-plus me-2"></i>Nouvelle génération
|
|
|
|
|
|
|
|
|
139 |
</button>
|
140 |
</div>
|
141 |
</div>
|
142 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
+
<!-- Loading Indicator -->
|
145 |
+
<div class="text-center mt-4 d-none" id="loadingIndicator">
|
146 |
+
<div class="spinner-border text-primary" role="status">
|
147 |
+
<span class="visually-hidden">Chargement...</span>
|
148 |
+
</div>
|
149 |
+
<p class="mt-2">Génération en cours avec Gemini AI...</p>
|
150 |
+
<div class="progress mt-3 d-none" id="progressBar">
|
151 |
+
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%"></div>
|
152 |
+
</div>
|
153 |
+
<p class="mt-2 d-none" id="progressText">Préparation du podcast...</p>
|
|
|
|
|
|
|
|
|
|
|
154 |
</div>
|
|
|
|
|
|
|
|
|
155 |
|
156 |
+
<!-- Error Alert -->
|
157 |
+
<div class="alert alert-danger mt-4 d-none" id="errorAlert" role="alert">
|
158 |
+
<i class="fas fa-exclamation-triangle me-2"></i>
|
159 |
+
<span id="errorMessage"></span>
|
|
|
|
|
|
|
|
|
160 |
</div>
|
|
|
161 |
</div>
|
162 |
</div>
|
|
|
163 |
|
164 |
+
<footer class="mt-5 pt-4 text-center text-muted">
|
165 |
+
<p>Powered by Google Gemini AI © <script>document.write(new Date().getFullYear())</script></p>
|
166 |
+
</footer>
|
167 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
+
<!-- Bootstrap JS -->
|
170 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
171 |
+
<!-- Custom JS -->
|
172 |
+
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
173 |
</body>
|
174 |
</html>
|