aboutsummaryrefslogtreecommitdiffstats
path: root/src/includes/download-logic.php
blob: 517115a357a299f4f03d49df4d0f4b73101f671e (plain) (blame)
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
<div class="centered">
    <h3>🎨 please select your presentation theme 🎭</h3>
    <form action="download.php" method="post" onsubmit="showGeneratingIndicator()">
        <table class="centered">
            <thead>
                <tr>
                    <th>
                        <h2>preview</h2>
                    </th>
                    <th>
                        <h2>select</h2>
                    </th>
                </tr>
            </thead>
            <tbody>
                <?php
                $themes = [
                    '90sMakeUpCommercial' => '90sMakeUpCommercial',
                    'chicagoOlives' => 'chicagoOlives',
                    'earlyCupertino' => 'earlyCupertino',
                    'ohioCustard' => 'ohioCustard',
                    'raleighAroundMe' => 'raleighAroundMe',
                    'redmond2013' => 'redmond2013',
                    'defaultIsKing' => 'defaultIsKing',
                    'cuppertinoIsh' => 'cuppertinoIsh',
                    'lazyProfessor' => 'lazyProfessor',
                    'redmond2003' => 'redmond2003',
                    'strengthInNumbers' => 'strengthInNumbers',
                    'thatMagazine' => 'thatMagazine',
                ];

                foreach ($themes as $key => $theme) {
                    echo "<tr>
                            <td>
                                <img loading='lazy' class='theme-select' src='img/{$key}.webp' alt='{$theme}'>
                            </td>
                            <td>
                                <button type='submit' name='{$key}'>{$theme}</button>
                            </td>
                          </tr>";
                }
                ?>
            </tbody>
        </table>
        <div id="generating-indicator" style="display: none;">
            <p>📊</p>
            <p>generating presentation...</p>
            <p>please wait.</p>
        </div>
    </form>
</div>
<br>