aboutsummaryrefslogtreecommitdiffstats
path: root/guestbook-form.php
blob: 1b696145d66e9a20d7736218a22e05f62ed88291 (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
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
<?php $light = isset($_GET['theme']) && $_GET['theme'] === 'light'; ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Guestbook Form — SillyLaird</title>
    <link rel="stylesheet" href="https://www.sillylaird.ca/assets/css/fonts.css" />
    <link rel="stylesheet" href="https://guestbook.sillylaird.ca/style.css?v=1.2">
    <style>
        :root {
            --bg: <?= $light ? '#fff8f1' : '#000000' ?>;
            --surface: <?= $light ? '#ffffff' : '#000000' ?>;
            --ink: <?= $light ? '#2a1212' : '#8b0000' ?>;
            --muted: <?= $light ? '#7a4545' : '#4a0000' ?>;
            --border: <?= $light ? '#e8c8c8' : '#3a0000' ?>;
            --accent: <?= $light ? '#8b0000' : '#8b0000' ?>;
            --accent-hover: <?= $light ? '#5a0000' : '#5a0000' ?>;
            --control-shadow: <?= $light ? '0 0 0 1px rgba(255, 255, 255, .9), 0 0 16px rgba(139, 0, 0, .36)' : 'none' ?>;
            --control-shadow-focus: <?= $light ? '0 0 0 1px rgba(255, 255, 255, 1), 0 0 22px rgba(139, 0, 0, .36)' : 'none' ?>;
            --focus-border: <?= $light ? '#8b0000' : '#3a0000' ?>;
            --font-mono: "JetBrains Mono", "Source Code Pro", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
        }

        html,
        body {
            background-color: var(--bg) !important;
            margin: 0;
            padding: 0;
            color: var(--ink) !important;
            width: 100%;
            height: 100%;
            font-family: var(--font-mono);
            font-size: 16px;
            line-height: 1.5;
            overflow: hidden;
        }

        * {
            box-sizing: border-box;
        }

        form {
            width: 100%;
            height: 100%;
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            background-color: var(--bg) !important;
        }

        .field-group {
            width: 100%;
        }

        .textarea-group {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        input[type="text"],
        textarea {
            width: 100% !important;
            background-color: var(--surface) !important;
            border: 1px solid var(--border) !important;
            color: var(--ink) !important;
            padding: 12px !important;
            font-size: 16px !important;
            font-family: var(--font-mono) !important;
            box-shadow: var(--control-shadow);
        }

        textarea {
            flex: 1;
            line-height: 1.4 !important;
            resize: none;
        }

        input::placeholder,
        textarea::placeholder {
            color: var(--muted) !important;
            opacity: 0.72;
        }

        input[type="text"]:focus,
        textarea:focus {
            background-color: var(--surface) !important;
            color: var(--ink) !important;
            border-color: var(--focus-border) !important;
            box-shadow: var(--control-shadow-focus);
            outline: none;
        }

        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus,
        textarea:-webkit-autofill {
            -webkit-text-fill-color: var(--ink) !important;
            -webkit-box-shadow: 0 0 0 1000px var(--surface) inset !important;
            box-shadow: 0 0 0 1000px var(--surface) inset !important;
            caret-color: var(--ink) !important;
        }

        .captcha-wrap {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .captcha-img {
            max-width: 150px;
            height: 50px;
            background-color: var(--surface) !important;
            border: 1px solid var(--border) !important;
            box-shadow: var(--control-shadow);
        }

        .captcha-wrap input {
            flex: 1;
            height: 50px;
        }

        .form-actions {
            width: 100%;
        }

        button[type="submit"] {
            width: 100% !important;
            padding: 16px !important;
            font-size: 18px !important;
            font-weight: bold !important;
            cursor: pointer;
            background-color: var(--accent) !important;
            color: <?= $light ? '#ffffff' : 'var(--bg)' ?> !important;
            border: 1px solid var(--border) !important;
            box-shadow: var(--control-shadow);
            transition: background-color 0.15s, box-shadow 0.15s;
        }

        button[type="submit"]:hover {
            background-color: var(--accent-hover) !important;
        }

        body::-webkit-scrollbar {
            display: block;
            width: 8px;
        }

        body::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 4px;
        }
    </style>
</head>

<body>

    <form action="https://guestbook.sillylaird.ca/submit.php" method="post">
        <div class="field-group">
            <input type="text" name="name" placeholder="Your Name" maxlength="100" required aria-label="Your Name">
        </div>

        <div class="field-group textarea-group">
            <textarea name="message" placeholder="Your Message" required aria-label="Your Message"></textarea>
        </div>

        <div class="captcha-wrap">
            <img src="https://guestbook.sillylaird.ca/captcha.php<?= $light ? '?theme=light' : '' ?>" alt="CAPTCHA" class="captcha-img" loading="lazy">
            <input type="text" name="captcha" placeholder="Enter the code pulse" required aria-label="CAPTCHA code">
        </div>

        <div class="form-actions">
            <button type="submit">Sign Guestbook</button>
        </div>
    </form>
</body>

</html>