Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MCLP

Simple Landing Page for a Small Minecraft Server

Introduction

  • This is a simple single landing page written in PHP with some basic html/css/js to help create a simple landing page for your (small) Minecraft server. So you at least have something until you grow and need to expand. It's made to be dynamic and flexible and if you clone this repository your staff can also clone/pr your own instance to edit the content to your liking. Making management pretty easy to be honest.

LAMP

  • This is made for and tested on Ubuntu 20 linux distro, with Apache2 and PHP, at this point MySQL is not needed.

Features

  • Simple Single Landing Page to help you get a quick bit of content up for your (starting and/or small) Minecraft server.
  • It all gets served through the main index.php file
  • Has a logo at the top
  • Easy to find server IP at the top, with an option to click to copy to clipboard.
  • Uses bootstrap for simple page design, making it super easy to customize.
  • Override a lot of the style css in a style.css file to match your personal style-guide (but dark mode by default).
  • Simple top menu that updates the current page without reloading to another page, with an includes/quicknav.php file that's easy to edit. (Don't forget to update index.php to add/remove the loading of that page)
  • EULA compliant footer to keep Mojang happy (we are not pretending to be .. disclaimer + server owner contact email)
  • Content that you want to add or customize is in its own /content/ folder, so you don't have to worry much about accidentally breaking the fancy stuff that makes up the page.
  • Easy to edit header/footer in the /includes/ folder so you can quickly personalize your landing page.
  • Global config.php file with variables that are used side-wide, so you can quickly make changes globally.
  • Global config.php file with shorthand php for those variables, so you can copy paste them wherever you want basically (apply some common sense though).
  • A great starting point for you to build out from. And your contributions can be offered here as a PR (pull request)for my consideration so it becomes merged into this project for all to enjoy.
  • The FAQ page is an accordion design, collapsed by default. making it easier to navigate
  • A status display of the server, is it online or offline? And how many are playing out of max allowed.
  • And a custom 404 page to catch all the fails.
  • Setup/ folder to help generate the config.php file.

Installation

  • Configure your webserver the way you want. https:// is required for the click to clipboard to work. But, who doesn't have https:// these days. You can use Let's Encrypt cert-bot fairly easily these days to set up your virtual host in Apache.
  • But, then clone this repository, browse to yourwebsite.com/setup, fill out the form and click the submit button.
  • The config.php it generates, upload it to the includes/ folder
  • Delete the setup/ directory.
  • Write your content on the indivual .php pages under /content/
  • Update the logo.png to your own (max 500px wide) server logo, you can find it in /assets/
  • Also update /content/default-info.php and default-faq.php to info.php and faq.php, as I won't be uploading my own to github.
  • Upload the files, and go test.

logo.png

  • I recommend a max of 500px wide, you can obviously decide to use logo.jpg, but the default is logo.png
  • It makes it 420px (hardcoded in includes/header.php), feel free to change this
  • .gitignore has logo.png so I can keep using my own.
  • included is a default-logo.png under /assets/ just rename it to logo.png or upload your own logo.png

