Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Readme

doesn't work, cool css

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
// This approach enhances the previous countdown timer by adding a start button and date entry.
// It uses Hono for routing and JSX rendering, and creates a visually appealing countdown timer
// with customizable target date. The design features a circular layout with cool CSS effects.
// The countdown functionality has been fixed to properly update the numbers.
/** @jsxImportSource npm:hono/jsx */
import { Hono } from "npm:hono";
const app = new Hono();
app.get("/", (c) => {
const html = (
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Super Cool Customizable Countdown</title>
<style>
{`
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');
body, html {
margin: 0;
padding: 0;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: #000000;
font-family: 'Orbitron', sans-serif;
overflow: hidden;
}
.countdown-container {
display: flex;
justify-content: center;
align-items: center;
width: 600px;
height: 600px;
background: radial-gradient(circle, #1a1a1a, #000000);
border-radius: 50%;
box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
position: relative;
}
.countdown-ring {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
border: 2px solid rgba(0, 255, 255, 0.2);
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { transform: scale(1); opacity: 0.8; }
50% { transform: scale(1.05); opacity: 0.5; }
100% { transform: scale(1); opacity: 0.8; }
}
.countdown-item {
position: absolute;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 120px;
height: 120px;
background: rgba(0, 0, 0, 0.7);
border-radius: 50%;
color: #00ffff;
font-weight: bold;
text-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
}
.countdown-number {
font-size: 2.5em;
line-height: 1;
}
.countdown-label {
font-size: 0.8em;
text-transform: uppercase;
}
#weeks { top: 10%; left: 50%; transform: translateX(-50%); }
#days { top: 30%; right: 10%; }
#hours { bottom: 30%; right: 10%; }
#minutes { bottom: 10%; left: 50%; transform: translateX(-50%); }
#seconds { bottom: 30%; left: 10%; }
#milliseconds { top: 30%; left: 10%; font-size: 0.8em; }
.center-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 1.2em;
color: #ffffff;
text-align: center;
all-countdown.web.val.run
August 22, 2024