Calculator Tools Calculator Tools
Create

Japanese Commercial Building

Nov 12, 2023

About this app

Navigate through the rooms of a Japanese Commercial Building with Krosh, each room representing a different commercial.

Japanese Commercial Building

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Japanese Commercial Building</title>
<meta name="description" content="Navigate through the rooms of a Japanese Commercial Building with Krosh, each room representing a different commercial.">
<meta name="keywords" content="Japan, Commercials, Krosh, Interactive, Single Page Application">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
let player = { name: "Krosh" };
let currentRoom = null;

let rooms = { /* Your rooms data goes here */ };

document.addEventListener("DOMContentLoaded", function() {
$("#player-name").text(player.name);
enterRoom('Lotte Cereal'); // Enter the first room
});

function enterRoom(roomName) {
currentRoom = rooms[roomName];
$("#room-name").text(currentRoom.name);
$("#room-description").text(currentRoom.description);
$("#room-image").attr("src", currentRoom.image);
}

} catch (error) {
throw error;
}
</script>

<style>
body {
background-color: #ffd700;
font-family: 'Kaushan Script', cursive;
}
#main-container {
background-color: #ffffff;
border-radius: 15px;
padding: 20px;
margin-top: 20px;
}
#player-name {
font-size: 2em;
color: #ff4500;
}
#room-name {
font-size: 1.5em;
color: #008080;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<p id="player-name"></p>
<hr>
<p id="room-name"></p>
<img id="room-image" src="" alt="Room Image">
<p id="room-description"></p>
</div>
</body>
</html>