faizee07 commited on
Commit
9854860
·
verified ·
1 Parent(s): 5faeb4a

Delete index.html

Browse files
Files changed (1) hide show
  1. index.html +0 -73
index.html DELETED
@@ -1,73 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>GitHub README Generator</title>
7
- <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
8
- </head>
9
- <body>
10
- <div class="container">
11
- <h1>GitHub README Generator 💻</h1>
12
- <p>Enter a public GitHub repository URL and let the AI agent generate a professional README.md for you.</p>
13
-
14
- <form id="repo-form">
15
- <div class="input-group">
16
- <input type="url" id="repo-url" placeholder="e.g., https://github.com/user/project" required>
17
- <button type="submit">Generate</button>
18
- </div>
19
- </form>
20
-
21
- <div class="loader" id="loader"></div>
22
-
23
- <div id="result-container" style="display: none;">
24
- <h2>Generated README.md:</h2>
25
- <pre id="result"></pre>
26
- </div>
27
- </div>
28
-
29
- <script>
30
- document.getElementById('repo-form').addEventListener('submit', async function(event) {
31
- event.preventDefault();
32
-
33
- const url = document.getElementById('repo-url').value;
34
- const loader = document.getElementById('loader');
35
- const resultContainer = document.getElementById('result-container');
36
- const resultDiv = document.getElementById('result');
37
-
38
- // Show loader and hide previous result
39
- loader.style.display = 'block';
40
- resultContainer.style.display = 'none';
41
- resultDiv.textContent = '';
42
-
43
- try {
44
- const response = await fetch('/generate', {
45
- method: 'POST',
46
- headers: {
47
- 'Content-Type': 'application/json'
48
- },
49
- body: JSON.stringify({ url: url })
50
- });
51
-
52
- const data = await response.json();
53
-
54
- if (response.ok) {
55
- resultDiv.textContent = data.readme;
56
- resultContainer.style.display = 'block';
57
- } else {
58
- resultDiv.textContent = 'Error: ' + data.error;
59
- resultContainer.style.display = 'block';
60
- }
61
-
62
- } catch (error) {
63
- resultDiv.textContent = 'An unexpected error occurred: ' + error.toString();
64
- resultContainer.style.display = 'block';
65
- } finally {
66
- // Hide loader
67
- loader.style.display = 'none';
68
- }
69
- });
70
- </script>
71
- </body>
72
- </html>
73
-