modified: app.py

modified:   templates/project_detail.html
	modified:   templates/projects.html
	modified:   versions/version.json
This commit is contained in:
SimolZimol
2026-01-07 01:46:24 +01:00
parent 13ea82a5ca
commit 7ecdde83cc
4 changed files with 180 additions and 27 deletions

27
app.py
View File

@@ -24,18 +24,36 @@ def get_project_data(project_key, project_info):
elif 'velocity_compat' in project_info: elif 'velocity_compat' in project_info:
compat = project_info['velocity_compat'].get('stable', '') compat = project_info['velocity_compat'].get('stable', '')
# Determine display type
if project_type in ['minecraft', 'spigot', 'paper', 'bukkit']:
display_type = 'Minecraft Plugin'
elif project_type == 'velocity':
display_type = 'Velocity Plugin'
elif project_type == 'discord':
display_type = 'Discord Bot'
else:
display_type = project_type.title()
# Get project status (global project status, not version status)
project_status = project_info.get('project_status', 'active')
# Get version info (prefer beta if specified, otherwise stable)
stable_version = project_info.get('stable', 'N/A')
beta_version = project_info.get('beta')
# Build project dict # Build project dict
return { return {
'id': project_key, 'id': project_key,
'name': project_info.get('name', project_key.title()), 'name': project_info.get('name', project_key.title()),
'tagline': project_info.get('tagline', ''), 'tagline': project_info.get('tagline', ''),
'type': project_type.title() + ' Plugin' if project_type in ['minecraft', 'velocity'] else 'Discord Bot', 'type': display_type,
'description': project_info.get('description', ''), 'description': project_info.get('description', ''),
'long_description': project_info.get('long_description', ''), 'long_description': project_info.get('long_description', ''),
'icon': project_info.get('icon', 'fas fa-cube'), 'icon': project_info.get('icon', 'fas fa-cube'),
'color': project_type, 'color': project_type,
'status': project_info.get('status', {}).get('stable', 'active').title(), 'status': project_status.title(),
'version': project_info.get('stable', 'N/A'), 'version': stable_version,
'beta_version': beta_version,
'compatibility': compat, 'compatibility': compat,
'server_types': project_info.get('server_types', []), 'server_types': project_info.get('server_types', []),
'technologies': project_info.get('technologies', []), 'technologies': project_info.get('technologies', []),
@@ -44,7 +62,8 @@ def get_project_data(project_key, project_info):
'installation': project_info.get('installation', []), 'installation': project_info.get('installation', []),
'technical_highlights': project_info.get('technical_highlights', []), 'technical_highlights': project_info.get('technical_highlights', []),
'links': project_info.get('links', {}), 'links': project_info.get('links', {}),
'downloads': project_info.get('stats', {}).get('downloads', 'Available'), 'download': project_info.get('download', {}),
'downloads': project_info.get('stats', {}).get('downloads', 0) if project_info.get('stats', {}).get('downloads') else None,
'users': None, 'users': None,
'url': f'/projects/{project_key}' 'url': f'/projects/{project_key}'
} }

View File

@@ -19,16 +19,28 @@
<div class="project-hero-stats"> <div class="project-hero-stats">
{% if project.version %} {% if project.version %}
<div class="hero-stat"> <div class="hero-stat">
<span class="stat-label">Version</span> <span class="stat-label">Stable Version</span>
<span class="stat-value">{{ project.version }}</span> <span class="stat-value">{{ project.version }}</span>
</div> </div>
{% endif %} {% endif %}
{% if project.beta_version %}
<div class="hero-stat">
<span class="stat-label">Beta Version</span>
<span class="stat-value">{{ project.beta_version }}</span>
</div>
{% endif %}
{% if project.status %} {% if project.status %}
<div class="hero-stat"> <div class="hero-stat">
<span class="stat-label">Status</span> <span class="stat-label">Status</span>
<span class="stat-value">{{ project.status }}</span> <span class="stat-value">{{ project.status }}</span>
</div> </div>
{% endif %} {% endif %}
{% if project.downloads %}
<div class="hero-stat">
<span class="stat-label">Downloads</span>
<span class="stat-value">{{ project.downloads }}</span>
</div>
{% endif %}
{% if project.compatibility %} {% if project.compatibility %}
<div class="hero-stat"> <div class="hero-stat">
<span class="stat-label">Compatibility</span> <span class="stat-label">Compatibility</span>
@@ -38,9 +50,19 @@
</div> </div>
<div class="project-hero-actions"> <div class="project-hero-actions">
{% if project.download.stable %}
<a href="{{ project.download.stable }}" target="_blank" class="btn btn-primary">
<i class="fas fa-download"></i> Download Stable
</a>
{% endif %}
{% if project.download.beta %}
<a href="{{ project.download.beta }}" target="_blank" class="btn btn-secondary">
<i class="fas fa-flask"></i> Download Beta
</a>
{% endif %}
{% for link_name, link_url in project.links.items() %} {% for link_name, link_url in project.links.items() %}
{% if link_name in ['modrinth', 'spigot', 'github', 'hangar'] %} {% if link_name in ['modrinth', 'spigot', 'github', 'hangar'] %}
<a href="{{ link_url }}" target="_blank" class="btn btn-primary"> <a href="{{ link_url }}" target="_blank" class="btn btn-outline">
{% if link_name == 'github' %} {% if link_name == 'github' %}
<i class="fab fa-github"></i> GitHub <i class="fab fa-github"></i> GitHub
{% elif link_name == 'modrinth' %} {% elif link_name == 'modrinth' %}

