Skip to content

Commit

Permalink
Docs improvements
Browse files Browse the repository at this point in the history
Started on Placeholder docs
Fix for Unbreakable flag on 1.8 servers
  • Loading branch information
A5H73Y committed Apr 7, 2021
1 parent 4349585 commit 0126728
Show file tree
Hide file tree
Showing 11 changed files with 296 additions and 111 deletions.
36 changes: 21 additions & 15 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
<!-- docs/_sidebar.md -->

* [Home](/)
* Tutorials
* [The Basics](tutorials/the-basics.md)
* [Creating Course](tutorials/creating-course.md)
* [Configuring Course](tutorials/configuring-course.md)
* [ParkourKits](tutorials/parkour-kits.md)
* [Sign Commands](tutorials/sign-commands.md)
* [Rewarding the Player](tutorials/rewarding-player.md)
* [Challenge Mode](tutorials/challenge-mode.md)
* [ParkourModes](tutorials/parkour-modes.md)
* [Administration](tutorials/administration.md)
* [Plugin Configuration](tutorials/plugin-config.md)
* [Compatible Plugins](tutorials/compatible-plugins.md)
* [Developer Tutorials](developer.md)
* [Changelogs](changelogs.md)
- Getting started

- [Home](index.md)
- [Essential Information](tutorials/essential-info.md)

- Tutorials

- [Fresh Install](tutorials/fresh-install.md)
- [Creating a Course](tutorials/creating-course.md)
- [Configuring a Course](tutorials/configuring-course.md)
- [ParkourKits](tutorials/parkour-kits.md)
- [Sign Commands](tutorials/sign-commands.md)
- [Rewarding the Player](tutorials/rewarding-player.md)
- [Challenge Mode](tutorials/challenge-mode.md)
- [ParkourModes](tutorials/parkour-modes.md)
- [Administration](tutorials/administration.md)
- [Plugin Configuration](tutorials/plugin-config.md)
- [Compatible Plugins](tutorials/compatible-plugins.md)

- [Developer Tutorials](developer.md)
- [Changelogs](changelogs.md)
8 changes: 8 additions & 0 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
font-size: 18px;
}

.markdown-section details p {
margin: 0.5em auto;
}

.sidebar ul li a {
font-size: 16px;
}
Expand All @@ -32,6 +36,10 @@ img {
max-width: 30%;
}

h1.app-name {
display: none;
}

