Creating a comprehensive single-file website for your Discord bot Gyatso is achievable by leveraging HTML, CSS, and JavaScript together. Below is a template that includes multiple sections typically found on bot websites such as Home, Features, Commands, Invite, and Support. You can customize and expand upon this template to fit your specific needs.
Complete Single-File HTML, CSS, and JavaScript Website
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gyatso - The Ultimate Discord Bot</title>
<style>
/* Reset CSS */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #fff;
background-color: #2C2F33;
}
/* Navigation */
nav {
background-color: #23272A;
padding: 1rem;
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav .container {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1100px;
margin: auto;
}
nav .logo {
font-size: 1.5rem;
font-weight: bold;
color: #7289DA;
text-decoration: none;
}
nav ul {
list-style: none;
display: flex;
}
nav ul li {
margin-left: 1.5rem;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 1rem;
transition: color 0.3s ease;
}
nav ul li a:hover {
color: #7289DA;
}
/* Hero Section */
.hero {
background: url('https://via.placeholder.com/1500x800') no-repeat center center/cover;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding-top: 70px; /* Height of nav */
}
.hero h1 {
font-size: 3rem;
margin-bottom: 1rem;
}
.hero p {
font-size: 1.2rem;
margin-bottom: 2rem;
}
.hero .btn {
background-color: #7289DA;
color: #fff;
padding: 0.8rem 1.5rem;
border: none;
border-radius: 5px;
text-decoration: none;
font-size: 1rem;
transition: background-color 0.3s ease;
}
.hero .btn:hover {
background-color: #5b6eae;
}
/* Sections */
section {
padding: 4rem 1.5rem;
max-width: 1100px;
margin: auto;
}
/* Features */
.features {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.feature {
background-color: #23272A;
flex: 0 1 30%;
margin-bottom: 2rem;
padding: 1.5rem;
border-radius: 10px;
text-align: center;
transition: transform 0.3s ease;
}
.feature:hover {
transform: translateY(-10px);
}
.feature img {
width: 50px;
margin-bottom: 1rem;
}
.feature h3 {
margin-bottom: 1rem;
color: #7289DA;
}
/* Commands */
.commands {
background-color: #23272A;
padding: 2rem;
border-radius: 10px;
}
.commands h2 {
text-align: center;
margin-bottom: 2rem;
color: #7289DA;
}
.command-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.command {
background-color: #2C2F33;
padding: 1rem;
border-radius: 5px;
}
.command h4 {
margin-bottom: 0.5rem;
color: #99AAB5;
}
.command p {
color: #b9bbbe;
}
/* Invite */
.invite {
text-align: center;
}
.invite h2 {
margin-bottom: 1.5rem;
color: #7289DA;
}
.invite a {
background-color: #43B581;
color: #fff;
padding: 0.8rem 1.5rem;
border: none;
border-radius: 5px;
text-decoration: none;
font-size: 1rem;
transition: background-color 0.3s ease;
}
.invite a:hover {
background-color: #3aa76a;
}
/* Support */
.support {
text-align: center;
}
.support h2 {
margin-bottom: 1.5rem;
color: #7289DA;
}
.support a {
background-color: #5865F2;
color: #fff;
padding: 0.8rem 1.5rem;
border: none;
border-radius: 5px;
text-decoration: none;
font-size: 1rem;
transition: background-color 0.3s ease;
}
.support a:hover {
background-color: #4752c4;
}
/* Footer */
footer {
background-color: #23272A;
text-align: center;
padding: 1rem;
position: fixed;
width: 100%;
bottom: 0;
color: #99AAB5;
}
/* Responsive */
@media (max-width: 768px) {
.features {
flex-direction: column;
align-items: center;
}
.feature {
flex: 0 1 80%;
}
nav ul {
flex-direction: column;
background-color: #23272A;
position: absolute;
top: 60px;
left: -100%;
width: 100%;
transition: left 0.3s ease;
}
nav ul.active {
left: 0;
}
nav ul li {
margin: 1.5rem 0;
text-align: center;
}
.menu-toggle {
display: block;
cursor: pointer;
color: #fff;
font-size: 1.5rem;
}
}
@media (min-width: 769px) {
.menu-toggle {
display: none;
}
}
</style>
</head>
<body>
<!-- Navigation -->
<nav>
<div class="container">
<a href="#" class="logo">Gyatso</a>
<div class="menu-toggle" id="mobile-menu">
☰
</div>
<ul id="nav-links">
<li><a href="#home">Home</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#commands">Commands</a></li>
<li><a href="#invite">Invite</a></li>
<li><a href="#support">Support</a></li>
</ul>
</div>
</nav>
<!-- Hero Section -->
<section class="hero" id="home">
<div>
<h1>Welcome to Gyatso</h1>
<p>The Ultimate Discord Bot for Fun and Productivity</p>
<a href="#invite" class="btn">Invite Gyatso Now</a>
</div>
</section>
<!-- Features Section -->
<section id="features">
<h2 style="text-align:center; color:#7289DA; margin-bottom:2rem;">Features</h2>
<div class="features">
<div class="feature">
<img src="https://via.placeholder.com/50" alt="Feature 1">
<h3>Fun Commands</h3>
<p>Enjoy a wide range of entertaining commands to keep your server lively.</p>
</div>
<div class="feature">
<img src="https://via.placeholder.com/50" alt="Feature 2">
<h3>Economy System</h3>
<p>Earn, spend, and manage your in-server currency effortlessly.</p>
</div>
<div class="feature">
<img src="https://via.placeholder.com/50" alt="Feature 3">
<h3>Moderation Tools</h3>
<p>Keep your server safe with our comprehensive moderation features.</p>
</div>
<!-- Add more features as needed -->
</div>
</section>
<!-- Commands Section -->
<section id="commands">
<h2 style="text-align:center; color:#7289DA; margin-bottom:2rem;">Commands</h2>
<div class="commands">
<div class="command-list">
<div class="command">
<h4>!help</h4>
<p>Displays a list of all available commands.</p>
</div>
<div class="command">
<h4>!balance</h4>
<p>Check your current balance in the economy system.</p>
</div>
<div class="command">
<h4>!daily</h4>
<p>Claim your daily reward.</p>
</div>
<div class="command">
<h4>!kick [user]</h4>
<p>Kick a member from the server.</p>
</div>
<!-- Add more commands as needed -->
</div>
</div>
</section>
<!-- Invite Section -->
<section class="invite" id="invite">
<h2>Invite Gyatso to Your Server</h2>
<a href="https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&scope=bot%20applications.commands" target="_blank">Invite Now</a>
</section>
<!-- Support Section -->
<section class="support" id="support">
<h2>Need Help? Join Our Discord Server</h2>
<a href="https://discord.gg/YOUR_SERVER_INVITE" target="_blank">Join Support Server</a>
</section>
<!-- Footer -->
<footer>
<p>© 2024 Gyatso. All rights reserved.</p>
</footer>
<!-- JavaScript -->
<script>
// Mobile Menu Toggle
const menuToggle = document.getElementById('mobile-menu');
const navLinks = document.getElementById('nav-links');
menuToggle.addEventListener('click', () => {
navLinks.classList.toggle('active');
});
// Smooth Scrolling
const links = document.querySelectorAll('nav ul li a');
for (const link of links) {
link.addEventListener('click', clickHandler);
}
function clickHandler(e) {
e.preventDefault();
const href = this.getAttribute('href');
document.querySelector(href).scrollIntoView({
behavior: 'smooth'
});
// Close mobile menu after clicking
if(navLinks.classList.contains('active')){
navLinks.classList.remove('active');
}
}
</script>
</body>
</html>
Explanation of the Template
-
HTML Structure:
- Navigation (
<nav>): A fixed navigation bar at the top with links to different sections of the page. It includes a logo, menu items, and a hamburger menu for mobile responsiveness.
- Hero Section: The first prominent section welcoming users, with a call-to-action button to invite the bot.
- Features Section: Highlights key features of Gyatso using cards. You can add more features by duplicating the
.feature divs.
- Commands Section: Lists some of the bot's commands. You can expand this by adding more
.command divs.
- Invite Section: Provides a button for users to invite Gyatso to their Discord servers. Replace
YOUR_CLIENT_ID with your bot’s actual client ID.
- Support Section: Links users to your Discord support server. Replace
YOUR_SERVER_INVITE with your actual Discord server invite link.
- Footer: A simple footer with copyright information.
-
CSS Styling:
- Responsive Design: Utilizes media queries to adjust the layout for mobile devices. The navigation menu transforms into a hamburger menu on smaller screens.
- Color Scheme: Uses Discord-like colors (
#7289DA for primary elements) to maintain a familiar and appealing aesthetic.
- Hover Effects: Buttons and feature cards have hover effects to enhance interactivity.
-
JavaScript Functionality:
- Mobile Menu Toggle: Enables the hamburger menu to show or hide navigation links on mobile devices.
- Smooth Scrolling: Animates the scroll when navigation links are clicked for a better user experience.
Customization Tips
-
Images and Icons:
- Replace the placeholder images (
https://via.placeholder.com/50) with actual icons or graphics relevant to Gyatso’s features.
-
Commands and Features:
- Update the commands and features sections with the actual capabilities of Gyatso. Ensure that command descriptions are clear and comprehensive.
-
Links:
-
Styling:
- Modify the color scheme, fonts, and layout as desired to better fit your branding.
- Consider adding animations or additional interactive elements using JavaScript or CSS for enhanced engagement.
-
Additional Sections:
- Testimonials: Add a section for user testimonials or success stories.
- Statistics: Display stats like number of servers, users, or uptime.
- Blog/Updates: Include a section for latest news or updates about Gyatso.
Deployment
Since this is a single-file website, deploying it is straightforward:
-
Hosting:
- GitHub Pages: Create a repository and push this HTML file. Enable GitHub Pages in the repository settings.
- Netlify: Drag and drop the HTML file onto Netlify for quick deployment.
- Vercel: Similar to Netlify, you can deploy directly from a GitHub repository.
- Your Own Server: Upload the HTML file to your web server.
-
Domain Name:
- Purchase a custom domain and point it to your hosting provider for a professional appearance.
-
SSL Certificate:
- Ensure your website uses HTTPS by obtaining an SSL certificate. Most hosting providers offer this for free.
Final Notes
This template serves as a solid foundation for your Gyatso Discord bot website. Tailor each section to effectively communicate your bot’s unique features and benefits. Regularly update the website with new commands, features, and community updates to keep your users engaged and informed.
If you need further customization or functionality, consider breaking your website into multiple files or using frameworks/libraries like React, Vue, or Bootstrap for more advanced features and scalability.
Feel free to reach out if you need more detailed assistance or specific features added!