Commit
·
dd561a8
1
Parent(s):
0c73a71
Update public/index.html
Browse files- public/index.html +69 -27
public/index.html
CHANGED
|
@@ -7,57 +7,99 @@
|
|
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 8 |
<title>OPENAI Reverse Proxy</title>
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
<style>
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
.container {
|
| 13 |
-
max-width:
|
| 14 |
margin: 0 auto;
|
| 15 |
-
padding:
|
| 16 |
background-color: #fff;
|
| 17 |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
| 18 |
border-radius: 5px;
|
| 19 |
}
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
text-align: center;
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
-
|
| 26 |
font-size: 18px;
|
| 27 |
color: #555;
|
|
|
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
.url {
|
| 31 |
-
color: #007bff;
|
| 32 |
font-weight: bold;
|
| 33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
</style>
|
| 35 |
</head>
|
| 36 |
|
| 37 |
<body>
|
| 38 |
-
<div class="container">
|
| 39 |
-
<h1
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
</div>
|
| 43 |
|
| 44 |
-
<!-- JavaScript code -->
|
| 45 |
-
<script>
|
| 46 |
-
// Function to generate the Reverse Proxy URL
|
| 47 |
-
function getExternalUrl(spaceId) {
|
| 48 |
-
try {
|
| 49 |
-
const [username, spacename] = spaceId.split("/");
|
| 50 |
-
return `https://${username}-${spacename.replace(/_/g, "-")}.hf.space/api/v1`;
|
| 51 |
-
} catch (e) {
|
| 52 |
-
return "";
|
| 53 |
-
}
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
// Get the Reverse Proxy URL and update the HTML element with id="reverseProxyUrl"
|
| 57 |
-
const spaceId = "ngoctuanai/openaiproxy";
|
| 58 |
-
const reverseProxyUrl = getExternalUrl(spaceId);
|
| 59 |
-
document.getElementById("reverseProxyUrl").textContent = reverseProxyUrl;
|
| 60 |
-
</script>
|
| 61 |
</body>
|
| 62 |
|
| 63 |
</html>
|
|
|
|
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 8 |
<title>OPENAI Reverse Proxy</title>
|
| 9 |
|
| 10 |
+
<!-- Fonts -->
|
| 11 |
+
<link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet">
|
| 12 |
+
|
| 13 |
+
<!-- Stylesheets -->
|
| 14 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
|
| 15 |
+
|
| 16 |
+
<!-- Scripts -->
|
| 17 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.11/typed.min.js"></script>
|
| 18 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js"></script>
|
| 19 |
+
<script>
|
| 20 |
+
new WOW().init();
|
| 21 |
+
|
| 22 |
+
// Function to generate the Reverse Proxy URL
|
| 23 |
+
function getExternalUrl(spaceId) {
|
| 24 |
+
try {
|
| 25 |
+
const [username, spacename] = spaceId.split("/");
|
| 26 |
+
return `https://${username}-${spacename.replace(/_/g, "-")}.hf.space/api/v1`;
|
| 27 |
+
} catch (e) {
|
| 28 |
+
return "";
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
// Get the Reverse Proxy URL and update the HTML element with id="reverseProxyUrl"
|
| 33 |
+
const spaceId = "ngoctuanai/openaiproxy";
|
| 34 |
+
const reverseProxyUrl = getExternalUrl(spaceId);
|
| 35 |
+
|
| 36 |
+
// Wait for the page to load before updating the HTML
|
| 37 |
+
window.addEventListener('DOMContentLoaded', function () {
|
| 38 |
+
const typed = new Typed('.typed', {
|
| 39 |
+
strings: ["Welcome to OPENAI Reverse Proxy"],
|
| 40 |
+
typeSpeed: 100,
|
| 41 |
+
showCursor: false,
|
| 42 |
+
onComplete: function () {
|
| 43 |
+
document.getElementById("reverseProxyUrl").textContent = reverseProxyUrl;
|
| 44 |
+
}
|
| 45 |
+
});
|
| 46 |
+
});
|
| 47 |
+
</script>
|
| 48 |
+
|
| 49 |
<style>
|
| 50 |
+
body {
|
| 51 |
+
font-family: 'Lato', sans-serif;
|
| 52 |
+
background-color: #f8f9fa;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
.container {
|
| 56 |
+
max-width: 600px;
|
| 57 |
margin: 0 auto;
|
| 58 |
+
padding: 40px;
|
| 59 |
background-color: #fff;
|
| 60 |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
| 61 |
border-radius: 5px;
|
| 62 |
}
|
| 63 |
|
| 64 |
+
h1 {
|
| 65 |
+
font-size: 32px;
|
| 66 |
+
color: #007bff;
|
| 67 |
text-align: center;
|
| 68 |
+
margin-bottom: 10px;
|
| 69 |
}
|
| 70 |
|
| 71 |
+
p {
|
| 72 |
font-size: 18px;
|
| 73 |
color: #555;
|
| 74 |
+
text-align: center;
|
| 75 |
+
margin-bottom: 20px;
|
| 76 |
}
|
| 77 |
|
| 78 |
.url {
|
|
|
|
| 79 |
font-weight: bold;
|
| 80 |
}
|
| 81 |
+
|
| 82 |
+
.url a {
|
| 83 |
+
color: #007bff;
|
| 84 |
+
text-decoration: none;
|
| 85 |
+
transition: color 0.3s ease;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.url a:hover {
|
| 89 |
+
color: #28a745;
|
| 90 |
+
}
|
| 91 |
</style>
|
| 92 |
</head>
|
| 93 |
|
| 94 |
<body>
|
| 95 |
+
<div class="container animate__animated animate__fadeIn">
|
| 96 |
+
<h1>
|
| 97 |
+
<span class="typed"></span>
|
| 98 |
+
</h1>
|
| 99 |
+
<p class="animate__animated animate__slideInLeft wow">This is your OpenAI Reverse Proxy URL:</p>
|
| 100 |
+
<p class="url text-center" id="reverseProxyUrl"></p>
|
| 101 |
</div>
|
| 102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
</body>
|
| 104 |
|
| 105 |
</html>
|