-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
peppermint-config-info.php
145 lines (128 loc) · 4.77 KB
/
peppermint-config-info.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html>
<head>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
<meta charset='utf-8' />
<title>peppermint.json configuration guide - Pepperminty Wiki</title>
</head>
<body>
<h1><img src="https://starbeamrainbowlabs.com/images/logos/peppermint.png" class="logo" /> <code>peppermint.json</code> Configuration Guide</h1>
<p>This page contains a comprehensive guide to all the settings present in <code>peppermint.json</code>. If anything's missing or unclear, please <a href="https://github.com/sbrl/Pepperminty-Wiki/issues/new">open an issue</a>!</p>
<p><strong>Current Pepperminty Wiki Version: <?php echo(trim(file_get_contents("version"))); ?></strong></p>
<p><small><em>Note that settings added after the last stable release may not be shown on <a href='https://starbeamrainbowlabs.com/labs/peppermint/peppermint-config-info.php'>the version on starbeamrainbowlabs.com</a> until the next release.</em></small></p>
<h2>Type Legend</h2>
<table>
<tr>
<th>Type</th>
<th>Meaning</th>
</tr>
<tr>
<td><code>text</code></td>
<td>A string of text, which may or may or may not allow HTML. Consult individual descriptions for more specific information.</td>
</tr>
<tr>
<td><code>textarea</code></td>
<td>A longer string of text that may or may not allow HTML.</td>
</tr>
<tr>
<td><code>array</code></td>
<td>An array of strings.</td>
</tr>
<tr>
<td><code>url</code></td>
<td>A url to a remote resource.</td>
</tr>
<tr>
<td><code>checkbox</code></td>
<td>A boolean value - i.e. either <code>true</code> or <code>false</code>.</td>
</tr>
<tr>
<td><code>email</code></td>
<td>An email address.</td>
</tr>
<tr>
<td><code>number</code></td>
<td>A numerical value that may or may not be floating-point.</td>
</tr>
<tr>
<td><code>usertable</code></td>
<td>An object that contains the users' usernames and passwords.</td>
</tr>
<tr>
<td><code>nav</code></td>
<td>A complex array of items that should appear as a navigation bar. Consult the description for <a href='#config_nav_links'><code>nav_links</code></a> for more information.</td>
</tr>
<tr>
<td><code>map</code></td>
<td>An object that maps a set of values onto another set of values.</td>
</tr>
</table>
<hr />
<h2>Configuration Guide</h2>
<p>We have <?php echo(count(array_keys(json_decode(file_get_contents("peppermint.guiconfig.json"), true)))); ?> configurable settings so far!</p>
<table class="main">
<colgroup>
<col span="1" style="width: 5%;" />
<col span="1" style="width: 20%;" />
<col span="1" style="width: 7%;" />
<col span="1" style="width: 41%;" />
<col span="1" style="width: 27%;" />
</colgroup>
<thead>
<tr>
<th>🔗</th>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default Value</th>
</tr>
</thead>
<tbody>
<?php
$config = json_decode(file_get_contents("peppermint.guiconfig.json"));
foreach($config as $config_key => $config_info) {
echo("<tr id='config_$config_key'>");
echo("<td class='centre'><a href='#config_".rawurlencode($config_key)."'>🔗</a></td>");
echo("<td><code>".htmlentities($config_key)."</code></td>");
echo("<td><code>".htmlentities($config_info->type)."</code></td>");
echo("<td>$config_info->description</td>");
echo("<td><pre><code>" . json_encode($config_info->default, true) . "</code></pre></td>");
echo("</tr>\n");
}
?>
</tbody>
</table>
<!---------------->
<link rel="stylesheet" href="//starbeamrainbowlabs.com/theme/basic.css" />
<style>
:root {
--bg-main: #eee8f2;
--bg-table-row: rgba(68, 39, 113, 0.25);
--text-main: #442772;
--text-link: #9e7eb4;
}
@media (prefers-color-scheme: dark) {
:root {
--bg-main: hsl(270, 29%, 28%);
--bg-table-row: hsla(268, 72%, 42%, 0.3);
--text-main: hsl(277, 38%, 89%);
}
}
body { padding: 1rem; color: var(--text-main); background-color: var(--bg-main); } /* syntaxtic gets confused sometimes */
h1 { text-align: center; }
h2 { margin-top: 2em; }
hr { margin: 3em 0; }
table { border-collapse: collapse; }
table.main { width: 100%; table-layout: fixed; }
tr:nth-child(even), thead
{ background: var(--bg-table-row); }
pre, code { white-space: pre-wrap; word-wrap: break-word; font-size: 1.2em; }
a { color: var(--text-link); }
.largebutton { font-size: 2rem; }
.logo { max-width: 1.25em; vertical-align: middle; }
.centre { text-align: center; }
</style>
</body>
</html>