View File

@@ -55,16 +55,16 @@
<span class="stat-value">{{ project.version }}</span> <span class="stat-value">{{ project.version }}</span>
</div> </div>
{% endif %} {% endif %}
{% if project.downloads %} {% if project.status %}
<div class="stat"> <div class="stat">
<span class="stat-label">Status</span> <span class="stat-label">Status</span>
<span class="stat-value">{{ project.downloads }}</span> <span class="stat-value">{{ project.status }}</span>
</div> </div>
{% endif %} {% endif %}
{% if project.users %} {% if project.downloads %}
<div class="stat"> <div class="stat">
<span class="stat-label">Users</span> <span class="stat-label">Downloads</span>
<span class="stat-value">{{ project.users }}</span> <span class="stat-value">{{ project.downloads }}</span>
</div> </div>
{% endif %} {% endif %}
</div> </div>

View File

@@ -3,6 +3,7 @@
"stable": "1.3.4", "stable": "1.3.4",
"beta": "1.4.0-SNAPSHOT-Rev-4", "beta": "1.4.0-SNAPSHOT-Rev-4",
"dev": "1.4.0-SNAPSHOT-Rev-5", "dev": "1.4.0-SNAPSHOT-Rev-5",
"project_status": "stable",
"status": { "status": {
"stable": "stable", "stable": "stable",
"beta": "beta", "beta": "beta",
@@ -25,20 +26,15 @@
"links": { "links": {
"modrinth": "https://modrinth.com/plugin/velocity-friends/version/1.3.4", "modrinth": "https://modrinth.com/plugin/velocity-friends/version/1.3.4",
"hangar": "https://hangar.papermc.io/SimolZimol/Velocity-Friends/versions/1.3.4", "hangar": "https://hangar.papermc.io/SimolZimol/Velocity-Friends/versions/1.3.4",
"spigot": "https://www.spigotmc.org/resources/velocity-friends.123456/", "Ko-fi": "https://ko-fi.com/simolzimol",
"github": "https://github.com/SimolZimol/VelocityFriends", "discord": "https://discord.com/invite/vVrpvBEfeQ"
"website": "https://simolzimol.dev/velocity-friends",
"wiki": "https://github.com/SimolZimol/VelocityFriends/wiki",
"issues": "https://github.com/SimolZimol/VelocityFriends/issues",
"discord": "https://discord.gg/yourdiscord"
}, },
"velocity_compat": { "velocity_compat": {
"stable": "3.3.0, 3.4.0-SNAPSHOT", "stable": "3.3.0, 3.4.0-SNAPSHOT",
"beta": "3.3.0, 3.4.0-SNAPSHOT" "beta": "3.3.0, 3.4.0-SNAPSHOT"
}, },
"mc_compat": { "mc_compat": {
"stable": "1.19, 1.20, 1.21", "stable": "3.3.0, 3.4.0-SNAPSHOT"
"beta": "1.19, 1.20, 1.21"
}, },
"server_types": ["Velocity"], "server_types": ["Velocity"],
"features": [ "features": [
@@ -90,28 +86,82 @@
"stable": "1.0.0", "stable": "1.0.0",
"beta": "1.0.1-beta", "beta": "1.0.1-beta",
"dev": "1.0.1-dev", "dev": "1.0.1-dev",
"project_status": "beta",
"status": { "status": {
"stable": "stable", "stable": "stable",
"beta": "beta", "beta": "beta",
"dev": "unstable" "dev": "unstable"
}, },
"version_id": {
"stable": "1.0.0",
"beta": "1.0.1"
},
"project_type": "velocity",
"name": "JoinMe",
"tagline": "Share your server location with friends",
"description": "Command-based server location sharing for Velocity networks.",
"long_description": "A simple yet powerful plugin for Velocity proxy servers that allows players to share their current server location with friends across the network. Features 8x8 pixel player head rendering, customizable server lists, and automatic version checking.",
"icon": "fas fa-share-alt",
"download": { "download": {
"stable": "https://github.com/SimolZimol/JoinMe/releases/download/v1.0.0/JoinMe-1.0.0.jar", "stable": "https://github.com/SimolZimol/JoinMe/releases/download/v1.0.0/JoinMe-1.0.0.jar",
"beta": "https://github.com/SimolZimol/JoinMe/releases/download/v1.0.1-beta/JoinMe-1.0.1-beta.jar" "beta": "https://github.com/SimolZimol/JoinMe/releases/download/v1.0.1-beta/JoinMe-1.0.1-beta.jar"
}, },
"links": {
"Ko-fi": "https://ko-fi.com/simolzimol",
"discord": "https://discord.com/invite/vVrpvBEfeQ"
},
"velocity_compat": { "velocity_compat": {
"stable": "3.3.0, 3.4.0-SNAPSHOT", "stable": "3.3.0, 3.4.0-SNAPSHOT",
"beta": "3.3.0, 3.4.0-SNAPSHOT" "beta": "3.3.0, 3.4.0-SNAPSHOT"
}, },
"version_id": { "mc_compat": {
"stable": "1.0.0", "stable": "1.19, 1.20, 1.21",
"beta": "1.0.1" "beta": "1.19, 1.20, 1.21"
},
"server_types": ["Velocity"],
"features": [
"Command-based server location sharing",
"8x8 pixel player head rendering in chat",
"Dual server list configuration (command-enabled and notification-enabled)",
"Cooldown system to prevent spam",
"Clickable server names in notifications",
"Automatic version checking via remote API",
"YAML configuration with MiniMessage support",
"Configurable permissions system",
"Hot-reload configuration support"
],
"technologies": ["Java", "Velocity API", "Adventure API", "Gson", "SnakeYAML"],
"commands": [
{"command": "/joinme", "description": "Share your current server location with players on configured servers.", "permission": "joinme.use"},
{"command": "/joinmereload", "description": "Reload the plugin configuration.", "permission": "joinme.reload"},
{"command": "/joinmeversion", "description": "Check the plugin version and available updates.", "permission": "joinme.use"}
],
"installation": [
"Download the plugin jar from GitHub releases.",
"Place the jar in your Velocity plugins folder.",
"Restart the proxy server.",
"Configure server lists in config.yml.",
"Customize messages and settings as needed."
],
"technical_highlights": [
"8x8 pixel player head rendering using Mojang Session Server API",
"Maven resource filtering for version management",
"Dual server list system for granular control",
"MiniMessage integration for rich text formatting",
"Remote version checking with caching"
],
"stats": {
"downloads": 0,
"likes": 0,
"followers": 0
} }
}, },
"fly": { "fly": {
"stable": "2.3.0", "stable": "2.3.0",
"beta": null, "beta": null,
"dev": null, "dev": null,
"project_status": "stable",
"project_type": "minecraft",
"status": { "status": {
"stable": "stable", "stable": "stable",
"beta": "beta", "beta": "beta",
@@ -132,22 +182,84 @@
"stable": "1.2.1", "stable": "1.2.1",
"beta": "1.2.2-SNAPSHOT-Rev-1", "beta": "1.2.2-SNAPSHOT-Rev-1",
"dev": null, "dev": null,
"project_status": "stable",
"status": { "status": {
"stable": "stable", "stable": "stable",
"beta": "beta" "beta": "beta",
"dev": "unstable"
}, },
"version_id": {
"stable": "1.2.1",
"beta": "1.2.2"
},
"project_type": "spigot",
"name": "SimpleTeleport",
"tagline": "Lightweight and powerful teleportation plugin for Spigot servers",
"description": "Comprehensive teleportation system for Spigot with homes, warps, spawn, and back commands.",
"long_description": "SimpleTeleport is a comprehensive and lightweight teleportation plugin for Spigot servers. Set homes, create warps, manage spawn points, and teleport back to previous locations. Features include multi-home support, clickable/hoverable lists, permission system, YAML-based data storage, and automatic version checking with update notifications.",
"icon": "fas fa-location-arrow",
"download": { "download": {
"stable": "https://modrinth.com/plugin/simpleteleports/version/1.2.1", "stable": "https://modrinth.com/plugin/simpleteleports/version/1.2.1",
"beta": "https://modrinth.com/plugin/simpleteleports/version/1.2.2" "beta": "https://modrinth.com/plugin/simpleteleports/version/1.2.2"
},
"links": {
"modrinth": "https://modrinth.com/plugin/simpleteleports/version/1.2.1",
"hangar": "https://hangar.papermc.io/SimolZimol/SimpleTeleport/versions/1.2.1",
"spigot": "https://www.spigotmc.org/resources/simpleteleport.130115/update?update=622743",
"Ko-fi": "https://ko-fi.com/simolzimol",
"discord": "https://discord.com/invite/vVrpvBEfeQ"
}, },
"mc_compat": { "mc_compat": {
"stable": "1.19, 1.20, 1.21", "stable": "1.19, 1.20, 1.21",
"beta": "1.19, 1.20, 1.21" "beta": "1.19, 1.20, 1.21"
}, },
"version_id": { "server_types": ["Spigot", "Paper"],
"stable": "1.2.1", "features": [
"beta": "1.2.2" "Multi-home support with named homes",
"Clickable and hoverable home/warp lists",
"Configurable home limits and worlds",
"Comprehensive permission system",
"Spawn management and teleportation",
"Back command for last location",
"Automatic config/messages updater",
"YAML-based data storage",
"Color code and placeholder support",
"Automatic version checking and update notifications"
],
"technologies": ["Java", "Spigot API", "Gson", "YAML"],
"commands": [
{"command": "/sethome [name]", "description": "Set your personal home location (optionally with a name)", "permission": "SimpleTeleport.sethome"},
{"command": "/home [name]", "description": "Teleport to your home (optionally specify a home name)", "permission": "SimpleTeleport.home"},
{"command": "/homes", "description": "List all your homes (clickable/hoverable list)", "permission": "SimpleTeleport.home"},
{"command": "/homeother <player> [home]", "description": "Teleport to another player's named home", "permission": "SimpleTeleport.home.others"},
{"command": "/delhome [name]", "description": "Delete one of your homes", "permission": "SimpleTeleport.delhome"},
{"command": "/delhomeother <player> [home]", "description": "Delete another player's named home", "permission": "SimpleTeleport.delhome.others"},
{"command": "/warp <name>", "description": "Teleport to a warp point", "permission": "SimpleTeleport.warp"},
{"command": "/setwarp <name>", "description": "Create a new warp point", "permission": "SimpleTeleport.setwarp"},
{"command": "/delwarp <name>", "description": "Delete a warp point", "permission": "SimpleTeleport.delwarp"},
{"command": "/warps", "description": "List all available warps", "permission": "SimpleTeleport.warps"},
{"command": "/spawn", "description": "Teleport to the server spawn", "permission": "SimpleTeleport.spawn"},
{"command": "/spawn set", "description": "Set the server spawn location", "permission": "SimpleTeleport.setspawn"},
{"command": "/back", "description": "Teleport to your last location", "permission": "SimpleTeleport.back"},
{"command": "/stpversion", "description": "Display plugin version information and check for updates", "permission": "SimpleTeleport.version"}
],
"installation": [
"Download the plugin jar from Modrinth.",
"Place the jar in your Spigot/Paper plugins folder.",
"Restart the server.",
"Configure settings in config.yml and messages.yml as needed."
],
"technical_highlights": [
"Single-source-of-truth versioning via Maven filtering/codegen",
"Robust JSON parsing with Gson",
"Clickable and hoverable Adventure API chat components",
"Automatic config/messages updater",
"Full permission and configuration system"
],
"stats": {
"downloads": 0,
"likes": 0,
"followers": 0
} }
} }
} }