Files
GeyserWebsite/_includes/setup/host-provider.html
T
897577f575 Re-write the setup pages (#171)
* Initial setup page

* Cleanup new setup page

* Space out options

* Fix host providers with templates

* Cleanup host provider classes

* Fix spacing to make it all look more uniform

* Always show setup options and add provider infomation inside an alert

* Drop side margin

* Add collapsable sidebar

* Add build_in host on provider selector (#166)

* add buildin host provider support

* concat js loop

* Cleanup indent for cleaner commit

* Move all_providers

---------

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

* start on proper setup instructions

* Add self-hosting info

* Add not listed and fix some other minor issues

* - Floodgate setup/FAQ page
- Add version warnings/info in FAQ
- Merging upstream/master
- Replace old setup page with new one; minus videos

* Show Self-Host vs Hosting Provider pages

* Move to tabs, add icons and structure cleanup

* Less repetition, wording

* Updated Standalone setup instructions

* Show "Not listed" provider option at the top of the hosting provider list

---------

Co-authored-by: JensC <jenscollaertyprive@hotmail.com>
Co-authored-by: Jens Co <63231928+Jens-Co@users.noreply.github.com>
Co-authored-by: onebeastchris <github@onechris.mozmail.com>
2023-07-23 18:08:38 +01:00

32 lines
1.7 KiB
HTML

{% assign all_providers = site.data.providers.support | concat: site.data.providers.built_in | sort: 'name' %}
<div class="mb-4">
<select id="provider-select" class="form-select" onchange="selectProvider()">
<option value="">Select a provider</option>
<option value="Not listed">Not listed</option>
{% for provider in all_providers %}
{% assign urlParts = provider.url | split: "/" %}
<option value="{{ provider.name }}">{{ provider.name }} - {{ urlParts[2] | remove_first: "www." }}</option>
{% endfor %}
</select>
<div id="search-result" class="mt-2"></div>
</div>
<script>
window.provider_data = {
"Not listed": {{ "If your hosting provider is not listed, try enabling the `clone-remote-port` option in the config. Then, restart the server, and try connecting with the same IP and port as on Java Edition. <br> If this does not work, ask your server hosting provider for a UDP port, and use that. For VPS/KVM servers please follow the self-hosting steps." | markdownify | jsonify }},
{% for provider in all_providers %}
"{{ provider.name }}": {{ site.data.providers.description_templates[provider.description_template] | append: " " | append: provider.description | markdownify | strip | jsonify }},
{% endfor %}
}
function selectProvider() {
var provider = document.getElementById("provider-select").value
showSearchResult(provider)
}
function showSearchResult(provider) {
var searchResultContainer = document.querySelector("#search-result")
searchResultContainer.innerHTML = provider in window.provider_data ? '<div class="alert alert-info no-p-margin mb-0" role="alert">' + window.provider_data[provider] + '</div>' : ""
}
</script>