ServerSeek Documentation

Comprehensive guide to the project structure, styling, and functionality

Project Overview

ServerSeek is a modern gaming server tracking template designed to help gamers find and track servers across multiple gaming platforms. The project is built with a combination of HTML, CSS, JavaScript, and utilizes TailwindCSS for responsive layouts.

Project Structure

ServerSeek/
├── index.html              # Main homepage
├── servers.html            # Server listing page
├── contact.html            # Contact page
├── docs.html               # Documentation page
├── assets/
│   ├── css/
│   │   ├── style.css       # Main stylesheet
│   │   └── docs.css        # Documentation stylesheet
│   ├── js/
│   │   └── main.js         # Main JavaScript file
│   └── images/
│       ├── games/          # Game icon images
│       ├── seo/            # SEO images (og_image.png, etc.)
│       └── ...             # Other images
└── ...

HTML Structure

The HTML structure is organized to provide a clean, semantic layout. The project uses modern HTML5 elements and follows best practices for accessibility and SEO.

Main Components

  • Header & Navigation: Fixed responsive navbar with mobile toggle
  • Hero Section: Main call-to-action area on the homepage
  • Feature Sections: "Why Us" section with feature cards
  • Pricing Plans: VIP plans displayed in cards
  • Statistics Section: Real-time metrics in stat boxes
  • Supported Games: Grid display of game icons
  • Footer: Multi-column footer with links and newsletter

Basic Page Template

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>ServerSeek - Page Title</title>
    <!-- CSS & Fonts -->
  </head>
  <body>
    <!-- Navbar -->
    <header class="navbar-container">
      <!-- Navigation content -->
    </header>
    
    <!-- Main content sections -->
    <section class="section-name">
      <div class="container">
        <!-- Section content -->
      </div>
    </section>
    
    <!-- Footer -->
    <footer class="footer-section">
      <!-- Footer content -->
    </footer>
    
    <!-- JavaScript -->
    <script src="assets/js/main.js"></script>
  </body>
</html>

CSS Styling

The CSS styling for ServerSeek is organized into modular components with a focus on maintainability and reusability. The main stylesheet uses custom CSS variables for consistent theming across the site.

File Structure

  • style.css - Main stylesheet containing all global styles and components
  • docs.css - Documentation-specific styles

Methodology

The CSS follows component-based organization, where each UI element has its own dedicated styles. This makes it easier to maintain and update specific parts of the UI without affecting others.

CSS Structure Example

/* Component-based organization */

