NamelessTemplates
Documentation

Quarry

Installation

Requirements: NamelessMC 2.2.x (PHP 8.2+).

  1. Upload the Quarry folder to custom/templates/ of your NamelessMC installation (final path: custom/templates/Quarry/template.php).
  2. StaffCP → Customisation → Templates → find Quarry → Install, then Activate (make default).
  3. StaffCP → Configuration → General Settings → set Default Homepage to Portal. The portal home renders the Quarry modules; "News" keeps the classic news list, restyled.
  4. StaffCP → Customisation → Templates → Quarry → Settings to start customising.
  5. Make sure cache/ is writable (NamelessMC requirement) and clear cache/templates_c/ after updating files.

Updating

Replace the Quarry folder, keep your settings (they live in the database). Clear cache/templates_c/.

Customisation

Everything is edited in StaffCP → Customisation → Templates → Quarry → Settings. No code needed.

Tab What you can change
Design Colour palette (6 included) or your own primary/accent colours, default light/dark mode, font, corner style, content width, navbar style (glass, solid, floating pill, transparent), page title banner
Brand Logo text or image, server IP, fallback player count, Discord and store URLs
Home modules Enable, reorder, duplicate and edit every section of the home page
Footer Brand block, description, copyright text, “Powered by” line
Advanced Disable animations, add custom CSS
Import / Export Back up your configuration as JSON or copy it to another site

Light / dark mode

Visitors can switch with the navbar toggle (remembered in their browser). The default for first-time visitors is set in Design → Default colour mode.

Colour tokens for custom CSS

--qy-primary, --qy-primary-600, --qy-primary-300, --qy-accent, --qy-bg, --qy-surface, --qy-surface-2, --qy-border, --qy-text, --qy-muted, --qy-radius, --qy-radius-sm, --qy-font, --qy-container.

/* example: make the hero title bigger */
.qy-hero__title { font-size: 5rem; }

Server status

The hero chip and the Server status module use the default Minecraft server configured in StaffCP → Integrations → Minecraft. When the server cannot be queried they fall back to the numbers in Brand.

Demo images

The images in the live demo are not part of the download. Add your own in the Hero, Game modes, Features, Countdown and Final CTA modules (paste the image URL, or upload to uploads/ via StaffCP and use /uploads/...).

Home modules

Each section of the home page is a module: a folder in modules/<id>/. Drop a new folder in and it appears automatically in the editor (Home modules → Add section) — no registration needed.

modules/my_module/
  module.json   manifest + settings schema (what the editor shows)
  view.tpl      Smarty markup
  module.php    optional: returns function (array $settings, array $ctx): array  → available as {$d} in the view

module.json

{
  "id": "my_module", "name": "My module", "description": "Shown in the editor",
  "icon": "fas fa-star", "order": 50, "multiple": true,
  "fields": [
    {"key": "title", "type": "text", "label": "Title", "default": "Hello"},
    {"key": "items", "type": "repeater", "label": "Items", "item_label": "name",
     "fields": [{"key": "name", "type": "text", "label": "Name", "default": ""}], "default": []}
  ]
}

Field types: text, textarea, url, image, icon, number, toggle, select (with options), color, repeater, heading. Unless "no_common": true, the Section background and Anchor ID options are added automatically.

view.tpl

Settings are available as {$s.key} and provider data as {$d.key}. Escape user text with |escape.

<div class="qy-container">
  {include file="{$QUARRY_PATH}partials/section_head.tpl"}   {* optional eyebrow/title/subtitle header *}
  <h2>{$s.title|escape}</h2>
</div>

module.php

<?php
return static function (array $s, array $ctx): array {
    // $ctx: config, language, user, resolve($url), server[ip,online,players,max], forum_url
    return ['count' => DB::getInstance()->query('SELECT COUNT(*) c FROM nl2_users')->first()->c];
};

Included modules

Announcement bar · Hero · Server status · Game modes (bento) · Features · Shop showcase · News · Vote · How to join · Season countdown · Marquee · Stats · Staff · Top members · Gallery · FAQ · Discord · Rules · Partners · Final call to action · Custom HTML.