28 <h2>Pointless Counter: {count}</h2>
29 <button onClick={() => alert("Why did you click me?")}>Don't Click Me</button>
30 <div className="image-container">
31 {Array.from({ length: 10 }, (_, i) => (
32 <img key={i} src={`https://picsum.photos/seed/${i}/1000/1000`} alt="Random large image" />
33 ))}
34 </div>
185 }
186
187 .image-container {
188 display: flex;
189 flex-wrap: wrap;
190 }
191
192 .image-container img {
193 width: 100%;
194 height: auto;
199 }
200
201 .image-container img:hover {
202 transform: rotate(360deg) scale(1.2);
203 }
1export default async function(req: Request): Promise<Response> {
2 const url =
3 "https://global.bing.com/HPImageArchive.aspx?format=js&idx=0&n=9&pid=hp&FORM=BEHPTB&uhd=1&uhdwidth=3840&uhdheight=2160&setmkt=zh-CN&setlang=en";
4
5 try {
11
12 const data = await response.json();
13 const firstImageUrl = "https://cn.bing.com" + data.images[0].url;
14 // 第三步:请求该图片的实际内容
15 const imageResponse = await fetch(firstImageUrl);
16
17 if (!imageResponse.ok) {
18 throw new Error(`Failed to fetch image! status: ${imageResponse.status}`);
19 }
20
21 // 直接返回图片的内容
22 return new Response(imageResponse.body, {
23 headers: {
24 "Content-Type": imageResponse.headers.get("Content-Type") || "image/jpeg", // 默认设置为 image/jpeg
25 },
26 });
20* Pass the email from the server to the client-side code if using React hydration or similar techniques.
21
22
23
24[Live demo](https://stevekrouse-lastlogin_demo.web.val.run/)
51 <div class="form-group custom-icon-group" style="display: none;">
52 <label for="icon-0">Custom icon:</label>
53 <input type="file" id="icon-0" name="icon" accept="image/gif, image/jpeg, image/png">
54 </div>
55 </div>
273 <div class="form-group custom-icon-group" style="display: none;">
274 <label for="icon-${webClipCount - 1}">Custom icon:</label>
275 <input type="file" id="icon-${webClipCount - 1}" name="icon-${webClipCount - 1}" accept="image/gif, image/jpeg, image/png">
276 </div>
277 `;
430
431 return new Response(favicon, {
432 headers: { 'Content-Type': 'image/png' },
433 });
434});
210 "User-Agent":
211 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",
212 "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8",
213 "Accept-Language": "en-US,en;q=0.5",
214 "Sec-Fetch-Site": "cross-site",
240 border: 0;
241 height: 3px;
242 background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
243 margin: 20px 0;
244 }
1
2
3Project: Emoji-Based English to French Vocabulary Learner
4
3This is a lightweight SQLite Admin interface to view and debug your SQLite data.
4
5
6
7It's currently super limited (no pagination, editing data, data-type specific viewers), and is just a couple dozens lines of code over a couple different vals. Forks encouraged! Just comment on the val if you add any features that you want to share.
159 return new Response(chartBuffer, {
160 headers: {
161 "content-type": "image/png",
162 "Cache-Control": "max-age=60",
163 },
20* Pass the email from the server to the client-side code if using React hydration or similar techniques.
21
22
23
24[Live demo](https://stevekrouse-lastlogin_demo.web.val.run/)