Okay, here is a modern, sleek Garry's Mod DarkRP storefront using Tailwind CSS classes that mimic a Shadcn-like zinc theme.
This is a single HTML file with all the styling embedded using Tailwind's utility classes and a small amount of custom CSS within <style> tags for background patterns or overrides not easily done with utilities alone. It also uses the Tailwind CDN for simplicity, but for production, you'd typically set up a build process.
FILE: storefront.html
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>[Your Server Name] Official Store</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Configure Tailwind to use the 'dark' class for dark mode -->
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
// Shadcn Zinc Palette approximation
zinc: {
50: '#FAFAFA',
100: '#F4F4F5',
200: '#E4E4E7',
300: '#D4D4D8',
400: '#A1A1AA',
500: '#71717A',
600: '#52525B',
700: '#3F3F46',
800: '#27272A',
900: '#18181B',
950: '#0A0A0A',
},
// Custom colors for the theme - adjust as needed
primary: { // Accent color (e.g., for buttons, highlights)
50: '#F0F9FF',
100: '#E0F2FE',
200: '#BAE6FD',
300: '#7DD3FC',
400: '#38BDF8',
500: '#0EA5E9', // Main accent blue
600: '#0284C7',
700: '#0369A1',
800: '#075985',
900: '#0C4A6E',
950: '#082F49',
},
currency: '#F59E0B', // Amber for currency
},
}
}
}
</script>
<style>
/* Basic body styling */
body {
font-family: sans-serif;
@apply bg-zinc-950 text-zinc-300 antialiased;
}
/* Subtle pattern for background (optional) */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle, rgba(63,63,70,0.1) 1px, transparent 1px);
background-size: 20px 20px;
z-index: -1;
opacity: 0.3; /* Adjust opacity */
}
/* Custom styles for card elements not easily covered by utilities */
.card {
@apply bg-zinc-900 border border-zinc-800 rounded-lg shadow-lg overflow-hidden flex flex-col;
}
.card-body {
@apply p-6 flex flex-col flex-grow;
}
.card-title {
@apply text-xl font-semibold mb-2 text-zinc-100;
}
.card-price {
@apply text-3xl font-bold mt-auto pt-4 text-primary-400;
}
.currency-price {
@apply text-3xl font-bold mt-auto pt-4 text-currency; /* Use currency color */
}
.btn-buy {
@apply mt-4 w-full bg-primary-500 text-white py-2 px-4 rounded-md font-semibold hover:bg-primary-600 transition-colors duration-200;
}
.navbar {
@apply bg-zinc-900/80 backdrop-blur-sm sticky top-0 z-50 shadow-md;
}
.nav-link {
@apply text-zinc-400 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200;
}
/* Simple accordion style */
.accordion-item {
@apply border-b border-zinc-800 py-4;
}
.accordion-header {
@apply flex justify-between items-center cursor-pointer text-zinc-100 font-semibold;
}
.accordion-content {
@apply mt-2 text-zinc-400 hidden; /* Hidden by default */
}
.accordion-item.active .accordion-content {
display: block;
}
</style>
</head>
<body class="dark">
<!-- Navigation -->
<nav class="navbar">
<div class="container mx-auto px-4 sm:px-6 lg:px-8 flex items-center justify-between h-16">
<!-- Logo/Server Name -->
<div class="flex items-center">
<a href="#" class="flex-shrink-0 text-white font-extrabold text-xl tracking-tight">
<span class="text-primary-400">GMOD</span><span class="text-zinc-200">RP</span> <span class="text-xs font-normal text-zinc-500">Store</span>
</a>
</div>
<!-- Nav Links (Hidden on mobile by default - requires JS toggle) -->
<div class="hidden md:block">
<div class="ml-10 flex items-baseline space-x-4">
<a href="#ranks" class="nav-link">Ranks</a>
<a href="#currency" class="nav-link">Currency</a>
<a href="#cases" class="nav-link">Cases</a>
<a href="#faq" class="nav-link">FAQ</a>
</div>
</div>
<!-- Cart Button -->
<div class="ml-4 flex items-center">
<button class="relative inline-flex items-center px-3 py-2 border border-zinc-700 text-sm font-medium rounded-md text-zinc-300 bg-zinc-800 hover:bg-zinc-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
🛒 Cart
<span id="cart-count" class="ml-1 inline-flex items-center justify-center px-2 py-0.5 text-xs font-bold leading-none text-red-100 bg-red-600 rounded-full">0</span>
</button>
</div>
<!-- Mobile Menu Button (Requires JS to toggle) -->
<div class="-mr-2 flex md:hidden">
<button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-800 focus:ring-white" aria-controls="mobile-menu" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<!-- Heroicon menu icon -->
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
<!-- Heroicon close icon -->
<svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
<!-- Mobile Menu (Requires JS to toggle) -->
<div class="md:hidden" id="mobile-menu">
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
<a href="#ranks" class="nav-link block">Ranks</a>
<a href="#currency" class="nav-link block">Currency</a>
<a href="#cases" class="nav-link block">Cases</a>
<a href="#faq" class="nav-link block">FAQ</a>
</div>
</div>
</nav>
<main class="container mx-auto px-4 py-8 sm:px-6 lg:px-8">
<!-- Ranks Section -->
<section id="ranks" class="my-16">
<h2 class="text-4xl font-bold text-center text-zinc-100 mb-10">Server Ranks</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- Lifetime Rank 1 -->
<div class="card">
<div class="card-body">
<h3 class="card-title text-yellow-400">VIP <span class="text-sm text-zinc-400 font-normal">(Lifetime)</span></h3>
<p class="text-zinc-400 mb-4">Unlock exclusive perks forever:</p>
<ul class="list-disc list-inside text-zinc-400 space-y-1 mb-6">
<li>Reserved Server Slot</li>
<li>$50,000 Starting Cash</li>
<li>Exclusive Chat Tag</li>
<li>Access to <span class="font-semibold">/vip</span> command</li>
</ul>
<div class="card-price">$14.99</div>
<button class="btn-buy" onclick="add('rank_vip_life')">Buy Lifetime</button>
</div>
</div>
<!-- Lifetime Rank 2 -->
<div class="card">
<div class="card-body">
<h3 class="card-title text-blue-400">Elite <span class="text-sm text-zinc-400 font-normal">(Lifetime)</span></h3>
<p class="text-zinc-400 mb-4">Everything in VIP, plus:</p>
<ul class="list-disc list-inside text-zinc-400 space-y-1 mb-6">
<li>Double Paycheck</li>
<li>Priority Support</li>
<li>Unique Player Model Option</li>
<li>Access to <span class="font-semibold">/elite</span> command</li>
</ul>
<div class="card-price">$29.99</div>
<button class="btn-buy" onclick="add('rank_elite_life')">Buy Lifetime</button>
</div>
</div>
<!-- Subscription Rank -->
<div class="card">
<div class="card-body">
<h3 class="card-title text-purple-400">Supreme <span class="text-sm text-zinc-400 font-normal">(Monthly Subscription)</span></h3>
<p class="text-zinc-400 mb-4">The ultimate experience, billed monthly:</p>
<ul class="list-disc list-inside text-zinc-400 space-y-1 mb-6">
<li>Everything in Elite + VIP</li>
<li>Queue Skip Priority</li>
<li>Customizable Job Slot</li>
<li>Tripled Paycheck</li>
<li>Access to <span class="font-semibold">/supreme</span> command</li>
</ul>
<div class="card-price">$9.99<span class="text-base font-normal text-zinc-400"> / mo</span></div>
<button class="btn-buy bg-purple-600 hover:bg-purple-700" onclick="add('rank_supreme_sub')">Subscribe Now</button>
</div>
</div>
</div>
</section>
<!-- Currency Section -->
<section id="currency" class="my-16">
<h2 class="text-4xl font-bold text-center text-zinc-100 mb-10">DarkCoins <span class="text-currency">💰</span></h2>
<p class="text-center text-zinc-400 mb-12">DarkCoins are our premium in-game currency, used for buying exclusive items and perks directly on the server.</p>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-8">
<!-- Coin Pack 1 -->
<div class="card text-center">
<div class="card-body p-6">
<h4 class="text-2xl font-semibold text-zinc-100 mb-4">1 000 DC</h4>
<p class="text-zinc-400 mb-6">A small boost to get you started.</p>
<div class="card-price">$4.99</div>
<button class="btn-buy" onclick="add('currency_1000dc')">Get Coins</button>
</div>
</div>
<!-- Coin Pack 2 -->
<div class="card text-center">
<div class="card-body p-6">
<h4 class="text-2xl font-semibold text-zinc-100 mb-4">5 500 DC <span class="text-sm text-green-400 font-normal">(+10 % Bonus)</span></h4>
<p class="text-zinc-400 mb-6">Great value for regular spending.</p>
<div class="card-price">$19.99</div>
<button class="btn-buy" onclick="add('currency_5500dc')">Get Coins</button>
</div>
</div>
<!-- Coin Pack 3 -->
<div class="card text-center">
<div class="card-body p-6">
<h4 class="text-2xl font-semibold text-zinc-100 mb-4">12 000 DC <span class="text-sm text-green-400 font-normal">(+20 % Bonus)</span></h4>
<p class="text-zinc-400 mb-6">Stock up and save more.</p>
<div class="card-price">$39.99</div>
<button class="btn-buy" onclick="add('currency_12000dc')">Get Coins</button>
</div>
</div>
<!-- Coin Pack 4 -->
<div class="card text-center">
<div class="card-body p-6">
<h4 class="text-2xl font-semibold text-zinc-100 mb-4">25 000 DC <span class="text-sm text-green-400 font-normal">(+25 % Bonus)</span></h4>
<p class="text-zinc-400 mb-6">The best value for serious players!</p>
<div class="card-price">$74.99</div>
<button class="btn-buy" onclick="add('currency_25000dc')">Get Coins</button>
</div>
</div>
</div>
</section>
<!-- Cases Section -->
<section id="cases" class="my-16">
<h2 class="text-4xl font-bold text-center text-zinc-100 mb-10">Loot Cases 📦</h2>
<p class="text-center text-zinc-400 mb-12">Test your luck and unlock rare items!</p>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- Case 1 -->
<div class="card">
<img class="w-full h-48 object-cover" src="https://via.placeholder.com/600x400?text=Weapon+Case" alt="Weapon Case Placeholder">
<div class="card-body">
<h4 class="card-title">Weapon Case</h4>
<p class="text-zinc-400 text-sm mb-4">Contains a random weapon from our custom pool. Chance for rare and legendary skins!</p>
<p class="text-sm text-zinc-500">Possible items: SMGs, Rifles, Snipers, Explosives. <span class="font-semibold">Rare drop chance!</span></p>
<div class="currency-price">2 000 <span class="text-base font-normal text-zinc-400">DC</span></div>
<button class="btn-buy" onclick="add('case_weapon')">Purchase Case</button>
</div>
</div>
<!-- Case 2 -->
<div class="card">
<img class="w-full h-48 object-cover" src="https://via.placeholder.com/600x400?text=Cosmetic+Case" alt="Cosmetic Case Placeholder">
<div class="card-body">
<h4 class="card-title">Cosmetic Case</h4>
<p class="text-zinc-400 text-sm mb-4">Unlock stylish items to customize your look and feel.</p>
<p class="text-sm text-zinc-500">Possible items: Player models, trails, hats, glasses, particle effects.</p>
<div class="currency-price">1 500 <span class="text-base font-normal text-zinc-400">DC</span></div>
<button class="btn-buy" onclick="add('case_cosmetic')">Purchase Case</button>
</div>
</div>
<!-- Case 3 -->
<div class="card">
<img class="w-full h-48 object-cover" src="https://via.placeholder.com/600x400?text=Vehicle+Case" alt="Vehicle Case Placeholder">
<div class="card-body">
<h4 class="card-title">Vehicle Case</h4>
<p class="text-zinc-400 text-sm mb-4">Spawn a random vehicle, from basic cars to rare sports models.</p>
<p class="text-sm text-zinc-500">Possible items: Sedans, Trucks, Motorcycles, Sports Cars, Helicopters (rare).</p>
<div class="currency-price">3 000 <span class="text-base font-normal text-zinc-400">DC</span></div>
<button class="btn-buy" onclick="add('case_vehicle')">Purchase Case</button>
</div>
</div>
</div>
</section>
<!-- FAQ Section -->
<section id="faq" class="my-16">
<h2 class="text-4xl font-bold text-center text-zinc-100 mb-10">Frequently Asked Questions</h2>
<div class="max-w-2xl mx-auto">
<div class="accordion-item">
<div class="accordion-header" onclick="toggleAccordion(this)">
How quickly will I receive my purchase?
</div>
<div class="accordion-content">
Most purchases, especially ranks and currency, are delivered instantly to your account once the payment is confirmed and you are in-game. For cases, they will appear in your inventory system. You might need to rejoin the server or use a command like <code>!sync</code> if it doesn't appear immediately.
</div>
</div>
<div class="accordion-item">
<div class="accordion-header" onclick="toggleAccordion(this)">
What if I buy a lifetime rank and the server closes?
</div>
<div class="accordion-content">
Lifetime ranks are for the lifetime of this specific server. While we have no plans to close, server longevity cannot be guaranteed. We cannot offer refunds if the server ceases operation, as per our Terms of Service. Purchases are investments in the server's running costs and community.
</div>
</div>
<div class="accordion-item">
<div class="accordion-header" onclick="toggleAccordion(this)">
Can I get a refund?
</div>
<div class="accordion-content">
Generally, all sales of digital goods are final. Refunds are typically only issued in cases of payment processing errors or non-delivery of the product due to technical issues on our end. Please review our full Refund Policy linked in the footer.
</div>
</div>
<div class="accordion-item">
<div class="accordion-header" onclick="toggleAccordion(this)">
How do I use my DarkCoins?
</div>
<div class="accordion-content">
DarkCoins appear as a balance in your in-game currency wallet. You can spend them on various items, jobs, or perks through the in-game F4 menu or specific vendor NPCs.
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="bg-zinc-900/80 backdrop-blur-sm text-center py-6 mt-12 text-zinc-500 text-sm">
<div class="container mx-auto px-4">
<p>© 2024 [Your Server Name] — Not affiliated with Facepunch Studios or Garry Newman.</p>
<p class="mt-2">
<a href="#" class="text-zinc-400 hover:text-white transition-colors duration-200">Terms of Service</a> |
<a href="#" class="text-zinc-400 hover:text-white transition-colors duration-200">Privacy Policy</a> |
<a href="https://discord.gg/your-discord-link" target="_blank" class="text-zinc-400 hover:text-white transition-colors duration-200">Discord</a>
</p>
</div>
</footer>
<!-- Simple JavaScript for Cart Counter and Accordion -->
<script>
const cart = {}; // Simple object to store item counts
const cartCountSpan = document.getElementById('cart-count');
function add(productId) {
cart[productId] = (cart[productId] || 0) + 1;
updateCartCount();
// In a real store, you would integrate with a payment gateway here (e.g., Tebex, CraftingStore API)
alert('Added ' + productId + ' to cart! (This is a placeholder action)'); // Replace with real cart/checkout logic
}
function updateCartCount() {
const totalItems = Object.values(cart).reduce((sum, count) => sum + count, 0);
cartCountSpan.innerText = totalItems;
}
// Basic Accordion Toggle
function toggleAccordion(header) {
const item = header.parentElement;
const content = header.nextElementSibling;
if (item.classList.contains('active')) {
item.classList.remove('active');
content.style.display = 'none';
} else {
// Close others if you want only one open at a time
document.querySelectorAll('.accordion-item.active').forEach(openItem => {
if (openItem !== item) {
openItem.classList.remove('active');
openItem.querySelector('.accordion-content').style.display = 'none';
}
});
item.classList.add('active');
content.style.display = 'block'; // Use block for visibility
}
}
// --- Mobile Menu Toggle (Basic) ---
// You'd typically add event listeners for click
// and toggle the 'hidden' class on the mobile menu div.
// For this simple example, it's commented out but the structure is there.
// const mobileMenuBtn = document.querySelector('[aria-controls="mobile-menu"]');
// const mobileMenu = document.getElementById('mobile-menu');
// mobileMenuBtn.addEventListener('click', () => {
// const expanded = mobileMenuBtn.getAttribute('aria-expanded') === 'true' || false;
// mobileMenuBtn.setAttribute('aria-expanded', !expanded);
// mobileMenu.classList.toggle('hidden');
// // Also toggle the menu/close icons
// mobileMenuBtn.querySelector('svg:first-child').classList.toggle('hidden');
// mobileMenuBtn.querySelector('svg:last-child').classList.toggle('hidden');
// });
</script>
</body>
</html>
How to Use:
- Save the code above as
storefront.html.
- Replace
[Your Server Name] and [your-discord-link] with your actual server details.
- Replace the placeholder image URLs (
https://via.placeholder.com/...) with actual images for your cases if you have them.
- Adjust the prices, descriptions, and rank perks (
<ul> lists) to match your server's offerings.
- Adjust the color palette in the
<script> tag configuring tailwind.config if you want slightly different shades.
- Host this HTML file on any web server (e.g., through your game server host's webspace, a dedicated web host, or services like Netlify/Vercel for free static hosting).
- The "Buy" buttons currently just run a simple JavaScript
add() function and show an alert. You will need to integrate this with your actual payment gateway (like Tebex, CraftingStore, or a custom solution). Their documentation will provide the correct JavaScript code to use instead of the alert() call.
Notes:
- Tailwind CDN: Using the CDN is great for a quick start but is not recommended for production due to performance and caching issues. For a real site, you should set up a proper Tailwind build process.
- JavaScript: The included JS is minimal for the cart counter and basic FAQ toggle. A real storefront requires much more complex JavaScript for handling the cart, checkout process, user logins (if applicable), etc., which is usually handled by the payment gateway's integration.
- Responsiveness: Tailwind handles much of the responsiveness with utility classes (
md:grid-cols-2, etc.). The navigation is set up for a basic mobile toggle, but the JS to make the mobile menu functional needs to be added/uncommented.
- Customization: All styling is done via Tailwind classes or the small CSS block. You can modify colors, spacing, fonts, etc., easily by changing these classes.