Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<script src="{{ '/assets/js/download-highlight.js' | relative_url }}"></script>
</head>
<body>
<a href="#main-content" class="skip-link">Skip to content</a>
<div class="content-wrapper">
<div style="display: flex; justify-content: space-between; align-items: center;">
<header style="display: flex; flex-direction: column; align-items: center;">
Expand All @@ -26,17 +27,16 @@
<h1><a href="{{ '/' | relative_url }}">{{ page.title | default: site.title }}</a></h1>
</div>
</header>
<nav>
<nav aria-label="Main Navigation">
<ul style="list-style: none; padding: 0; margin: 0;">
<li style="display: inline; margin-left: 10px;"><a href="{{ '/demo/' | relative_url }}">Demo</a></li>
<li style="display: inline; margin-left: 10px;"><a href="{{ '/#download-mmapper' | relative_url }}">Download</a></li>
<li style="display: inline; margin-left: 10px;"><a href="{{ '/#get-mmapper' | relative_url }}">Get</a></li>
<li style="display: inline; margin-left: 10px;"><a href="{{ '/changelog.html' | relative_url }}">Changelog</a></li>
<li style="display: inline; margin-left: 10px;"><a href="{{ '/about.html' | relative_url }}">About</a></li>
</ul>
</nav>
</div>

<main>
<main id="main-content">
{{ content }}
</main>

Expand Down
16 changes: 16 additions & 0 deletions docs/assets/css/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
/* Minimal MMapper Website Styles */

/* Basic Reset & Body */
.skip-link {
position: absolute;
top: -40px;
left: 0;
background: #cc9933;
color: #1a1a1a;
padding: 8px;
z-index: 100;
transition: top 0.3s;
}

.skip-link:focus,
.skip-link:focus-visible {
top: 0;
}

body {
margin: 0;
padding: 0;
Expand Down
31 changes: 22 additions & 9 deletions docs/assets/js/download-highlight.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
document.addEventListener('DOMContentLoaded', function() {
let detectedArch = null;
let isChromeOS = false;
const downloadLinks = document.querySelectorAll('.download-link');
const downloadLinks = document.querySelectorAll('.download-link, .platform-link');

// --- Architecture Detection (Best Effort) ---
if (navigator.userAgentData && navigator.userAgentData.architecture) {
Expand All @@ -23,17 +23,34 @@ document.addEventListener('DOMContentLoaded', function() {
}

// --- Highlight Download Link ---
function addRecommendation(link) {
link.classList.add('recommended-download');
const recommendation = document.createElement('span');
recommendation.textContent = ' Recommended';
recommendation.classList.add('recommendation-text');

// Place recommendation outside the link as per user preference
if (link.classList.contains('platform-link')) {
recommendation.classList.add('platform-recommendation');
}
link.parentNode.insertBefore(recommendation, link.nextSibling);
}

downloadLinks.forEach(link => {
const href = link.href.toLowerCase();
const platform = link.getAttribute('data-platform');

// Do not recommend Windows .exe installers
if (href.includes('.exe')) {
return;
}

// Only recommend .deb for ChromeOS
if (isChromeOS && (href.includes('appimage') || href.includes('flatpak'))) {
return;
// For ChromeOS, only recommend the Web version
if (isChromeOS) {
if (platform === 'web') {
addRecommendation(link);
}
return; // Don't recommend anything else on ChromeOS
}

let linkArch = null;
Expand All @@ -44,11 +61,7 @@ document.addEventListener('DOMContentLoaded', function() {
}

if (detectedArch && linkArch === detectedArch) {
link.classList.add('recommended-download');
const recommendation = document.createElement('span');
recommendation.textContent = ' Recommended';
recommendation.classList.add('recommendation-text');
link.parentNode.insertBefore(recommendation, link.nextSibling);
addRecommendation(link);
}
});
});
21 changes: 13 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,26 @@ title: Play MUME with MMapper
MMapper is a game client and graphical mapping tool that enhances the MUME (Multi-Users in Middle Earth) experience. It acts as a bridge between the MUME server and your mud client, analyzing real-time game data and visually displaying your character’s position on the map.
</div>

## Download MMapper
## Get MMapper
{: #get-mmapper}

Choose your operating system to download the latest version {{ site.github.latest_release.tag_name }}:
Choose your preferred platform to start using MMapper {{ site.github.latest_release.tag_name }}:

<div class="platform-links">
<a href="{{ '/windows.html' | relative_url }}" class="platform-link">
<i class="fab fa-windows"></i>
<a href="{{ '/demo/' | relative_url }}" class="platform-link" aria-label="Use MMapper in your Web Browser" data-platform="web">
<i class="fas fa-globe" aria-hidden="true"></i>
<span>Web</span>
</a>
<a href="{{ '/windows.html' | relative_url }}" class="platform-link" aria-label="Get MMapper for Windows">
<i class="fab fa-windows" aria-hidden="true"></i>
<span>Windows</span>
</a>
<a href="{{ '/macos.html' | relative_url }}" class="platform-link">
<i class="fab fa-apple"></i>
<a href="{{ '/macos.html' | relative_url }}" class="platform-link" aria-label="Get MMapper for macOS">
<i class="fab fa-apple" aria-hidden="true"></i>
<span>macOS</span>
</a>
<a href="{{ '/linux.html' | relative_url }}" class="platform-link">
<i class="fab fa-linux"></i>
<a href="{{ '/linux.html' | relative_url }}" class="platform-link" aria-label="Get MMapper for Linux">
<i class="fab fa-linux" aria-hidden="true"></i>
<span>Linux</span>
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/linux.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: default
title: Download MMapper for Linux
title: Get MMapper for Linux
---

## Download MMapper for Linux
Choose your preferred distribution method below. We recommend using Flathub for a sandboxed environment and easy updates across most Linux distributions.

<a href='https://flathub.org/apps/org.mume.MMapper'>
<img width='200' alt='Get it on Flathub' src='https://flathub.org/api/badge?locale=en' style="vertical-align: middle;"/>
Expand Down
5 changes: 3 additions & 2 deletions docs/macos.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
layout: default
title: Download MMapper for macOS
title: Get MMapper for macOS
---

## Download MMapper for macOS
To install MMapper on macOS, download the Disk Image (DMG) file provided below. MMapper is compatible with both Intel and Apple Silicon processors.

{% for asset in site.github.latest_release.assets %}
{% if asset.name contains 'sha256' %}
{% elsif asset.name contains 'dmg' %}
Expand Down
9 changes: 5 additions & 4 deletions docs/windows.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
layout: default
title: Download MMapper for Windows
title: Get MMapper for Windows
---

## Download MMapper for Windows
MMapper can be installed from the Microsoft Store for a seamless experience, including automatic updates. Alternatively, you can download the standalone installer below.

<a href="https://apps.microsoft.com/detail/9p6f2b68rf7g?referrer=appbadge&mode=direct">
<a href="https://apps.microsoft.com/detail/9p6f2b68rf7g?referrer=appbadge&mode=direct" style="display: inline-flex; align-items: center; text-decoration: none;">
<img src="https://get.microsoft.com/images/en-us%20dark.svg" width="200" style="vertical-align: middle;"/>
</a><span class="recommendation-text"> Recommended</span>
</a>
<span class="recommendation-text"> Recommended</span>

{% for asset in site.github.latest_release.assets %}
{% if asset.name contains 'sha256' %}
Expand Down
Loading