mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-24 16:24:32 +00:00
163 lines
7.3 KiB
HTML
163 lines
7.3 KiB
HTML
{% extends "../help_page.html" %}
|
|
{% block help_content %}
|
|
|
|
<h2 class="mt-4 mb-4">Embedding Spothole in Another Website</h2>
|
|
<p>You can embed Spothole's web interface in another website, e.g. for use as part of a ham radio custom dashboard.</p>
|
|
<p>URL parameters can be used to trigger an "embedded" mode which hides the headers, footers and settings. In this mode,
|
|
you provide configuration for the various filter and display options via additional URL parameters. Any settings
|
|
that the user has set for Spothole are ignored. This is so that the embedding site can select, for example, their
|
|
choice of dark mode or activity filters, which will not impact how Spothole appears when the user accesses it
|
|
directly. Effectively, it becomes separate to their normal Spothole settings.</p>
|
|
<p>Setting <code>embedded</code> to true is important for the rest of the settings to be applied; otherwise, the user's
|
|
defaults will be used in preference to the URL params.</p>
|
|
<p>These are supplied with the URL to the page you want to embed, for example for an embedded version of the band map in
|
|
dark mode, use <code>https://spothole.app/bands?embedded=true&dark-mode=true</code>. For an embedded version of
|
|
the main spots/home page in the system light/dark mode, use <code>https://spothole.app/?embedded=true</code>. For
|
|
dark mode showing 70cm TOTA spots only, use <code>https://spothole.app/?embedded=true&dark-mode=true&activity=TOTA&band=70cm</code>.
|
|
Providing no URL params causes the page to be loaded in the normal way it would when accessed directly in the user's
|
|
browser.</p>
|
|
<p>The supported parameters are as follows. Generally these match the equivalent parameters in the real Spothole API,
|
|
where a mapping exists.</p>
|
|
<div class="table-responsive">
|
|
<table class="table table-sm table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Allowed Values</th>
|
|
<th>Default</th>
|
|
<th>Example</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>embedded</code></td>
|
|
<td><code>true</code>, <code>false</code></td>
|
|
<td><code>false</code></td>
|
|
<td><code>?embedded=true</code></td>
|
|
<td>Enables embedded mode.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>color_scheme</code></td>
|
|
<td><code>light</code>, <code>dark</code>, <code>auto</code></td>
|
|
<td><code>auto</code></td>
|
|
<td><code>?color_scheme=dark</code></td>
|
|
<td>Forces light or dark mode in preference to the operating system default.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>time_zone</code></td>
|
|
<td><code>UTC</code>, <code>local</code></td>
|
|
<td><code>UTC</code></td>
|
|
<td><code>?time_zone=local</code></td>
|
|
<td>Sets times to be in UTC or local time.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>limit</code></td>
|
|
<td>10, 25, 50, 100</td>
|
|
<td>50</td>
|
|
<td><code>?limit=50</code></td>
|
|
<td>Sets the number of spots that will be displayed on the main spots page</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>limit</code></td>
|
|
<td>25, 50, 100, 200, 500</td>
|
|
<td>100</td>
|
|
<td><code>?limit=100</code></td>
|
|
<td>Sets the number of alerts that will be displayed on the alerts page</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>max_age</code></td>
|
|
<td>300, 600, 1800, 3600</td>
|
|
<td>1800</td>
|
|
<td><code>?max_age=1800</code></td>
|
|
<td>Sets the maximum age of spots displayed on the map and bands pages, in seconds.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>band</code></td>
|
|
<td>Comma-separated list</td>
|
|
<td>(all)</td>
|
|
<td><code>?band=20m,40m</code></td>
|
|
<td>Sets the list of bands that will be shown on the spots, bands and map pages. Available options match the
|
|
labels of the buttons in the standard web interface.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>activity</code></td>
|
|
<td>Comma-separated list</td>
|
|
<td>(all)</td>
|
|
<td><code>?activity=POTA,SOTA,NO_ACTIVITY</code></td>
|
|
<td>Sets the list of activities that will be shown on the spots, bands and map pages. Available options
|
|
match the labels of the buttons in the standard web interface.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>source</code></td>
|
|
<td>Comma-separated list</td>
|
|
<td>(all)</td>
|
|
<td><code>?source=Cluster</code></td>
|
|
<td>Sets the list of sources that will be shown on any spot or alert pages. Available options match the
|
|
labels of the buttons in the standard web interface.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>mode_type</code></td>
|
|
<td>Comma-separated list</td>
|
|
<td>(all)</td>
|
|
<td><code>?mode_type=PHONE,CW</code></td>
|
|
<td>Sets the list of mode types that will be shown on the spots, bands and map pages. Available options
|
|
match the labels of the buttons in the standard web interface.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>dx_continent</code></td>
|
|
<td>Comma-separated list</td>
|
|
<td>(all)</td>
|
|
<td><code>?dx_continent=NA,SA</code></td>
|
|
<td>Sets the list of DX Continents that will be shown on any spot or alert pages. Available options match
|
|
the labels of the buttons in the standard web interface.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>de_continent</code></td>
|
|
<td>Comma-separated list</td>
|
|
<td>(all)</td>
|
|
<td><code>?de_continent=EU</code></td>
|
|
<td>Sets the list of DE Continents that will be shown on the spots, bands and map pages. Available options
|
|
match the labels of the buttons in the standard web interface.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>map-center-lat</code></td>
|
|
<td>Numeric (decimal)</td>
|
|
<td>(auto)</td>
|
|
<td><code>?map-center-lat=51.5</code></td>
|
|
<td>Sets the initial latitude of the map centre on the map page. If omitted, the map auto-fits to the loaded
|
|
spots.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>map-center-lon</code></td>
|
|
<td>Numeric (decimal)</td>
|
|
<td>(auto)</td>
|
|
<td><code>?map-center-lon=-0.1</code></td>
|
|
<td>Sets the initial longitude of the map centre on the map page. If omitted, the map auto-fits to the
|
|
loaded spots.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>map-zoom</code></td>
|
|
<td>Numeric (integer)</td>
|
|
<td>(auto)</td>
|
|
<td><code>?map-zoom=6</code></td>
|
|
<td>Sets the initial zoom level of the map on the map page. If omitted, the map auto-fits to the loaded
|
|
spots.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>See the comment at the end of the <a href="/help/usage/clients">Writing your own Client</a> page regarding
|
|
reliability and uptime of the "main" server.</p>
|
|
|
|
{% end %}
|