Skip to content

Commit

Permalink
Add plain HTML terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmostEfficient committed Jan 16, 2024
1 parent ea52749 commit 881b420
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Jupiter Swap</title>
<style>
body {
background-color: black;
color: white;
font-family: Verdana, Geneva, Tahoma, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

#jupiter-terminal {
width: 600px;
height: 1200px;
}
</style>
<script src="https://terminal.jup.ag/main-v2.js" data-preload defer></script>
</head>

<body>
<h1>Jupiter Swap Demo</h1>
<div id="jupiter-terminal"></div>
<script>
document.addEventListener("DOMContentLoaded", function () {

console.log('LOADED')

//create jupiter-terminal div
const jupiterTerminal = document.createElement('div')
jupiterTerminal.id = 'jupiter-terminal'
document.body.appendChild(jupiterTerminal)

// initialize the terminal
window.Jupiter.init({
displayMode: "integrated",
integratedTargetId: "jupiter-terminal",
endpoint: "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY_HERE",
formProps: {
fixedOutputMint: false
}
});
});
</script>
</body>

</html>

0 comments on commit 881b420

Please sign in to comment.