diff --git a/docs/geyser/setup.mdx b/docs/geyser/setup.mdx index e4349f1..3acdd6f 100644 --- a/docs/geyser/setup.mdx +++ b/docs/geyser/setup.mdx @@ -15,37 +15,43 @@ import ProxyServersSelf from './setup/self/proxy-servers.mdx'; import PaperSpigotSelf from './setup/self/paper-spigot.mdx'; import Standalone from './setup/self/standalone.mdx'; +import PlatformIcon from '../../src/components/PlatformIcon' +import FabricIcon from '@site/static/img/icons/fabric.png'; +import ProxyServersIcon from '@site/static/img/icons/velocity.png'; +import PaperSpigotIcon from '@site/static/img/icons/paper.png'; +import StandaloneIcon from '@site/static/img/icons/geyser.png'; + import { ProviderSelector } from "../../src/components/Provider"; - + - + } default> - + }> - + }> - + } default> - + }> - + }> - + }> - + \ No newline at end of file diff --git a/src/components/PlatformIcon.tsx b/src/components/PlatformIcon.tsx new file mode 100644 index 0000000..3fefdf7 --- /dev/null +++ b/src/components/PlatformIcon.tsx @@ -0,0 +1,18 @@ +import React from 'react'; + +const PlatformIcon = ({ img = null, svg: SvgComponent = null, text="", width = '20px', height = '20px' }) => { + return ( + img != null ? + <> + + {text}  + : + SvgComponent != null ? + <> + + {text}  + : null + ); +}; + +export default PlatformIcon; \ No newline at end of file diff --git a/src/components/Provider.tsx b/src/components/Provider.tsx index 796fb1c..4840d37 100644 --- a/src/components/Provider.tsx +++ b/src/components/Provider.tsx @@ -36,7 +36,7 @@ export const ProviderSelector = () => { ...Object.values(data.built_in), ...Object.values(data.support), ...Object.values(data.no_support) - ].flat(); + ].flat().sort((a, b) => a.name.localeCompare(b.name)); // update providers if description_template is set providers.forEach((provider) => { @@ -55,7 +55,7 @@ export const ProviderSelector = () => { } return ( -
+
- + {selectedProvider ? ( {selectedProvider.description} ) : ( -

Select a provider to see the description

+

Select a provider to see specific installation instructions

)}
diff --git a/src/css/custom.css b/src/css/custom.css index adc7f89..fcfaa39 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -36,6 +36,26 @@ transition: height 0.3s ease-out; } +.host-select select { + flex-direction: column; + margin-bottom: 15px; + width: 99.5%; + height: 50px; + border: 1px solid var(--ifm-tabs-color-active); + border-radius: var(--ifm-global-radius); + border-offset: -1px; + background-color: var(--ifm-background-color); + font-size: 16px; + color: var(--ifm-font-color-base); + padding: 0 10px; + + &:focus { + border-radius: var(--ifm-global-radius); + border: 1px solid var(--ifm-tabs-color-active); + border-offset: -1px; + } +} + .question-header { display: flex; justify-content: space-between; @@ -75,4 +95,20 @@ .question-text { font-size: 18px; +} + +.tabs-host-type .tabs__item { + line-height: 16px; + margin-right: 4px; + width: 100%; + outline: 1px solid var(--ifm-tabs-color-active); + outline-offset: -1px; + justify-content: center; +} + +.tabs-host-type .tabs__item--active { + background-color: var(--ifm-tabs-color-active); + border: 0; + border-radius: var(--ifm-global-radius); + color: #fff } \ No newline at end of file diff --git a/static/img/icons/velocity.png b/static/img/icons/velocity.png new file mode 100644 index 0000000..e4b95d1 Binary files /dev/null and b/static/img/icons/velocity.png differ