Skip to content

Commit

Permalink
Add custom title to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sjdawson committed Jan 26, 2021
1 parent f1ccaa9 commit 17765d0
Show file tree
Hide file tree
Showing 15 changed files with 381 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Bug Report
about: Report a bug with the plugin
title: "BUG: "
labels: Bug
assignees: sjdawson
---
### What issue are you having?

### What did you expect to see?

### What actually happened?

### Steps to reproduce?

> If you can record, or have a SimHub replay that repeats the problem, attach it
> or a link to somewhere to download it here.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Feature Request
about: Request a new feature for the plugin
title: "FEATURE: "
labels: Feature
assignees: sjdawson
---
### Describe the feature you'd like:

> If you can record, or have a SimHub replay that would help in the development
> of the feature, please attach it or a link to somewhere to download it here.
Empty file added docs/.nojekyll
Empty file.
28 changes: 28 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# GentlemanDriverPlugin

<!-- <img src="/images/helmet.png" style="float: left; margin-right: 20px;" width="100"> -->

GentlemanDriverPlugin is a general purpose addon for [SimHub] that adds various
properties, events and actions for use in a myriad of different racing games.

Get started by [reading the installation instructions] and then taking a look at
what properties and events are added by the plugin.

> Most of the properties in this plugin are likely to have stemmed from SimHub
> community members. So thanks to those of you suggesting ideas!
If you have a problem with the plugin, [raise a new issue] on the plugin's
GitHub. Alternatively, if you would like to suggest a feature for the plugin,
[fire up a new discussion].