h5 {
margin: 0;
}
Expand Down
110 changes: 110 additions & 0 deletions docs/files/parkourPlaceholders.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
[
{
"heading": "Global Placeholders",
"description": "These are global Parkour values.",
"placeholders": [
{
"placeholder": "%parkour_global_version%",
"output": "6.4",
"description": "The installed version of the Parkour plugin."
},
{
"placeholder": "%parkour_global_course_count%",
"output": "12",
"description": "The number of Courses created."
},
{
"placeholder": "%parkour_global_player_count%",
"output": "3",
"description": "The number of active Parkour players."
}
]
},
{
"heading": "Player Placeholders",
"description": "These are values with context to the provided Player.",
"placeholders": [
{
"placeholder": "%parkour_player_level%",
"output": "30",
"description": "The Player's ParkourLevel."
},
{
"placeholder": "%parkour_player_rank%",
"output": "&6Legend",
"description": "The Player's ParkourRank (will have colour applied)."
},
{
"placeholder": "%parkour_player_parkoins%",
"output": "1234",
"description": "The Player's number of Parkoins."
},
{
"placeholder": "%parkour_player_last_completed%",
"output": "easy1",
"description": "The latest Course the Player completed."
},
{
"placeholder": "%parkour_player_last_joined%",
"output": "easy2",
"description": "The latest Course the Player joined."
},
{
"placeholder": "%parkour_player_course_completed_(course)%",
"output": "Yes",
"description": "Completion status for whether the Player completed the specified Course. Output configurable in strings.yml."
},
{
"placeholder": "%parkour_player_courses_completed%",
"output": "10",
"description": "The number of Courses the Player has completed."
},
{
"placeholder": "%parkour_player_courses_uncompleted%",
"output": "2",
"description": "The number of Courses the Player has yet to be completed."
},
{
"placeholder": "%parkour_player_prize_delay_(course)%",
"output": "1 day, 2 hours",
"description": "The time delay before the Player can receive the specified Course prize again."
},
{
"placeholder": "%parkour_player_personal_best_(course)_time%",
"output": "00:01:23",
"description": "The Player's personal best time on the specified Course."
},
{
"placeholder": "%parkour_player_personal_best_(course)_deaths%",
"output": "3",
"description": "The number of deaths accumulated for the Player's personal best time on the specified Course."
},
{
"placeholder": "%parkour_player_personal_best_(course)_milliseconds%",
"output": "123456",
"description": "The Player's personal best time, in milliseconds, on the specified Course."
},
{
"placeholder": "%parkour_player_personal_best_(course)_milliseconds%",
"output": "123456",
"description": "The Player's personal best time, in milliseconds, on the specified Course."
}
]
},
{
"heading": "Current Course Placeholders",
"description": "These are values with context to the provided Player and their current Course.",
"placeholders": [
{
"placeholder": "%parkour_current_course_name%",
"output": "easy1",
"description": "The name of the Course the Player is currently on."
},
{
"placeholder": "%parkour_current_course_deaths%",
"output": "3",
"description": "The accumulated of the Course the Player is currently on."
}
]
}
]
48 changes: 23 additions & 25 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="The ultimate Parkour plugin tutorials.">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="theme-color" content="#3F51B5">
<meta name="msapplication-TileColor" content="#3F51B5">
<meta property="og:site_name" content="Parkour Tutorials" />
<meta property="og:image" content="https://a5h73y.github.io/Parkour/_media/logo.jpg" />
<meta property="og:url" content="https://a5h73y.github.io/Parkour/" />
<meta property="og:title" content="Parkour Tutorials" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/[email protected]/dist/toc.css">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" type="image/x-icon" href="_media/favicon.ico" />
<meta name="description" content="The ultimate Parkour plugin tutorials."/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"/><meta name="theme-color" content="#3F51B5"/>
<meta name="msapplication-TileColor" content="#3F51B5"/>
<meta property="og:site_name" content="Parkour Tutorials"/>
<meta property="og:image" content="https://a5h73y.github.io/Parkour/_media/logo.jpg"/>
<meta property="og:url" content="https://a5h73y.github.io/Parkour/"/>
<meta property="og:title" content="Parkour Tutorials"/>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css"/>
<link rel="stylesheet" href="css/style.css"/>
<link rel="icon" href="_media/favicon.ico"/>
<title>Parkour Tutorials</title>
</head>
<body>
<div id="app"></div>
<div id="app">Loading ...</div>

<script>
window.$docsify = {
name: 'Parkour Tutorials',
homepage: 'index.md',
auto2top: true,
executeScript: true,
loadSidebar: true,
autoHeader: true,
themeColor: '#3F51B5',

auto2top: true,
// logo: '/_media/logo.png',
maxLevel: 4,
subMaxLevel: 2,
alias: {
'/.*/_sidebar.md': '/_sidebar.md'
},

// search functionality
search: {
noData: 'No results, if something is missing please notify the Discord!',
placeholder: 'Search...'
},

// table of contents
toc: {
headings: 'h1, h2, h3',
},
placeholder: 'Search...',
paths: 'auto'
}
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="//unpkg.com/[email protected]/dist/toc.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>
<script src="js/script.js"></script>
</body>
</html>
13 changes: 9 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Parkour Tutorials - Home
======
# Parkour Tutorials - Home <!-- {docsify-ignore-all} -->

Welcome! This website documents the various features of the Parkour plugin. If you want to learn everything there is to know, then go through the parts step by step. Otherwise, just skip to the part(s) you are interested in.
Use the Search bar in the top left to quickly find anything you're looking for.
Expand All @@ -8,16 +7,22 @@ Use the Search bar in the top left to quickly find anything you're looking for.

## Helpful Parkour Links

