Style setup page
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
This commit is contained in:
5 files changed
+72
-12
No files matched your search
+14
-8
@@ -15,35 +15,41 @@ import ProxyServersSelf from './setup/self/proxy-servers.mdx';
|
|||||||
import PaperSpigotSelf from './setup/self/paper-spigot.mdx';
|
import PaperSpigotSelf from './setup/self/paper-spigot.mdx';
|
||||||
import Standalone from './setup/self/standalone.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";
|
import { ProviderSelector } from "../../src/components/Provider";
|
||||||
|
|
||||||
<Tabs>
|
<Tabs className="tabs-host-type">
|
||||||
<TabItem value="host-provider" label="Host Provider" default>
|
<TabItem value="host-provider" label="Host Provider" default>
|
||||||
<ProviderSelector/>
|
<ProviderSelector/>
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem value="paper-spigot" label="Paper / Spigot" default>
|
<TabItem value="paper-spigot" label={<PlatformIcon img={PaperSpigotIcon} text="Paper / Spigot"/>} default>
|
||||||
<PaperSpigot/>
|
<PaperSpigot/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="fabric" label="Fabric">
|
<TabItem value="fabric" label={<PlatformIcon img={FabricIcon} text="Fabric"/>}>
|
||||||
<Fabric/>
|
<Fabric/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="proxy-servers" label="Proxy Servers">
|
<TabItem value="proxy-servers" label={<PlatformIcon img={ProxyServersIcon} text="Proxy Servers"/>}>
|
||||||
<ProxyServers/>
|
<ProxyServers/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="self-host" label="Self Host">
|
<TabItem value="self-host" label="Self Host">
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem value="paper-spigot-self" label="Paper / Spigot" default>
|
<TabItem value="paper-spigot-self" label={<PlatformIcon img={PaperSpigotIcon} text="Paper / Spigot"/>} default>
|
||||||
<PaperSpigotSelf/>
|
<PaperSpigotSelf/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="fabric-self" label="Fabric">
|
<TabItem value="fabric-self" label={<PlatformIcon img={FabricIcon} text="Fabric"/>}>
|
||||||
<FabricSelf/>
|
<FabricSelf/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="proxy-servers-self" label="Proxy Servers">
|
<TabItem value="proxy-servers-self" label={<PlatformIcon img={ProxyServersIcon} text="Proxy Servers"/>}>
|
||||||
<ProxyServersSelf/>
|
<ProxyServersSelf/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="standalone" label="Standalone">
|
<TabItem value="standalone" label={<PlatformIcon img={StandaloneIcon} text="Standalone"/>}>
|
||||||
<Standalone/>
|
<Standalone/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const PlatformIcon = ({ img = null, svg: SvgComponent = null, text="", width = '20px', height = '20px' }) => {
|
||||||
|
return (
|
||||||
|
img != null ?
|
||||||
|
<>
|
||||||
|
<img src={img} style={{ width, height, position: 'relative', top: '3px', right: '3px' }}/>
|
||||||
|
{text}
|
||||||
|
</> :
|
||||||
|
SvgComponent != null ?
|
||||||
|
<>
|
||||||
|
<SvgComponent style={{ width, height, position: 'relative', top: '3px', right: '3px' }}/>
|
||||||
|
{text}
|
||||||
|
</> : null
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PlatformIcon;
|
||||||
@@ -36,7 +36,7 @@ export const ProviderSelector = () => {
|
|||||||
...Object.values(data.built_in),
|
...Object.values(data.built_in),
|
||||||
...Object.values(data.support),
|
...Object.values(data.support),
|
||||||
...Object.values(data.no_support)
|
...Object.values(data.no_support)
|
||||||
].flat();
|
].flat().sort((a, b) => a.name.localeCompare(b.name));
|
||||||
|
|
||||||
// update providers if description_template is set
|
// update providers if description_template is set
|
||||||
providers.forEach((provider) => {
|
providers.forEach((provider) => {
|
||||||
@@ -55,7 +55,7 @@ export const ProviderSelector = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="host-select">
|
||||||
<select onChange={handleSelectionChange}>
|
<select onChange={handleSelectionChange}>
|
||||||
<option value="none">Select a provider</option>
|
<option value="none">Select a provider</option>
|
||||||
{providers.map((provider) => (
|
{providers.map((provider) => (
|
||||||
@@ -64,11 +64,11 @@ export const ProviderSelector = () => {
|
|||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
<Admonition type="info">
|
<Admonition type="tip" title="Provider Instructions">
|
||||||
{selectedProvider ? (
|
{selectedProvider ? (
|
||||||
<ReactMarkdown>{selectedProvider.description}</ReactMarkdown>
|
<ReactMarkdown>{selectedProvider.description}</ReactMarkdown>
|
||||||
) : (
|
) : (
|
||||||
<p>Select a provider to see the description</p>
|
<p>Select a provider to see specific installation instructions</p>
|
||||||
)}
|
)}
|
||||||
</Admonition>
|
</Admonition>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,6 +36,26 @@
|
|||||||
transition: height 0.3s ease-out;
|
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 {
|
.question-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -76,3 +96,19 @@
|
|||||||
.question-text {
|
.question-text {
|
||||||
font-size: 18px;
|
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
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in new issue
Block a user