<!-- ## Contributors
These people have contributed to the development of the plugin, either via code
or other means.
[MorGuxx](https://github.com/MorGuux) -->

[SimHub]: https://www.simhubdash.com/
[reading the installation instructions]: /installation
[raise a new issue]: https://github.com/sjdawson/GentlemanDriverPlugin/issues/new?assignees=sjdawson&labels=Bug&template=bug.md&title=BUG%3A+
[fire up a new discussion]: https://github.com/sjdawson/GentlemanDriverPlugin/discussions
1 change: 0 additions & 1 deletion docs/_config.yml

This file was deleted.

23 changes: 23 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

### `v1.0.0` Primary release, additional properties and actions

This bumps the plugin out of pre-release, and launches fully with the following
additional properties and events.

- [Added property Laps.PredictedLapTime](/features/laps#predicted-lap-time)
- [Added property Tyres.ActualTyreCompound](/features/tyre-compound#actual-tyre-compound)
- [Added property Tyres.VisualTyreCompound](/features/tyre-compound#visual-tyre-compound)
- [Added action IncreaseOptimalTyreTemp](/features/tyre-temperature#increase-or-decrease-optimal-tyre-temperature)
- [Added action DecreaseOptimalTyreTemp](/features/tyre-temperature#increase-or-decrease-optimal-tyre-temperature)
- [Added property Tyres.OptimalTyreTemperature](/features/tyre-temperature#optimal-tyre-temperature)
- [Added property Tyres.OptimalTyreTemperatureHex{Wheel}](/features/tyre-temperature#optimal-tyre-temperature-represented-as-a-hex-colour)

---

### `v0.0.1` Initial pre-release

A quick pre-release of the plugin to setup framework and add the following
initial property.

- [Added property Laps.StintTotal](/features/laps#stint-total)
29 changes: 29 additions & 0 deletions docs/features/laps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Laps

## Properties

### Predicted lap time

This property will report on your predicted lap time, by applying your current
delta to the best lap time you have reported for the session.

```ncalc
[GentlemanDriverPlugin.Laps.PredictedLapTime]
```
```js
$prop('GentlemanDriverPlugin.Laps.PredictedLapTime')
```

---

### Stint total

The total number of laps in your current stint (laps since you last left the pit
lane)

```ncalc
[GentlemanDriverPlugin.Laps.StintTotal]
```
```js
$prop('GentlemanDriverPlugin.Laps.StintTotal')
```
40 changes: 40 additions & 0 deletions docs/features/tyre-compound.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Tyre compound

<note type="tip">

Different games will have different mappings of tyre compounds, and may not
be supported initially. [Get in touch if you have a game you'd like supported][1].

</note>

## Properties

### Actual tyre compound

Get the name of the actual tyre compound in use, examples are `C1`, `C5`,
`Intermediate`, `Wet`. Returns `N/A` when the game doesn't have tyre compounds
defined.

```ncalc
[GentlemanDriverPlugin.Tyres.ActualTyreCompound]
```
```js
$prop('GentlemanDriverPlugin.Tyres.ActualTyreCompound')
```

---

### Visual tyre compound

Get the name of the visual tyre compound in use, examples are `Soft`, `Hard`,
`Intermediate`, `Wet`. Returns `N/A` when the game doesn't have tyre compounds
defined.

```ncalc
[GentlemanDriverPlugin.Tyres.VisualTyreCompound]
```
```js
$prop('GentlemanDriverPlugin.Tyres.VisualTyreCompound')
```

[1]: https://github.com/sjdawson/GentlemanDriverPlugin/discussions
117 changes: 117 additions & 0 deletions docs/features/tyre-temperature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Tyre temperature

The tyre temperature section of GentlemanDriverPlugin allows you to manage the
optimal tyre temperatures on a per game and car basis. For games that also supply
some form of tyre compound, the value is also set referncing that particular
compound, so you can manage different sets of tyre temperatures where required.

<note type="tip">

By default, the plugin sets an optimal tyre temperature to a baseline of 80°C.
You'll want to tweak that with the actions available, to ensure it matches your
current setup.

</note>

## Actions

### Increase or decrease optimal tyre temperature

So that you can manage your temperatures on the go, the plugin exposes two
actions. One for increasing and one for decreasing the optimal temerature of
your tyres. Note that when using these actions, it will update the default value
of the plugin, and the default value for the current game. Along with those
values, it will also add or update a setting for the current car.

If the game supports tyre compounds, it will add or update for that car and
compound, instead.

```
IncreaseOptimalTyreTemp
```
```
DecreaseOptimalTyreTemp
```

---

## Properties

### Optimal tyre temperature

Get the current setting for the optimal tyre temperature. This will update based
on game and car, or game, car and tyre compound.

```ncalc
[GentlemanDriverPlugin.Tyres.OptimalTyreTemperature]
```
```js
$prop('GentlemanDriverPlugin.Tyres.OptimalTyreTemperature')
```

---

### Optimal tyre temperature represented as a hex colour

For each corner of the car, this will report the temperature of the wheels as
a hex colour, working through a gradient from a dark blue (very cold), through
green (optimal temperature), up to red (overheating). These can be used in a
colour binding in a dashboard to quickly map temperature to a colour.

<div class="gradient-example">
<span style="background-color: #0000ff"></span>
<span style="background-color: #003dff"></span>
<span style="background-color: #0058ff"></span>
<span style="background-color: #006dff"></span>
<span style="background-color: #007eff"></span>
<span style="background-color: #008eff"></span>
<span style="background-color: #009dff"></span>
<span style="background-color: #00abff"></span>
<span style="background-color: #00b7fb"></span>
<span style="background-color: #56c3f2"></span>
<span style="background-color: #87ceeb"></span>
<span style="background-color: #5dd6f4"></span>
<span style="background-color: #00ddf8"></span>
<span style="background-color: #00e5f5"></span>
<span style="background-color: #00ebec"></span>
<span style="background-color: #00f1db"></span>
<span style="background-color: #00f6c4"></span>
<span style="background-color: #00faa7"></span>
<span style="background-color: #00fd84"></span>
<span style="background-color: #00ff58"></span>
<span style="background-color: #00ff00"></span>
<span style="background-color: #57fc00"></span>
<span style="background-color: #79f800"></span>
<span style="background-color: #93f500"></span>
<span style="background-color: #a9f100"></span>
<span style="background-color: #bbed00"></span>
<span style="background-color: #cce800"></span>
<span style="background-color: #dbe400"></span>
<span style="background-color: #e8e000"></span>
<span style="background-color: #f4db00"></span>
<span style="background-color: #ffd700"></span>
<span style="background-color: #ffc700"></span>
<span style="background-color: #ffb700"></span>
<span style="background-color: #ffa600"></span>
<span style="background-color: #ff9400"></span>
<span style="background-color: #ff8100"></span>
<span style="background-color: #ff6d00"></span>
<span style="background-color: #ff5700"></span>
<span style="background-color: #ff3b00"></span>
<span style="background-color: #ff0000"></span>
</div>

```ncalc
[GentlemanDriverPlugin.Tyres.OptimalTyreTemperatureHexFrontLeft]
[GentlemanDriverPlugin.Tyres.OptimalTyreTemperatureHexFrontRight]
[GentlemanDriverPlugin.Tyres.OptimalTyreTemperatureHexRearLeft]
[GentlemanDriverPlugin.Tyres.OptimalTyreTemperatureHexRearRight]
```
```js
$prop('GentlemanDriverPlugin.Tyres.OptimalTyreTemperatureHexFrontLeft')
$prop('GentlemanDriverPlugin.Tyres.OptimalTyreTemperatureHexFrontRight')
$prop('GentlemanDriverPlugin.Tyres.OptimalTyreTemperatureHexRearLeft')
$prop('GentlemanDriverPlugin.Tyres.OptimalTyreTemperatureHexRearRight')
```

---
Binary file added docs/images/helmet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/hero-unedited.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/hero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>GentlemanDriverPlugin</title>
<link rel="stylesheet" href="https://unpkg.com/docute@4/dist/docute.css">
<link rel="icon" type="image/png" href="/images/helmet.png" />
<style>
/* Import desired font from Google fonts */
@import url('https://fonts.googleapis.com/css?family=Roboto');

/* Apply the font to body (to override the default one) */
body {
font-family: Roboto, sans-serif;
}

.Root header.Header {
background-image: url('/GentlemanDriverPlugin/images/hero.jpg');
background-size: cover;
background-position-y: 50%;
}
.Root header.Header div {
background: transparent;
}

.page-content h2 { margin-top: 3rem !important; }

.gradient-example {
font-size: 0;
}

.gradient-example > span {
display: inline-block;
width: 20px;
height: 20px;
}
</style>
</head>
<body>
<div id="docute"></div>
<script src="https://unpkg.com/docute@4/dist/docute.js"></script>
<script>
new Docute({
target: '#docute',
cssVariables: {
accentColor: '#3273dc',
headerBackground: '#111111',
headerTextColor: '#ffffff',
navLinkColor: '#ffffff',
pageBackground: '#fbfbfb',
textColor: '#111111',
inlineCodeBackground: '#011627',
inlineCodeColor: '#ffffff',
headerHeight: '100px',
},
nav: [
{
title: 'GitHub',
link: 'https://github.com/sjdawson/GentlemanDriverPlugin'
},
],
sidebar: [
{
title: 'GentlemanDriverPlugin',
children: [
{
title: 'Introduction',
link: '/'
},
{
title: 'Installation',
link: '/installation'
},
{
title: 'Changelog',
link: '/changelog'
}
]
},
{
title: 'Features',
children: [
{
title: 'Laps',
link: '/features/laps'
},
{
title: 'Tyre compound',
link: '/features/tyre-compound'
},
{
title: 'Tyre temperature',
link: '/features/tyre-temperature'
},
]
}
]
})
</script>
</body>
</html>
3 changes: 0 additions & 3 deletions docs/index.md

This file was deleted.

14 changes: 14 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Installation

1. [Download the latest version from the GitHub release page][1]
2. Close SimHub
3. Run the installer
4. The installer should do most of the heavy lifting for you, including locating
the correct directory for SimHub. If it hasn't, point the installer at your
SimHub root (where `SimHubWPF.exe` is located).
5. Follow the rest of the installer's instructions
6. When finished, open SimHub
7. You should be prompted to enable the plugin when SimHub launches, choose "yes"
and the plugin will now be up and running

[1]: https://github.com/sjdawson/GentlemanDriverPlugin/releases

0 comments on commit 17765d0

Please sign in to comment.