/* Global Styles */
body {
  background-color: var(--color-dark-900);
  color: var(--color-light-100);
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Typography */
.text-gradient {
  background: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    var(--color-secondary) 50%,
    var(--color-tertiary) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  background-color: var(--color-primary);
  color: var(--color-light-100);
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  /* ... more styles ... */
}

Color Scheme

ServerSeek uses a modern, vibrant color palette defined with CSS variables in the :root section. This enables easy theming and consistent color usage throughout the application.

Root Variables

:root {
  /* Main Colors */
  --color-primary: #7e22ce; /* Primary purple */
  --color-primary-hover: #9333ea; /* Lighter purple for hover states */
  --color-secondary: #06b6d4; /* Cyan accent color */
  --color-tertiary: #db2777; /* Pink accent color */

  /* Background Colors */
  --color-dark-900: #0f172a; /* Main background (almost black) */
  --color-dark-800: #1e293b; /* Secondary background (dark blue-gray) */
  --color-dark-700: #334155; /* Lighter background for cards, etc. */

  /* Text Colors */
  --color-light-100: #f1f5f9; /* Main text color (off-white) */
  --color-light-200: #cbd5e1; /* Secondary text color (light gray) */
  --color-light-300: #94a3b8; /* Muted text color */

  /* Additional Colors */
  --color-vip-gold: #fbbf24; /* Gold color for VIP elements */
  --color-vip-glow: rgba(251, 191, 36, 0.3); /* Glow for VIP elements */
  --color-success: #10b981; /* Success/positive color */
}

Color Palette

Primary
#7e22ce
Secondary
#06b6d4
Tertiary
#db2777
Dark 900
#0f172a
Dark 800
#1e293b
Light 100
#f1f5f9
VIP Gold
#fbbf24
Success
#10b981

JavaScript

The JavaScript in ServerSeek enhances the user experience with interactive elements, animations, and dynamic functionality. The code is organized in a modular way with separate functions for specific features.

Main Features

  • Mobile Menu Toggle - Handles the mobile navigation menu visibility
  • Smooth Scrolling - Provides smooth scroll behavior for anchor links
  • Navbar Scroll Effect - Controls navbar appearance when scrolling
  • Counter Animation - Animates the statistics counters when in view
  • Progress Bar Animation - Fills stat bars based on percentage values

Navbar Scroll Effect

// Navbar scroll effect
const navbar = document.querySelector(".navbar-container");
let lastScrollTop = 0;
let isScrollingUp = false;

// Initial check in case the page is loaded partially scrolled
if (window.scrollY > 50) {
  navbar.classList.add("navbar-scrolled");
} else {
  navbar.classList.remove("navbar-scrolled");
}

window.addEventListener("scroll", function() {
  // Detect scroll position
  const currentScroll = window.pageYOffset || document.documentElement.scrollTop;
  
  // Determine scroll direction
  isScrollingUp = currentScroll < lastScrollTop;
  
  // Add or remove classes based on scroll position and direction
  if (currentScroll > 50) {
    navbar.classList.add("navbar-scrolled");
    
    // If scrolling down and navbar is visible, hide it
    if (!isScrollingUp && currentScroll > 300) {
      navbar.classList.add("navbar-hidden");
    } else {
      // If scrolling up, always show navbar
      navbar.classList.remove("navbar-hidden");
    }
  } else {
    // At the top of the page
    navbar.classList.remove("navbar-scrolled");
    navbar.classList.remove("navbar-hidden");
  }
  
  lastScrollTop = currentScroll <= 0 ? 0 : currentScroll; // For Mobile or negative scrolling
}, { passive: true });

Counter Animation

// Counter animation for statistics
function animateCounters() {
  const counters = document.querySelectorAll(".counter");
  const speed = 200; // Lower is faster

  counters.forEach((counter) => {
    const target = +counter.getAttribute("data-target");
    const increment = target / speed;
    let count = 0;

    const updateCount = () => {
      if (count < target) {
        count += increment;
        counter.innerText = Math.floor(count).toLocaleString();
        setTimeout(updateCount, 1);
      } else {
        counter.innerText = target.toLocaleString();
      }
    };

    // Start animation when element is in viewport
    const observer = new IntersectionObserver(
      (entries) => {
        entries.forEach((entry) => {
          if (entry.isIntersecting) {
            updateCount();
            observer.unobserve(entry.target);
          }
        });
      },
      { threshold: 0.1 }
    );

    observer.observe(counter);
  });
}

Responsive Design

ServerSeek is built with a mobile-first approach, ensuring optimal display and usability across all device sizes. The responsive design is achieved using a combination of TailwindCSS utility classes and custom media queries.

Breakpoints

Media Query Breakpoints

/* Small devices (phones, 576px and up) */
@media (max-width: 576px) {
  /* Small device specific styles */
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 768px) {
  /* Medium device specific styles */
}

/* Large devices (desktops, 992px and up) */
@media (max-width: 992px) {
  /* Large device specific styles */
}

/* Extra large devices (large desktops, 1200px and up) */
@media (max-width: 1200px) {
  /* Extra large device specific styles */
}

Mobile Menu

For smaller screens, the navigation collapses into a hamburger menu that can be toggled to show/hide navigation links. This provides a clean interface without sacrificing functionality.

Responsive Grid

Content sections such as feature cards, pricing plans, and statistics use responsive grid layouts that adjust based on screen size:

  • Small screens (mobile): Single column layout
  • Medium screens (tablets): Two column layout
  • Large screens (desktops): Multi-column layout (3-4 columns)

Custom Components

ServerSeek includes several custom-designed UI components that are reused throughout the site. Each component has its own set of styles and sometimes JavaScript functionality.

Feature Cards

Used in the "Why Us" section to showcase platform features with icons and descriptions.

Pricing Cards

Display different VIP plan options with pricing, features, and CTAs.

Stat Boxes

Present platform statistics with animated counters and progress bars.

Game Icons

Showcase supported games with interactive hover effects.

Buttons

Various button styles with hover effects and animations.

Button Component Example

<!-- Primary Button -->
<a href="servers.html" class="btn-primary">
  <i class="bi bi-search mr-2"></i> Browse Servers
</a>

<!-- Secondary Button -->
<a href="servers.html#add-server" class="btn-secondary">
  <i class="bi bi-plus-circle mr-2"></i> Add Server
</a>

<!-- VIP Button -->
<a href="#plans" class="btn-vip">
  <i class="bi bi-gem mr-2"></i> Explore VIP Benefits
</a>

Page Structure

Each page in the ServerSeek template follows a consistent structure while featuring unique content sections. Here's a breakdown of the main pages:

Index.html (Homepage)

The main landing page that showcases the platform's features and value proposition.

  • Hero Section - Main heading, subheading, and CTA buttons
  • Why Us Section - Feature cards highlighting platform benefits
  • VIP Banner - Promotional section for VIP features
  • Plans Section - Different pricing tiers for VIP status
  • Statistics Section - Platform metrics with animated counters
  • Supported Games - Grid of game icons supported by the platform

Servers.html

Dedicated page for browsing and adding gaming servers.

Server Page Structure

The servers.html page provides a comprehensive interface for users to search, filter, and browse gaming servers across multiple platforms. The page is organized into several key sections:

  • Server Statistics - Shows real-time metrics like total servers, players, VIP servers, and countries
  • Search & Filter - Advanced search functionality with multiple filtering options
  • VIP Servers - Highlighted section featuring premium servers with gold accents
  • Popular Servers - Collection of frequently visited servers
  • Recently Added - Newest servers added to the platform
  • All Servers Table - Comprehensive table listing with sorting and pagination
  • Add Server CTA - Call-to-action for users to add their own servers

Server Search & Filtering

The search and filtering system allows users to quickly find servers matching specific criteria:

  • Text Search - Search by server name, IP, or location
  • Game Filter - Filter by specific games (CS2, CS1.6, Minecraft, etc.)
  • Country Filter - Filter servers by geographic location
  • Status Filter - Filter by server status (online, non-empty, etc.)
  • Player Count Range - Filter by minimum and maximum player counts
  • Ping Filter - Filter by maximum acceptable ping
  • Server Type - Filter by server category (VIP, normal, new)

VIP Server Styling

VIP servers receive special visual treatment to highlight their premium status:

  • Gold Left Border - 6px solid gold border on the left side of table rows
  • Background Gradient - Subtle gold gradient background effect
  • VIP Badge - Prominent gold "VIP SERVER" badge in the top-right corner
  • Premium Card Layout - Enhanced card design in the VIP Servers section
  • VIP Tag - Gold "VIP" tag next to the status indicator
<!-- VIP Server Row Styling -->
<tr
  class="hover:bg-[#293548] transition-colors bg-gradient-to-r from-[#fbbf24]/20 via-[#f59e0b]/15 to-[#d97706]/20"
  style="border-left: 6px solid #f59e0b !important;"
>
  <!-- Row content -->
</tr>

Server Listing Components

The server listings are displayed in different formats throughout the page:

  • Server Cards - Used in the VIP, Popular, and Recently Added sections. Feature game icon, server name, location, online status, ping, player count, and connection buttons
  • Server Table Rows - Used in the All Servers section, displaying compact information in a sortable table format
  • Responsive Design - Both cards and table rows adapt to different screen sizes, with mobile optimizations

Each server listing contains essential information:

  • Game Icon & Name - Visual identifier and server name
  • Location & Ping - Geographic location and connection speed
  • Player Count - Current players and capacity with visual progress bar
  • IP Address - Server connection information
  • Status Indicator - Visual online/offline status
  • Action Buttons - Info and Connect buttons for user interaction

Server Table Structure

The All Servers table section uses a carefully structured HTML table with the following features:

  • Responsive Design - Columns adapt or hide based on screen size
  • Sorting - Column headers can be used for sorting
  • Row Styling - Hover effects and visual differentiation between VIP and regular servers
  • Pagination - Table results are paginated with navigation controls
<!-- All Servers Table Structure -->
<div class="overflow-x-auto bg-[#1e293b] rounded-lg shadow-lg border border-[#334155]">
  <table class="min-w-full">
    <thead>
      <tr class="bg-[#0f172a] text-left">
        <!-- Table headers -->
      </tr>
    </thead>
    <tbody class="divide-y divide-[#334155]">
      <!-- Server rows -->
    </tbody>
  </table>
</div>

Serverinfo.html

Detailed server information page that provides comprehensive statistics, performance metrics, and real-time data about a specific gaming server.

Server Info Page Structure

The serverinfo.html page is organized into several key sections that provide detailed information about a specific server:

  • Server Header - Contains server name, game icon, status, location, and quick actions
  • Quick Statistics - Shows key metrics like players, tickrate, ping, uptime, and global rank
  • Performance Charts - Visual representation of server performance metrics:
    • Player Count History
    • Most Played Maps
    • Server Performance (Tickrate & Ping)
  • Server Details - Technical information including IP, location, version, etc.
  • Current Map - Shows the active map with remaining time
  • Server Rules - List of server rules and guidelines

Chart.js Implementation

The page uses Chart.js for visualizing server statistics. Here's an example of the chart configuration:

// Chart.js Configuration
Chart.defaults.color = "#94a3b8";
Chart.defaults.borderColor = "#334155";

// Player Count History Chart
const playerCountCtx = document
  .getElementById("playerCountChart")
  .getContext("2d");
new Chart(playerCountCtx, {
  type: "line",
  data: {
    labels: ["12 AM", "3 AM", "6 AM", "9 AM", "12 PM", "3 PM", "6 PM", "9 PM"],
    datasets: [{
      label: "Players Online",
      data: [15, 8, 5, 12, 25, 30, 28, 22],
      borderColor: "#7e22ce",
      backgroundColor: "rgba(126, 34, 206, 0.1)",
      tension: 0.4,
      fill: true,
    }],
  },
  options: {
    responsive: true,
    plugins: {
      legend: {
        display: false,
      },
    },
    scales: {
      y: {
        beginAtZero: true,
        max: 32,
      },
    },
  },
});

Contact.html

The contact page provides multiple ways for users to get in touch with support and find answers to common questions.

Contact Page Components

The contact page is structured with the following components:

  • Contact Form - Main form with fields for:
    • Name and Email
    • Subject dropdown with predefined categories
    • Message textarea
    • Submit button with send icon
  • Contact Information - Quick access to:
    • Email Support
    • Discord Support
    • Business Hours
    • Response Time Expectations
  • Social Media Links - Grid of social platform connections:
    • Discord
    • Twitter
    • Instagram
    • Facebook
  • Quick FAQ - Common questions and answers about:
    • Server Addition Process
    • VIP Features
    • Data Update Frequency

Contact Form Structure

The contact form uses a responsive grid layout with styled form elements:

<form class="space-y-6">
  <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
    <div>
      <label class="block text-light-200 text-sm mb-2">Name</label>
      <input
        type="text"
        class="w-full bg-[#0f172a] border border-[#334155] text-light-100 px-4 py-3 rounded-md focus:outline-none focus:ring-2 focus:ring-primary"
        placeholder="Your name"
      />
    </div>
    <div>
      <label class="block text-light-200 text-sm mb-2">Email</label>
      <input
        type="email"
        class="w-full bg-[#0f172a] border border-[#334155] text-light-100 px-4 py-3 rounded-md focus:outline-none focus:ring-2 focus:ring-primary"
        placeholder="your@email.com"
      />
    </div>
  </div>
  <!-- Additional form elements -->
</form>

Login.html

The login page provides a secure and user-friendly interface for users to access their ServerSeek accounts.

Login Page Components

The login page features a clean, centered design with the following elements:

  • Login Form - Main authentication form with:
    • Email input with validation
    • Password input with visibility toggle
    • Remember me checkbox
    • Forgot password link
    • Submit button with icon
  • Social Login - Alternative login methods:
    • Discord integration
    • Steam integration
  • Registration Link - Prominent link to registration page for new users

Password Visibility Toggle

The password field includes a visibility toggle feature:

// Password visibility toggle
const passwordInput = document.querySelector('input[type="password"]');
const toggleButton = passwordInput.nextElementSibling;
let passwordVisible = false;

toggleButton.addEventListener("click", () => {
  passwordVisible = !passwordVisible;
  passwordInput.type = passwordVisible ? "text" : "password";
  toggleButton.innerHTML = passwordVisible
    ? ''
    : '';
});

Register.html

The registration page allows new users to create their ServerSeek account with comprehensive form validation and security features.

Registration Page Components

The registration page includes several key components:

  • Registration Form - Comprehensive signup form with:
    • Username field with availability check
    • Email field with format validation
    • Password field with strength requirements
    • Password confirmation field
    • Terms and conditions acceptance checkbox
  • Password Requirements - Clear display of password criteria:
    • Minimum length requirement
    • Visual password strength indicator
    • Real-time validation feedback
  • Social Registration - Quick signup options:
    • Discord account integration
    • Steam account integration

Form Validation

Example of the registration form structure with validation attributes:

<form class="space-y-6">
  <div>
    <label class="block text-light-200 text-sm mb-2">Username</label>
    <input
      type="text"
      class="w-full bg-[#0f172a] border border-[#334155] text-light-100 px-4 py-3 rounded-md focus:outline-none focus:ring-2 focus:ring-primary"
      placeholder="Choose a username"
      required
    />
  </div>

  <div>
    <label class="block text-light-200 text-sm mb-2">Password</label>
    <div class="relative">
      <input
        type="password"
        class="w-full bg-[#0f172a] border border-[#334155] text-light-100 px-4 py-3 rounded-md focus:outline-none focus:ring-2 focus:ring-primary"
        placeholder="••••••••"
        required
      />
      <button type="button" class="password-toggle">
        <i class="bi bi-eye"></i>
      </button>
    </div>
    <p class="mt-1 text-sm text-light-300">
      Must be at least 8 characters long
    </p>
  </div>

  <div class="flex items-start">
    <input
      type="checkbox"
      id="terms"
      class="w-4 h-4 mt-1 bg-[#0f172a] border border-[#334155] rounded focus:ring-primary"
      required
    />
    <label for="terms" class="ml-2 text-sm text-light-200">
      I agree to the Terms of Service and Privacy Policy
    </label>
  </div>
</form>

Multiple Password Fields Toggle

JavaScript implementation for handling multiple password visibility toggles:

// Password visibility toggle for multiple fields
const passwordInputs = document.querySelectorAll('input[type="password"]');
const toggleButtons = document.querySelectorAll('button[type="button"]');

toggleButtons.forEach((button, index) => {
  let passwordVisible = false;

  button.addEventListener("click", () => {
    passwordVisible = !passwordVisible;
    passwordInputs[index].type = passwordVisible ? "text" : "password";
    button.innerHTML = passwordVisible
      ? ''
      : '';
  });
});

Docs.html

Documentation page (current page) providing detailed information about the project.

Search Engine Optimization

ServerSeek is optimized for search engines to ensure better visibility and ranking. The template includes best practices for SEO that can be customized for specific implementations.

Meta Tags

Each page includes essential meta tags in the <head> section for improved search engine visibility and social media sharing:

  • Title & Description: Unique titles and descriptions for each page that include relevant keywords
  • Theme Color: Consistent brand color for browser UI elements
  • Keywords: Targeted keywords relevant to gaming server discovery
  • Canonical URLs: Prevent duplicate content issues

Basic SEO Meta Tags

<!-- SEO Meta Tags -->
<meta name="description" content="Find and track the best gaming servers for CS2, CS16, Minecraft, and more with ServerSeek." />
<meta name="keywords" content="gaming servers, CS2 servers, Minecraft servers, server tracking, server finder" />
<meta name="author" content="ServerSeek" />
<meta name="theme-color" content="#7e22ce" />
<link rel="canonical" href="https://serverseek.com/page.html" />

Open Graph & Twitter Cards

Social media optimization is implemented through Open Graph and Twitter Card meta tags, allowing rich previews when content is shared:

Social Media Meta Tags

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://serverseek.com/" />
<meta property="og:title" content="ServerSeek - Find Your Perfect Gaming Server" />
<meta property="og:description" content="Find and track the best gaming servers for CS2, CS16, Minecraft, and more." />
<meta property="og:image" content="assets/images/seo/og_image.png" />

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://serverseek.com/" />
<meta property="twitter:title" content="ServerSeek - Find Your Perfect Gaming Server" />
<meta property="twitter:description" content="Find and track the best gaming servers for CS2, CS16, Minecraft, and more." />
<meta property="twitter:image" content="assets/images/seo/og_image.png" />

Semantic HTML

The template uses semantic HTML5 elements (<header>, <nav>, <section>, <footer>, etc.) to provide clear structure that search engines can understand.

Performance Optimization

Search engines prioritize fast-loading websites. ServerSeek template includes several performance optimizations:

  • Optimized image loading with proper dimensions and formats
  • Minified CSS and JavaScript files
  • Font preloading with preconnect and crossorigin attributes
  • Responsive images for different device sizes

Mobile Responsiveness

Google primarily uses the mobile version of a site for indexing and ranking. ServerSeek is built with mobile-first design principles to ensure excellent performance across all devices.

SEO Best Practices

// SEO Checklist for Implementation
1. Create unique title and meta description for each page
2. Ensure all images have descriptive alt attributes
3. Implement proper heading structure (H1, H2, H3)
4. Create an XML sitemap and submit to search engines
5. Set up robots.txt file to guide crawlers
6. Register with Google Search Console and Bing Webmaster Tools
7. Ensure site has SSL certificate (https)
8. Implement schema.org structured data where appropriate
9. Optimize page load speed (aim for < 3 seconds)
10. Create a content strategy with relevant keywords