Spaces:
Running
Running
Commit ·
1d818b8
1
Parent(s): d368c83
Ark
Browse files- Ark ReCode/index.html +47 -66
- Ark ReCode/script.js +52 -0
- Ark ReCode/style.css +47 -26
- index.html +1 -1
Ark ReCode/index.html
CHANGED
|
@@ -1,73 +1,54 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="id">
|
| 3 |
<head>
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
</head>
|
| 9 |
<body>
|
| 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 |
-
if (data.chatAnimations) {
|
| 55 |
-
output += `<h3>Chat Animations</h3>`;
|
| 56 |
-
output += `<p>Karakter: ${data.chatAnimations.Karakter}</p>`;
|
| 57 |
-
output += `<p>Video: <a href="${data.chatAnimations.Video}" target="_blank">${data.chatAnimations.Video}</a></p>`;
|
| 58 |
-
}
|
| 59 |
-
|
| 60 |
-
if (data.illustration) {
|
| 61 |
-
output += `<h3>Illustrations</h3>`;
|
| 62 |
-
output += `<p>Karakter: ${data.illustration.Karakter}</p>`;
|
| 63 |
-
output += `<img src="${data.illustration.Image}" alt="Illustration" width="300">`;
|
| 64 |
-
}
|
| 65 |
-
|
| 66 |
-
resultDiv.innerHTML = output;
|
| 67 |
-
} catch (error) {
|
| 68 |
-
resultDiv.innerHTML = "<p>Gagal mengambil data.</p>";
|
| 69 |
-
}
|
| 70 |
-
}
|
| 71 |
-
</script>
|
| 72 |
</body>
|
| 73 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="id">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 6 |
+
<title>Ark Re Code Scraper</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
+
<!-- Background Video -->
|
| 11 |
+
<video id="bgVideo" autoplay loop muted>
|
| 12 |
+
<source src="https://video.twimg.com/ext_tw_video/1892164405464629249/pu/vid/avc1/1280x720/cgW9XdNOX1DPI6Rq.mp4" type="video/mp4">
|
| 13 |
+
</video>
|
| 14 |
+
|
| 15 |
+
<div class="container">
|
| 16 |
+
<h1>Ark Re Code Scraper</h1>
|
| 17 |
+
<label for="charName">Cari Karakter:</label>
|
| 18 |
+
<input type="text" id="charName" placeholder="Masukkan nama karakter...">
|
| 19 |
+
<button onclick="fetchData()">Cari</button>
|
| 20 |
+
<br>
|
| 21 |
+
<button onclick="playVideo('Edalia')">Edalia</button>
|
| 22 |
+
<button onclick="playVideo('Ermes')">Ermes</button>
|
| 23 |
+
<div id="result"></div>
|
| 24 |
+
</div>
|
| 25 |
+
|
| 26 |
+
<!-- Tempat Video Ditampilkan -->
|
| 27 |
+
<div id="videoWrapper"></div>
|
| 28 |
+
|
| 29 |
+
<script>
|
| 30 |
+
function playVideo(charName) {
|
| 31 |
+
const fileName = `Ark Re Code - ${charName}.mp4`;
|
| 32 |
+
const videoPath = `https://gilbertclaus.pythonanywhere.com/video/Ark ReCode/${fileName}`;
|
| 33 |
+
const encodedURL = encodeURI(videoPath);
|
| 34 |
+
|
| 35 |
+
const wrapper = document.getElementById("videoWrapper");
|
| 36 |
+
wrapper.innerHTML = "";
|
| 37 |
+
|
| 38 |
+
const video = document.createElement("video");
|
| 39 |
+
video.src = encodedURL;
|
| 40 |
+
video.width = 360;
|
| 41 |
+
video.controls = true;
|
| 42 |
+
video.autoplay = true;
|
| 43 |
+
video.volume = 0.1;
|
| 44 |
+
video.style.marginTop = "20px";
|
| 45 |
+
wrapper.appendChild(video);
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
function fetchData() {
|
| 49 |
+
const name = document.getElementById("charName").value;
|
| 50 |
+
alert(`Fungsi fetchData untuk karakter "${name}" belum diimplementasikan`);
|
| 51 |
+
}
|
| 52 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
</body>
|
| 54 |
</html>
|
Ark ReCode/script.js
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
const express = require("express");
|
| 2 |
const cors = require("cors");
|
| 3 |
const fetch = require("node-fetch");
|
|
|
|
| 1 |
+
|
| 2 |
+
async function fetchData() {
|
| 3 |
+
const charName = document.getElementById("charName").value;
|
| 4 |
+
const resultDiv = document.getElementById("result");
|
| 5 |
+
|
| 6 |
+
if (!charName) {
|
| 7 |
+
resultDiv.innerHTML = "<p>Masukkan nama karakter terlebih dahulu!</p>";
|
| 8 |
+
return;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
try {
|
| 12 |
+
const response = await fetch(`http://localhost:3000/api?name=${charName}`);
|
| 13 |
+
const data = await response.json();
|
| 14 |
+
|
| 15 |
+
if (data.error) {
|
| 16 |
+
resultDiv.innerHTML = `<p>${data.error}</p>`;
|
| 17 |
+
return;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
let output = "<h2>Hasil Pencarian:</h2>";
|
| 21 |
+
|
| 22 |
+
if (data.skills) {
|
| 23 |
+
output += `<h3>Skill & Discipline</h3>`;
|
| 24 |
+
output += `<p>Karakter: ${data.skills.Karakter}</p>`;
|
| 25 |
+
output += `<p>Link Skill 3: <a href="${data.skills.Skill3}" target="_blank">${data.skills.Skill3}</a></p>`;
|
| 26 |
+
output += `<p>Link Idle + Tap: <a href="${data.skills.Tap}" target="_blank">${data.skills.Tap}</a></p>`;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
if (data.story) {
|
| 30 |
+
output += `<h3>Story Part II</h3>`;
|
| 31 |
+
output += `<p>Member: ${data.story.Member}</p>`;
|
| 32 |
+
output += `<p>Video: <a href="${data.story.Video}" target="_blank">${data.story.Video}</a></p>`;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
if (data.chatAnimations) {
|
| 36 |
+
output += `<h3>Chat Animations</h3>`;
|
| 37 |
+
output += `<p>Karakter: ${data.chatAnimations.Karakter}</p>`;
|
| 38 |
+
output += `<p>Video: <a href="${data.chatAnimations.Video}" target="_blank">${data.chatAnimations.Video}</a></p>`;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
if (data.illustration) {
|
| 42 |
+
output += `<h3>Illustrations</h3>`;
|
| 43 |
+
output += `<p>Karakter: ${data.illustration.Karakter}</p>`;
|
| 44 |
+
output += `<img src="${data.illustration.Image}" alt="Illustration" width="300">`;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
resultDiv.innerHTML = output;
|
| 48 |
+
} catch (error) {
|
| 49 |
+
resultDiv.innerHTML = "<p>Gagal mengambil data.</p>";
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
const express = require("express");
|
| 54 |
const cors = require("cors");
|
| 55 |
const fetch = require("node-fetch");
|
Ark ReCode/style.css
CHANGED
|
@@ -3,50 +3,71 @@ body {
|
|
| 3 |
background-color: #f0f0f0;
|
| 4 |
text-align: center;
|
| 5 |
padding: 20px;
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
| 10 |
padding: 20px;
|
| 11 |
border-radius: 10px;
|
| 12 |
-
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.
|
| 13 |
max-width: 500px;
|
| 14 |
margin: auto;
|
| 15 |
-
}
|
| 16 |
-
|
| 17 |
-
h1 {
|
| 18 |
font-size: 22px;
|
| 19 |
color: #333;
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
input {
|
| 23 |
width: 80%;
|
| 24 |
padding: 8px;
|
| 25 |
margin: 10px 0;
|
| 26 |
border: 1px solid #ccc;
|
| 27 |
border-radius: 5px;
|
| 28 |
-
}
|
| 29 |
-
|
| 30 |
-
button {
|
| 31 |
background: #007bff;
|
| 32 |
color: white;
|
| 33 |
padding: 8px 15px;
|
| 34 |
border: none;
|
| 35 |
cursor: pointer;
|
| 36 |
border-radius: 5px;
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
|
|
|
| 40 |
background: #0056b3;
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
#result {
|
| 44 |
margin-top: 15px;
|
| 45 |
text-align: left;
|
| 46 |
padding: 10px;
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
background-color: #f0f0f0;
|
| 4 |
text-align: center;
|
| 5 |
padding: 20px;
|
| 6 |
+
margin: 0;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
.container {
|
| 10 |
+
background: rgba(128, 128, 128, 0.5);
|
| 11 |
padding: 20px;
|
| 12 |
border-radius: 10px;
|
| 13 |
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
|
| 14 |
max-width: 500px;
|
| 15 |
margin: auto;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
h1 {
|
| 19 |
font-size: 22px;
|
| 20 |
color: #333;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
input {
|
| 24 |
width: 80%;
|
| 25 |
padding: 8px;
|
| 26 |
margin: 10px 0;
|
| 27 |
border: 1px solid #ccc;
|
| 28 |
border-radius: 5px;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
button {
|
| 32 |
background: #007bff;
|
| 33 |
color: white;
|
| 34 |
padding: 8px 15px;
|
| 35 |
border: none;
|
| 36 |
cursor: pointer;
|
| 37 |
border-radius: 5px;
|
| 38 |
+
margin: 5px;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
button:hover {
|
| 42 |
background: #0056b3;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
#result {
|
| 46 |
margin-top: 15px;
|
| 47 |
text-align: left;
|
| 48 |
padding: 10px;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
#videoWrapper {
|
| 52 |
+
display: flex;
|
| 53 |
+
justify-content: center;
|
| 54 |
+
margin-top: 20px;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
#videoWrapper video {
|
| 58 |
+
width: 360px;
|
| 59 |
+
height: auto;
|
| 60 |
+
border-radius: 10px;
|
| 61 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
#bgVideo {
|
| 65 |
+
position: fixed;
|
| 66 |
+
top: 50%;
|
| 67 |
+
left: 50%;
|
| 68 |
+
transform: translate(-50%, -50%);
|
| 69 |
+
min-width: 100%;
|
| 70 |
+
min-height: 100%;
|
| 71 |
+
z-index: -1;
|
| 72 |
+
object-fit: cover;
|
| 73 |
+
}
|
index.html
CHANGED
|
@@ -64,7 +64,7 @@
|
|
| 64 |
}
|
| 65 |
|
| 66 |
function ark() {
|
| 67 |
-
window.location.href = "/Ark%20ReCode";
|
| 68 |
}
|
| 69 |
</script>
|
| 70 |
|
|
|
|
| 64 |
}
|
| 65 |
|
| 66 |
function ark() {
|
| 67 |
+
window.location.href = "./Ark%20ReCode";
|
| 68 |
}
|
| 69 |
</script>
|
| 70 |
|