Skip to content

Commit

Permalink
feat: add basic code structure for discord invite feature
Browse files Browse the repository at this point in the history
  • Loading branch information
devdeadviz committed Oct 18, 2024
1 parent 8fd1621 commit 989e951
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 0 deletions.
27 changes: 27 additions & 0 deletions discord-invite/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/discord-invite/style.css" />
<script type="module" src="/discord-invite/script.js" defer></script>
<script src="/helpers/loadENV.js"></script>
<title>Discord Invite</title>
</head>

<body>
<header class="header">
<h1>Create Discord invite for RDS Server</h1>
</header>
<div id="toast" class="hidden"></div>
<div class="container">
<textarea
id="discord-invite-link-description"
class="discord-invite-link-description"
></textarea>
<button id="create-discord-invite" class="create-discord-invite">
Create Invite
</button>
</div>
</body>
</html>
9 changes: 9 additions & 0 deletions discord-invite/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Script file for discord-invite feature.
const discordInviteDescription = document.querySelector(
'#discord-invite-link-description',
);
const createInviteButton = document.querySelector('#create-discord-invite');

createInviteButton.addEventListener('click', () => {
console.log('Invite button clicked', discordInviteDescription.value);
});
39 changes: 39 additions & 0 deletions discord-invite/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
:root {
font-family: 'Inter', sans-serif;
--color-primary: #1d1283;
--color-primary-hover: #11085c;
--color-button-hover: #2c1bc6;
--white: #fff;
--color-gray: #666;
--black-color: black;
--black-transparent: #000000a8;
--light-gray-color: lightgray;
--red-color: red;
--elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.1),
0 1px 2px 0 rgba(0, 0, 0, 0.1);
--elevation-3: 0px 1px 3px 0px rgba(0, 0, 0, 0.3),
0px 4px 8px 3px rgba(0, 0, 0, 0.15);
--color-green: green;
--color-red-variant1: #f43030;
}

body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
}

.header {
text-align: center;
}

.container {
display: flex;
justify-content: center;
align-items: center;
}

.create-discord-invite {
margin: 2rem;
padding: 10px;
}
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@
<a id="application-button" href="/applications" class="action-button">
Applications
</a>
<a
id="discord-invite-button"
href="/discord-invite"
class="action-button"
>
Create Discord Invite
</a>
<div class="button-container element-display-remove" id="sync-repo-div">
<button id="repo-sync-button" class="action-button">
<span class="spinner"></span>
Expand Down

0 comments on commit 989e951

Please sign in to comment.