info.php

  • Rename /content/default-info.php to info.php and customize it. (I dont' want to share my live one)

faq.php

  • Rename /content/default-faq.php to faq.php and customize it. (I dont' want to share my live one)

mc_status_cache.php

  • Make sure your webserver can read/write this file in the directory.
  • If you notice caching doesn't work, you could chmod 664 or 755 the file after creating it.
  • And make sure the webserver that serves the files can write and read it, tail -F /var/log/apache/error.log can help, as well as chmod on the cache filename.
  • It will work without this file, but you get a php warning internally each time, and not caching means if you have a busy site your servers gets potentially hammered. Not something you probably will enjoy.

mod_rewrite

  • Talking about configuring your webserver, besides installing php mod for Apache, make sure you install mod_rewrite mod so you can use .htaccess directives to help improve directory protections. There's no need for people to list directories like /includes/ or /content/, etc. And this way you can also handle the 404 not found page.

TODO

  • Move from locally hosted jQuery and Bootstrap to a CDN so we have less files to maintain
  • Move the 600s (10m) cache time to config.php

Version

Version 0.4.0

Screenshots

Screenshot- 2025-01-14 at 23 00 36 More: https://github.com/user-attachments/files/18416664/MCLP-Screenshots.zip

About

Simple Landing Page for a Small Minecraft Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MCLP

Simple Landing Page for a Small Minecraft Server

Introduction

  • This is a simple single landing page written in PHP with some basic html/css/js to help create a simple landing page for your (small) Minecraft server. So you at least have something until you grow and need to expand. It's made to be dynamic and flexible and if you clone this repository your staff can also clone/pr your own instance to edit the content to your liking. Making management pretty easy to be honest.

LAMP

  • This is made for and tested on Ubuntu 20 linux distro, with Apache2 and PHP, at this point MySQL is not needed.

Features

  • Simple Single Landing Page to help you get a quick bit of content up for your (starting and/or small) Minecraft server.
  • It all gets served through the main index.php file
  • Has a logo at the top
  • Easy to find server IP at the top, with an option to click to copy to clipboard.
  • Uses bootstrap for simple page design, making it super easy to customize.
  • Override a lot of the style css in a style.css file to match your personal style-guide (but dark mode by default).
  • Simple top menu that updates the current page without reloading to another page, with an includes/quicknav.php file that's easy to edit. (Don't forget to update index.php to add/remove the loading of that page)
  • EULA compliant footer to keep Mojang happy (we are not pretending to be .. disclaimer + server owner contact email)
  • Content that you want to add or customize is in its own /content/ folder, so you don't have to worry much about accidentally breaking the fancy stuff that makes up the page.
  • Easy to edit header/footer in the /includes/ folder so you can quickly personalize your landing page.
  • Global config.php file with variables that are used side-wide, so you can quickly make changes globally.
  • Global config.php file with shorthand php for those variables, so you can copy paste them wherever you want basically (apply some common sense though).
  • A great starting point for you to build out from. And your contributions can be offered here as a PR (pull request)for my consideration so it becomes merged into this project for all to enjoy.
  • The FAQ page is an accordion design, collapsed by default. making it easier to navigate
  • A status display of the server, is it online or offline? And how many are playing out of max allowed.
  • And a custom 404 page to catch all the fails.
  • Setup/ folder to help generate the config.php file.

Installation

  • Configure your webserver the way you want. https:// is required for the click to clipboard to work. But, who doesn't have https:// these days. You can use Let's Encrypt cert-bot fairly easily these days to set up your virtual host in Apache.
  • But, then clone this repository, browse to yourwebsite.com/setup, fill out the form and click the submit button.
  • The config.php it generates, upload it to the includes/ folder
  • Delete the setup/ directory.
  • Write your content on the indivual .php pages under /content/
  • Update the logo.png to your own (max 500px wide) server logo, you can find it in /assets/
  • Also update /content/default-info.php and default-faq.php to info.php and faq.php, as I won't be uploading my own to github.
  • Upload the files, and go test.

logo.png

  • I recommend a max of 500px wide, you can obviously decide to use logo.jpg, but the default is logo.png
  • It makes it 420px (hardcoded in includes/header.php), feel free to change this
  • .gitignore has logo.png so I can keep using my own.
  • included is a default-logo.png under /assets/ just rename it to logo.png or upload your own logo.png

info.php

  • Rename /content/default-info.php to info.php and customize it. (I dont' want to share my live one)

faq.php

  • Rename /content/default-faq.php to faq.php and customize it. (I dont' want to share my live one)

mc_status_cache.php

  • Make sure your webserver can read/write this file in the directory.
  • If you notice caching doesn't work, you could chmod 664 or 755 the file after creating it.
  • And make sure the webserver that serves the files can write and read it, tail -F /var/log/apache/error.log can help, as well as chmod on the cache filename.
  • It will work without this file, but you get a php warning internally each time, and not caching means if you have a busy site your servers gets potentially hammered. Not something you probably will enjoy.

mod_rewrite

  • Talking about configuring your webserver, besides installing php mod for Apache, make sure you install mod_rewrite mod so you can use .htaccess directives to help improve directory protections. There's no need for people to list directories like /includes/ or /content/, etc. And this way you can also handle the 404 not found page.

TODO

  • Move from locally hosted jQuery and Bootstrap to a CDN so we have less files to maintain
  • Move the 600s (10m) cache time to config.php

Version

Version 0.4.0

Screenshots

Screenshot- 2025-01-14 at 23 00 36 More: https://github.com/user-attachments/files/18416664/MCLP-Screenshots.zip

About

Simple Landing Page for a Small Minecraft Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MCLP

Simple Landing Page for a Small Minecraft Server

Introduction

  • This is a simple single landing page written in PHP with some basic html/css/js to help create a simple landing page for your (small) Minecraft server. So you at least have something until you grow and need to expand. It's made to be dynamic and flexible and if you clone this repository your staff can also clone/pr your own instance to edit the content to your liking. Making management pretty easy to be honest.

LAMP

  • This is made for and tested on Ubuntu 20 linux distro, with Apache2 and PHP, at this point MySQL is not needed.

Features

  • Simple Single Landing Page to help you get a quick bit of content up for your (starting and/or small) Minecraft server.
  • It all gets served through the main index.php file
  • Has a logo at the top
  • Easy to find server IP at the top, with an option to click to copy to clipboard.
  • Uses bootstrap for simple page design, making it super easy to customize.
  • Override a lot of the style css in a style.css file to match your personal style-guide (but dark mode by default).
  • Simple top menu that updates the current page without reloading to another page, with an includes/quicknav.php file that's easy to edit. (Don't forget to update index.php to add/remove the loading of that page)
  • EULA compliant footer to keep Mojang happy (we are not pretending to be .. disclaimer + server owner contact email)
  • Content that you want to add or customize is in its own /content/ folder, so you don't have to worry much about accidentally breaking the fancy stuff that makes up the page.
  • Easy to edit header/footer in the /includes/ folder so you can quickly personalize your landing page.
  • Global config.php file with variables that are used side-wide, so you can quickly make changes globally.
  • Global config.php file with shorthand php for those variables, so you can copy paste them wherever you want basically (apply some common sense though).
  • A great starting point for you to build out from. And your contributions can be offered here as a PR (pull request)for my consideration so it becomes merged into this project for all to enjoy.
  • The FAQ page is an accordion design, collapsed by default. making it easier to navigate
  • A status display of the server, is it online or offline? And how many are playing out of max allowed.
  • And a custom 404 page to catch all the fails.
  • Setup/ folder to help generate the config.php file.

Installation

  • Configure your webserver the way you want. https:// is required for the click to clipboard to work. But, who doesn't have https:// these days. You can use Let's Encrypt cert-bot fairly easily these days to set up your virtual host in Apache.
  • But, then clone this repository, browse to yourwebsite.com/setup, fill out the form and click the submit button.
  • The config.php it generates, upload it to the includes/ folder
  • Delete the setup/ directory.
  • Write your content on the indivual .php pages under /content/
  • Update the logo.png to your own (max 500px wide) server logo, you can find it in /assets/
  • Also update /content/default-info.php and default-faq.php to info.php and faq.php, as I won't be uploading my own to github.
  • Upload the files, and go test.

logo.png

  • I recommend a max of 500px wide, you can obviously decide to use logo.jpg, but the default is logo.png
  • It makes it 420px (hardcoded in includes/header.php), feel free to change this
  • .gitignore has logo.png so I can keep using my own.
  • included is a default-logo.png under /assets/ just rename it to logo.png or upload your own logo.png

info.php

  • Rename /content/default-info.php to info.php and customize it. (I dont' want to share my live one)

faq.php

  • Rename /content/default-faq.php to faq.php and customize it. (I dont' want to share my live one)

mc_status_cache.php

  • Make sure your webserver can read/write this file in the directory.
  • If you notice caching doesn't work, you could chmod 664 or 755 the file after creating it.
  • And make sure the webserver that serves the files can write and read it, tail -F /var/log/apache/error.log can help, as well as chmod on the cache filename.
  • It will work without this file, but you get a php warning internally each time, and not caching means if you have a busy site your servers gets potentially hammered. Not something you probably will enjoy.

mod_rewrite

  • Talking about configuring your webserver, besides installing php mod for Apache, make sure you install mod_rewrite mod so you can use .htaccess directives to help improve directory protections. There's no need for people to list directories like /includes/ or /content/, etc. And this way you can also handle the 404 not found page.

TODO

  • Move from locally hosted jQuery and Bootstrap to a CDN so we have less files to maintain
  • Move the 600s (10m) cache time to config.php

Version

Version 0.4.0

Screenshots

Screenshot- 2025-01-14 at 23 00 36 More: https://github.com/user-attachments/files/18416664/MCLP-Screenshots.zip

About

Simple Landing Page for a Small Minecraft Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MCLP

Simple Landing Page for a Small Minecraft Server

Introduction

  • This is a simple single landing page written in PHP with some basic html/css/js to help create a simple landing page for your (small) Minecraft server. So you at least have something until you grow and need to expand. It's made to be dynamic and flexible and if you clone this repository your staff can also clone/pr your own instance to edit the content to your liking. Making management pretty easy to be honest.

LAMP

  • This is made for and tested on Ubuntu 20 linux distro, with Apache2 and PHP, at this point MySQL is not needed.

Features

  • Simple Single Landing Page to help you get a quick bit of content up for your (starting and/or small) Minecraft server.
  • It all gets served through the main index.php file
  • Has a logo at the top
  • Easy to find server IP at the top, with an option to click to copy to clipboard.
  • Uses bootstrap for simple page design, making it super easy to customize.
  • Override a lot of the style css in a style.css file to match your personal style-guide (but dark mode by default).
  • Simple top menu that updates the current page without reloading to another page, with an includes/quicknav.php file that's easy to edit. (Don't forget to update index.php to add/remove the loading of that page)
  • EULA compliant footer to keep Mojang happy (we are not pretending to be .. disclaimer + server owner contact email)
  • Content that you want to add or customize is in its own /content/ folder, so you don't have to worry much about accidentally breaking the fancy stuff that makes up the page.
  • Easy to edit header/footer in the /includes/ folder so you can quickly personalize your landing page.
  • Global config.php file with variables that are used side-wide, so you can quickly make changes globally.
  • Global config.php file with shorthand php for those variables, so you can copy paste them wherever you want basically (apply some common sense though).
  • A great starting point for you to build out from. And your contributions can be offered here as a PR (pull request)for my consideration so it becomes merged into this project for all to enjoy.
  • The FAQ page is an accordion design, collapsed by default. making it easier to navigate
  • A status display of the server, is it online or offline? And how many are playing out of max allowed.
  • And a custom 404 page to catch all the fails.
  • Setup/ folder to help generate the config.php file.

Installation

  • Configure your webserver the way you want. https:// is required for the click to clipboard to work. But, who doesn't have https:// these days. You can use Let's Encrypt cert-bot fairly easily these days to set up your virtual host in Apache.
  • But, then clone this repository, browse to yourwebsite.com/setup, fill out the form and click the submit button.
  • The config.php it generates, upload it to the includes/ folder
  • Delete the setup/ directory.
  • Write your content on the indivual .php pages under /content/
  • Update the logo.png to your own (max 500px wide) server logo, you can find it in /assets/
  • Also update /content/default-info.php and default-faq.php to info.php and faq.php, as I won't be uploading my own to github.
  • Upload the files, and go test.

logo.png

  • I recommend a max of 500px wide, you can obviously decide to use logo.jpg, but the default is logo.png
  • It makes it 420px (hardcoded in includes/header.php), feel free to change this
  • .gitignore has logo.png so I can keep using my own.
  • included is a default-logo.png under /assets/ just rename it to logo.png or upload your own logo.png

info.php

  • Rename /content/default-info.php to info.php and customize it. (I dont' want to share my live one)

faq.php

  • Rename /content/default-faq.php to faq.php and customize it. (I dont' want to share my live one)

mc_status_cache.php

  • Make sure your webserver can read/write this file in the directory.
  • If you notice caching doesn't work, you could chmod 664 or 755 the file after creating it.
  • And make sure the webserver that serves the files can write and read it, tail -F /var/log/apache/error.log can help, as well as chmod on the cache filename.
  • It will work without this file, but you get a php warning internally each time, and not caching means if you have a busy site your servers gets potentially hammered. Not something you probably will enjoy.

mod_rewrite

  • Talking about configuring your webserver, besides installing php mod for Apache, make sure you install mod_rewrite mod so you can use .htaccess directives to help improve directory protections. There's no need for people to list directories like /includes/ or /content/, etc. And this way you can also handle the 404 not found page.

TODO

  • Move from locally hosted jQuery and Bootstrap to a CDN so we have less files to maintain
  • Move the 600s (10m) cache time to config.php

Version

Version 0.4.0

Screenshots

Screenshot- 2025-01-14 at 23 00 36 More: https://github.com/user-attachments/files/18416664/MCLP-Screenshots.zip

About

Simple Landing Page for a Small Minecraft Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MCLP

Simple Landing Page for a Small Minecraft Server

Introduction

  • This is a simple single landing page written in PHP with some basic html/css/js to help create a simple landing page for your (small) Minecraft server. So you at least have something until you grow and need to expand. It's made to be dynamic and flexible and if you clone this repository your staff can also clone/pr your own instance to edit the content to your liking. Making management pretty easy to be honest.

LAMP

  • This is made for and tested on Ubuntu 20 linux distro, with Apache2 and PHP, at this point MySQL is not needed.

Features

  • Simple Single Landing Page to help you get a quick bit of content up for your (starting and/or small) Minecraft server.
  • It all gets served through the main index.php file
  • Has a logo at the top
  • Easy to find server IP at the top, with an option to click to copy to clipboard.
  • Uses bootstrap for simple page design, making it super easy to customize.
  • Override a lot of the style css in a style.css file to match your personal style-guide (but dark mode by default).
  • Simple top menu that updates the current page without reloading to another page, with an includes/quicknav.php file that's easy to edit. (Don't forget to update index.php to add/remove the loading of that page)
  • EULA compliant footer to keep Mojang happy (we are not pretending to be .. disclaimer + server owner contact email)
  • Content that you want to add or customize is in its own /content/ folder, so you don't have to worry much about accidentally breaking the fancy stuff that makes up the page.
  • Easy to edit header/footer in the /includes/ folder so you can quickly personalize your landing page.
  • Global config.php file with variables that are used side-wide, so you can quickly make changes globally.
  • Global config.php file with shorthand php for those variables, so you can copy paste them wherever you want basically (apply some common sense though).
  • A great starting point for you to build out from. And your contributions can be offered here as a PR (pull request)for my consideration so it becomes merged into this project for all to enjoy.
  • The FAQ page is an accordion design, collapsed by default. making it easier to navigate
  • A status display of the server, is it online or offline? And how many are playing out of max allowed.
  • And a custom 404 page to catch all the fails.
  • Setup/ folder to help generate the config.php file.

Installation

  • Configure your webserver the way you want. https:// is required for the click to clipboard to work. But, who doesn't have https:// these days. You can use Let's Encrypt cert-bot fairly easily these days to set up your virtual host in Apache.
  • But, then clone this repository, browse to yourwebsite.com/setup, fill out the form and click the submit button.
  • The config.php it generates, upload it to the includes/ folder
  • Delete the setup/ directory.
  • Write your content on the indivual .php pages under /content/
  • Update the logo.png to your own (max 500px wide) server logo, you can find it in /assets/
  • Also update /content/default-info.php and default-faq.php to info.php and faq.php, as I won't be uploading my own to github.
  • Upload the files, and go test.

logo.png

  • I recommend a max of 500px wide, you can obviously decide to use logo.jpg, but the default is logo.png
  • It makes it 420px (hardcoded in includes/header.php), feel free to change this
  • .gitignore has logo.png so I can keep using my own.
  • included is a default-logo.png under /assets/ just rename it to logo.png or upload your own logo.png

info.php

  • Rename /content/default-info.php to info.php and customize it. (I dont' want to share my live one)

faq.php

  • Rename /content/default-faq.php to faq.php and customize it. (I dont' want to share my live one)

mc_status_cache.php

  • Make sure your webserver can read/write this file in the directory.
  • If you notice caching doesn't work, you could chmod 664 or 755 the file after creating it.
  • And make sure the webserver that serves the files can write and read it, tail -F /var/log/apache/error.log can help, as well as chmod on the cache filename.
  • It will work without this file, but you get a php warning internally each time, and not caching means if you have a busy site your servers gets potentially hammered. Not something you probably will enjoy.

mod_rewrite

  • Talking about configuring your webserver, besides installing php mod for Apache, make sure you install mod_rewrite mod so you can use .htaccess directives to help improve directory protections. There's no need for people to list directories like /includes/ or /content/, etc. And this way you can also handle the 404 not found page.

TODO

  • Move from locally hosted jQuery and Bootstrap to a CDN so we have less files to maintain
  • Move the 600s (10m) cache time to config.php

Version

Version 0.4.0

Screenshots

Screenshot- 2025-01-14 at 23 00 36 More: https://github.com/user-attachments/files/18416664/MCLP-Screenshots.zip

About

Simple Landing Page for a Small Minecraft Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MCLP

Simple Landing Page for a Small Minecraft Server

Introduction

  • This is a simple single landing page written in PHP with some basic html/css/js to help create a simple landing page for your (small) Minecraft server. So you at least have something until you grow and need to expand. It's made to be dynamic and flexible and if you clone this repository your staff can also clone/pr your own instance to edit the content to your liking. Making management pretty easy to be honest.

LAMP

  • This is made for and tested on Ubuntu 20 linux distro, with Apache2 and PHP, at this point MySQL is not needed.

Features

  • Simple Single Landing Page to help you get a quick bit of content up for your (starting and/or small) Minecraft server.
  • It all gets served through the main index.php file
  • Has a logo at the top
  • Easy to find server IP at the top, with an option to click to copy to clipboard.
  • Uses bootstrap for simple page design, making it super easy to customize.
  • Override a lot of the style css in a style.css file to match your personal style-guide (but dark mode by default).
  • Simple top menu that updates the current page without reloading to another page, with an includes/quicknav.php file that's easy to edit. (Don't forget to update index.php to add/remove the loading of that page)
  • EULA compliant footer to keep Mojang happy (we are not pretending to be .. disclaimer + server owner contact email)
  • Content that you want to add or customize is in its own /content/ folder, so you don't have to worry much about accidentally breaking the fancy stuff that makes up the page.
  • Easy to edit header/footer in the /includes/ folder so you can quickly personalize your landing page.
  • Global config.php file with variables that are used side-wide, so you can quickly make changes globally.
  • Global config.php file with shorthand php for those variables, so you can copy paste them wherever you want basically (apply some common sense though).
  • A great starting point for you to build out from. And your contributions can be offered here as a PR (pull request)for my consideration so it becomes merged into this project for all to enjoy.
  • The FAQ page is an accordion design, collapsed by default. making it easier to navigate
  • A status display of the server, is it online or offline? And how many are playing out of max allowed.
  • And a custom 404 page to catch all the fails.
  • Setup/ folder to help generate the config.php file.

Installation

  • Configure your webserver the way you want. https:// is required for the click to clipboard to work. But, who doesn't have https:// these days. You can use Let's Encrypt cert-bot fairly easily these days to set up your virtual host in Apache.
  • But, then clone this repository, browse to yourwebsite.com/setup, fill out the form and click the submit button.
  • The config.php it generates, upload it to the includes/ folder
  • Delete the setup/ directory.
  • Write your content on the indivual .php pages under /content/
  • Update the logo.png to your own (max 500px wide) server logo, you can find it in /assets/
  • Also update /content/default-info.php and default-faq.php to info.php and faq.php, as I won't be uploading my own to github.
  • Upload the files, and go test.

logo.png

  • I recommend a max of 500px wide, you can obviously decide to use logo.jpg, but the default is logo.png
  • It makes it 420px (hardcoded in includes/header.php), feel free to change this
  • .gitignore has logo.png so I can keep using my own.
  • included is a default-logo.png under /assets/ just rename it to logo.png or upload your own logo.png

info.php

  • Rename /content/default-info.php to info.php and customize it. (I dont' want to share my live one)

faq.php

  • Rename /content/default-faq.php to faq.php and customize it. (I dont' want to share my live one)

mc_status_cache.php

  • Make sure your webserver can read/write this file in the directory.
  • If you notice caching doesn't work, you could chmod 664 or 755 the file after creating it.
  • And make sure the webserver that serves the files can write and read it, tail -F /var/log/apache/error.log can help, as well as chmod on the cache filename.
  • It will work without this file, but you get a php warning internally each time, and not caching means if you have a busy site your servers gets potentially hammered. Not something you probably will enjoy.

mod_rewrite

  • Talking about configuring your webserver, besides installing php mod for Apache, make sure you install mod_rewrite mod so you can use .htaccess directives to help improve directory protections. There's no need for people to list directories like /includes/ or /content/, etc. And this way you can also handle the 404 not found page.

TODO

  • Move from locally hosted jQuery and Bootstrap to a CDN so we have less files to maintain
  • Move the 600s (10m) cache time to config.php

Version

Version 0.4.0

Screenshots

Screenshot- 2025-01-14 at 23 00 36 More: https://github.com/user-attachments/files/18416664/MCLP-Screenshots.zip

About

Simple Landing Page for a Small Minecraft Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MCLP

Simple Landing Page for a Small Minecraft Server

Introduction

  • This is a simple single landing page written in PHP with some basic html/css/js to help create a simple landing page for your (small) Minecraft server. So you at least have something until you grow and need to expand. It's made to be dynamic and flexible and if you clone this repository your staff can also clone/pr your own instance to edit the content to your liking. Making management pretty easy to be honest.

LAMP

  • This is made for and tested on Ubuntu 20 linux distro, with Apache2 and PHP, at this point MySQL is not needed.

Features

  • Simple Single Landing Page to help you get a quick bit of content up for your (starting and/or small) Minecraft server.
  • It all gets served through the main index.php file
  • Has a logo at the top
  • Easy to find server IP at the top, with an option to click to copy to clipboard.
  • Uses bootstrap for simple page design, making it super easy to customize.
  • Override a lot of the style css in a style.css file to match your personal style-guide (but dark mode by default).
  • Simple top menu that updates the current page without reloading to another page, with an includes/quicknav.php file that's easy to edit. (Don't forget to update index.php to add/remove the loading of that page)
  • EULA compliant footer to keep Mojang happy (we are not pretending to be .. disclaimer + server owner contact email)
  • Content that you want to add or customize is in its own /content/ folder, so you don't have to worry much about accidentally breaking the fancy stuff that makes up the page.
  • Easy to edit header/footer in the /includes/ folder so you can quickly personalize your landing page.
  • Global config.php file with variables that are used side-wide, so you can quickly make changes globally.
  • Global config.php file with shorthand php for those variables, so you can copy paste them wherever you want basically (apply some common sense though).
  • A great starting point for you to build out from. And your contributions can be offered here as a PR (pull request)for my consideration so it becomes merged into this project for all to enjoy.
  • The FAQ page is an accordion design, collapsed by default. making it easier to navigate
  • A status display of the server, is it online or offline? And how many are playing out of max allowed.
  • And a custom 404 page to catch all the fails.
  • Setup/ folder to help generate the config.php file.

Installation

  • Configure your webserver the way you want. https:// is required for the click to clipboard to work. But, who doesn't have https:// these days. You can use Let's Encrypt cert-bot fairly easily these days to set up your virtual host in Apache.
  • But, then clone this repository, browse to yourwebsite.com/setup, fill out the form and click the submit button.
  • The config.php it generates, upload it to the includes/ folder
  • Delete the setup/ directory.
  • Write your content on the indivual .php pages under /content/
  • Update the logo.png to your own (max 500px wide) server logo, you can find it in /assets/
  • Also update /content/default-info.php and default-faq.php to info.php and faq.php, as I won't be uploading my own to github.
  • Upload the files, and go test.

logo.png

  • I recommend a max of 500px wide, you can obviously decide to use logo.jpg, but the default is logo.png
  • It makes it 420px (hardcoded in includes/header.php), feel free to change this
  • .gitignore has logo.png so I can keep using my own.
  • included is a default-logo.png under /assets/ just rename it to logo.png or upload your own logo.png

info.php

  • Rename /content/default-info.php to info.php and customize it. (I dont' want to share my live one)

faq.php

  • Rename /content/default-faq.php to faq.php and customize it. (I dont' want to share my live one)

mc_status_cache.php

  • Make sure your webserver can read/write this file in the directory.
  • If you notice caching doesn't work, you could chmod 664 or 755 the file after creating it.
  • And make sure the webserver that serves the files can write and read it, tail -F /var/log/apache/error.log can help, as well as chmod on the cache filename.
  • It will work without this file, but you get a php warning internally each time, and not caching means if you have a busy site your servers gets potentially hammered. Not something you probably will enjoy.

mod_rewrite

  • Talking about configuring your webserver, besides installing php mod for Apache, make sure you install mod_rewrite mod so you can use .htaccess directives to help improve directory protections. There's no need for people to list directories like /includes/ or /content/, etc. And this way you can also handle the 404 not found page.

TODO

  • Move from locally hosted jQuery and Bootstrap to a CDN so we have less files to maintain
  • Move the 600s (10m) cache time to config.php

Version

Version 0.4.0

Screenshots

Screenshot- 2025-01-14 at 23 00 36 More: https://github.com/user-attachments/files/18416664/MCLP-Screenshots.zip

About

Simple Landing Page for a Small Minecraft Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MCLP

Simple Landing Page for a Small Minecraft Server

Introduction

  • This is a simple single landing page written in PHP with some basic html/css/js to help create a simple landing page for your (small) Minecraft server. So you at least have something until you grow and need to expand. It's made to be dynamic and flexible and if you clone this repository your staff can also clone/pr your own instance to edit the content to your liking. Making management pretty easy to be honest.

LAMP

  • This is made for and tested on Ubuntu 20 linux distro, with Apache2 and PHP, at this point MySQL is not needed.

Features

  • Simple Single Landing Page to help you get a quick bit of content up for your (starting and/or small) Minecraft server.
  • It all gets served through the main index.php file
  • Has a logo at the top
  • Easy to find server IP at the top, with an option to click to copy to clipboard.
  • Uses bootstrap for simple page design, making it super easy to customize.
  • Override a lot of the style css in a style.css file to match your personal style-guide (but dark mode by default).
  • Simple top menu that updates the current page without reloading to another page, with an includes/quicknav.php file that's easy to edit. (Don't forget to update index.php to add/remove the loading of that page)
  • EULA compliant footer to keep Mojang happy (we are not pretending to be .. disclaimer + server owner contact email)
  • Content that you want to add or customize is in its own /content/ folder, so you don't have to worry much about accidentally breaking the fancy stuff that makes up the page.
  • Easy to edit header/footer in the /includes/ folder so you can quickly personalize your landing page.
  • Global config.php file with variables that are used side-wide, so you can quickly make changes globally.
  • Global config.php file with shorthand php for those variables, so you can copy paste them wherever you want basically (apply some common sense though).
  • A great starting point for you to build out from. And your contributions can be offered here as a PR (pull request)for my consideration so it becomes merged into this project for all to enjoy.
  • The FAQ page is an accordion design, collapsed by default. making it easier to navigate
  • A status display of the server, is it online or offline? And how many are playing out of max allowed.
  • And a custom 404 page to catch all the fails.
  • Setup/ folder to help generate the config.php file.

Installation

  • Configure your webserver the way you want. https:// is required for the click to clipboard to work. But, who doesn't have https:// these days. You can use Let's Encrypt cert-bot fairly easily these days to set up your virtual host in Apache.
  • But, then clone this repository, browse to yourwebsite.com/setup, fill out the form and click the submit button.
  • The config.php it generates, upload it to the includes/ folder
  • Delete the setup/ directory.
  • Write your content on the indivual .php pages under /content/
  • Update the logo.png to your own (max 500px wide) server logo, you can find it in /assets/
  • Also update /content/default-info.php and default-faq.php to info.php and faq.php, as I won't be uploading my own to github.
  • Upload the files, and go test.

logo.png

  • I recommend a max of 500px wide, you can obviously decide to use logo.jpg, but the default is logo.png
  • It makes it 420px (hardcoded in includes/header.php), feel free to change this
  • .gitignore has logo.png so I can keep using my own.
  • included is a default-logo.png under /assets/ just rename it to logo.png or upload your own logo.png

info.php

  • Rename /content/default-info.php to info.php and customize it. (I dont' want to share my live one)

faq.php

  • Rename /content/default-faq.php to faq.php and customize it. (I dont' want to share my live one)

mc_status_cache.php

  • Make sure your webserver can read/write this file in the directory.
  • If you notice caching doesn't work, you could chmod 664 or 755 the file after creating it.
  • And make sure the webserver that serves the files can write and read it, tail -F /var/log/apache/error.log can help, as well as chmod on the cache filename.
  • It will work without this file, but you get a php warning internally each time, and not caching means if you have a busy site your servers gets potentially hammered. Not something you probably will enjoy.

mod_rewrite

  • Talking about configuring your webserver, besides installing php mod for Apache, make sure you install mod_rewrite mod so you can use .htaccess directives to help improve directory protections. There's no need for people to list directories like /includes/ or /content/, etc. And this way you can also handle the 404 not found page.

TODO

  • Move from locally hosted jQuery and Bootstrap to a CDN so we have less files to maintain
  • Move the 600s (10m) cache time to config.php

Version

Version 0.4.0

Screenshots

Screenshot- 2025-01-14 at 23 00 36 More: https://github.com/user-attachments/files/18416664/MCLP-Screenshots.zip

About

Simple Landing Page for a Small Minecraft Server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages