File size: 2,447 Bytes
dfdc1d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Conversion Result</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body { background-color: #f0f2f5; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
        .container { max-width: 1200px; margin: 50px auto; padding: 30px; background: white; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
        h1 { color: #2c3e50; text-align: center; margin-bottom: 30px; }
        .file-section { margin-bottom: 30px; }
        pre { background: #f8f9fa; padding: 15px; border-radius: 5px; max-height: 400px; overflow-y: auto; }
        .btn-download { margin-top: 10px; }
        iframe { width: 100%; height: 500px; border: 1px solid #ddd; border-radius: 5px; }
    </style>
</head>
<body>
    <div class="container">
        <h1>Conversion Result</h1>
        
        <div class="file-section">
            <h3>app.py</h3>
            <pre>{{ flask_code }}</pre>
            <a href="/download/app.py?content={{ flask_code|urlencode }}" class="btn btn-primary btn-download">Download app.py</a>
        </div>
        
        <div class="file-section">
            <h3>templates/index.html</h3>
            <pre>{{ html_template }}</pre>
            <a href="/download/index.html?content={{ html_template|urlencode }}" class="btn btn-primary btn-download">Download index.html</a>
        </div>
        
        <div class="file-section">
            <h3>requirements.txt</h3>
            <pre>{{ requirements }}</pre>
            <a href="/download/requirements.txt?content={{ requirements|urlencode }}" class="btn btn-primary btn-download">Download requirements.txt</a>
        </div>
        
        <div class="file-section">
            <h3>Download All</h3>
            <a href="/download/zip?content={{ zip_buffer|b64encode|urlencode }}" class="btn btn-success btn-download">Download ZIP</a>
        </div>
        
        <div class="file-section">
            <h3>Preview</h3>
            <iframe src="{{ preview_url }}" frameborder="0"></iframe>
        </div>
        
        <a href="/" class="btn btn-secondary mt-3">Convert Another</a>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>