- [Spigot Page](https://www.spigotmc.org/resources/parkour.23685/)
- [Spigot Page (Releases)](https://www.spigotmc.org/resources/parkour.23685/)
- [GitHub Builds (Snapshots)](https://github.com/A5H73Y/Parkour/releases)
- [Discord Support Server](https://discord.gg/Gc8RGYr)
- [GitHub](https://github.com/A5H73Y/Parkour/)
- [bStats](https://bstats.org/plugin/bukkit/Parkour)
- [Bukkit Page (Archive)](https://dev.bukkit.org/projects/parkour)

[![discord server](https://img.shields.io/discord/328154925949517824.svg)](https://discord.gg/h9d2fSd)
[![travis-ci](https://travis-ci.org/A5H73Y/Parkour.svg?branch=master)](https://travis-ci.org/A5H73Y/Parkour/branches)
[![license: MIT](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://tldrlegal.com/license/mit-license)
[![releases](https://img.shields.io/github/v/release/A5H73Y/Parkour.svg?label=github%20release)](https://github.com/A5H73Y/Parkour/releases/latest)

## About Parkour

Parkour allows you to create unlimited Courses, each with unlimited checkpoints, while tracking player times and the amount of deaths. Parkour can easily integrate with any server, allowing for a fully customised setup.

Whether you are setting the plugin up as a minigame, or as a dedicated Parkour server, the powerful configuration will allow you to choose exactly how you want the plugin to work. A 'ParkourKit' is a set of customisable Materials which will add a whole new level of fun to each Course.
Whether you are setting the plugin up as a mini-game, or as a dedicated Parkour server, the powerful configuration will allow you to choose exactly how you want the plugin to work. A 'ParkourKit' is a set of customisable Materials which will add a whole new level of fun to each Course.

Parkour uses a database to store all the leaderboards for each Course, allowing for powerful and customisable results. By default, the plugin will create a SQLite database locally in the plugins folder, in a folder named 'sqlite-db', however if you wish to use a MySQL server of your choice, this can be configured in the `config.yml`.
70 changes: 70 additions & 0 deletions docs/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
function insertCommandsMarkup() {
fetch('files/parkourCommands.json')
.then(function (response) {
return response.json();
})
.then(function (data) {
appendData(data, 'parkour-commands', createCommandSummary);
})
.catch(function (err) {
console.log(err);
});
}

function insertPlaceholdersMarkup() {
fetch('files/parkourPlaceholders.json')
.then(function (response) {
return response.json();
})
.then(function (data) {
appendData(data, 'parkour-placeholders', createPlaceholderSummary);
})
.catch(function (err) {
console.log(err);
});
}

function appendData(data, elementId, markupCallback) {
data = data.reverse();
let mainContainer = document.getElementById(elementId);

for (let i = 0; i < data.length; i++) {
mainContainer.insertAdjacentHTML('afterend', markupCallback(data[i]));
}
}

function createCommandSummary(command) {
return `<details>
<summary>${command.command} - ${command.title}</summary>
<div>
<p>Syntax: <code>/pa ${command.command} ${command.arguments || ''}</code></p>
<p>Example: <code>${command.example}</code></p>
<p>Permission: <code>${command.permission || 'None required'}</code></p>
<p>Console Command: <code>${command.consoleSyntax || 'N/A'}</code></p>
<p>Description: ${command.description}</p>
</div>
</details>`;
}

function createPlaceholderSummary(placeholderGroup) {
let placeholderDetails = createPlaceholderDetailsSummary(placeholderGroup);
return `<h5>${placeholderGroup.heading}</h5>${placeholderGroup.description}${placeholderDetails}`;
}

function createPlaceholderDetailsSummary(placeholderGroup) {
let result = '';

for (let i = 0; i < placeholderGroup.placeholders.length; i++) {
let placeholder = placeholderGroup.placeholders[i];
result += `<details>
<summary>${placeholder.placeholder}</summary>
<div>
<p>Placeholder: <code>${placeholder.placeholder}</code></p>
<p>Example output: <code>${placeholder.output}</code></p>
<p>Description: ${placeholder.description}</p>
</div>
</details>`;
}

return result;
}
2 changes: 1 addition & 1 deletion docs/tutorials/challenge-mode.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Challenge Mode
======

## What is a Challenge Mode?
## What is a Challenge?

You are able to challenge other Players to a Course to see who can complete the Course the fastest and prove who is the best. This can become competitive when a monetary wager is introduced (If Economy is enabled), the winner will have the amount added to their account and the loser(s) will have the amount deducted. _Forfeiting (leaving the Course or server) will be treated as a loss, and the wager will be deducted in the event of a Player completing the Course._

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/compatible-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ Leaderheads is a plugin that allows you to create all-time, daily, weekly, and m

When used with Parkour, course leaderboards can be created using placeholder `%parkour_player_personal_best_(course)_milliseconds%`

### Creating a LeaderHeads sign for course 'tutorial' showing the player with the best time for the week
### Creating a LeaderHeads Sign
First place a sign, and then while looking at the sign, type:

`/leaderheads setsign %parkour_player_personal_best_tutorial_milliseconds% 1 weekly`

The sign will update to show the number 1 ranked player on course 'tutorial' for the week with the time displayed as milliseconds.
In this example the sign will update to show the number 1 ranked player on course 'tutorial' for the week with the time displayed as milliseconds.

![LeaderHeads Example 1](https://i.imgur.com/LTJ9Dw3.png "LeaderHeads Example 1")

Expand Down
Loading

0 comments on commit 0126728

Please sign in to comment.