-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
83 lines (72 loc) · 3.16 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>random-image by PepeBigotes</title>
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
<link rel="icon" href="http://cdn.onlinewebfonts.com/svg/img_561218.png">
</head>
<body>
<h1 align="center"><b> PepeBigotes/</b>random-image</h1>
<div class="topnav" align="center">
<a class="active" href="./index.html">Home</a>
<a href="./api-list.html">API List</a>
<a href="https://github.com/PepeBigotes/random-image">GitHub</a>
</div>
<h2><b> What is this site? </b></h2>
<div class="row">
<div class="example-column">
<div class="textblock">
<div>
<p align="center" style="font-size:1.3em ;"> This site renders a random image from a given list every time you load it.</p>
<p align="center" style="font-size: 1.3em;">Try it yourself, reload the page!</p>
<div align="center">
<button class="reloadpage" onClick="history.go(0);">
<span class="material-symbols-outlined">
refresh
</span>
</button>
</div>
</div>
</div>
</div>
<div class="example-column">
<img src="https://random-image-pepebigotes.vercel.app/api/random-image" alt="random image">
</div>
</div>
<p style="font-size:1.1em ;">But the main feature of his site is the API that lets you render a random image <span class="gray-text">(almost)</span> anywhere on the web.</p>
<p>You can use this API like this:</p>
<div class="codeblock"><pre><code>
<b>MARKDOWN:</b>

<b>HTML:</b>
<img alt="Random image" src="https://random-image-pepebigotes.vercel.app/api/random-image">
</code></pre></div>
<h2>API uses</h2>
<ul>
<li>
Add a random image to GitHub <code>readme.md</code> files, including the one from your profile: <br>
<!--Image--->
</li>
<li>
Add a random image to your web page.
<!--Image--->
</li>
<li>
Send randomized pictures over messaging services. <br>
<div class="gray-text">(This only worked on Gmail Spaces based on my tests)<!--, <a href="">more info here</a>)</div>-->
</li>
</ul>
<h2>Common issues</h2>
<ul>
<li>The original image source can be slow or even fail.<br>
This is because this API works based on <b>image url's</b>, so it completly depends on the original image's hosting server</li>
<li>The images are not randomized on the most common messaging services <span class="gray-text">(WhatsApp, Discord, Telegram, ...)</span><br>
I assume these services cache the image and only access the API on the first time the image is loaded.<br>
<span class="gray-text">It works on Gmail Spaces Chats though</span></li>
</ul>
</body>
</html>