ident fixes and config

This commit is contained in:
2025-10-11 15:23:51 +05:30
parent 69081b846a
commit e4f40811b6
3 changed files with 151 additions and 108 deletions

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@@ -2,40 +2,40 @@ import React from 'react';
import {Grid, Paper, Link, Typography} from '@mui/material'; import {Grid, Paper, Link, Typography} from '@mui/material';
interface ServiceList { interface ServiceList {
name: string; name: string;
url: string; url: string;
desc: string; desc: string;
external?: boolean; external?: boolean;
} }
interface ServiceListProps { interface ServiceListProps {
serviceList: ServiceList[]; serviceList: ServiceList[];
} }
const ServiceList: React.FC<ServiceListProps> = ({serviceList}) => { const ServiceList: React.FC<ServiceListProps> = ({serviceList}) => {
return ( return (
<Grid container spacing={3} justifyContent="center"> <Grid container spacing={3} justifyContent="center">
{serviceList.map((s) => ( {serviceList.map((s) => (
<Paper <Paper
elevation={3} elevation={3}
sx={{p: 2, textAlign: "center", bgcolor: "#2d2d2d", borderRadius: 2}} sx={{p: 2, textAlign: "center", bgcolor: "#2d2d2d", borderRadius: 2}}
> >
<Link <Link
href={s.url} href={s.url}
target={s.external ? "_blank" : undefined} target={s.external ? "_blank" : undefined}
rel="noopener" rel="noopener"
underline="none" underline="none"
sx={{fontSize: 18, fontWeight: "bold", color: "success.main"}} sx={{fontSize: 18, fontWeight: "bold", color: "success.main"}}
> >
{s.name} {s.name}
</Link> </Link>
<Typography variant="body2" sx={{mt: 1, color: "#ccc"}}> <Typography variant="body2" sx={{mt: 1, color: "#ccc"}}>
{s.desc} {s.desc}
</Typography> </Typography>
</Paper> </Paper>
))} ))}
</Grid> </Grid>
); );
}; };
export default ServiceList; export default ServiceList;

View File

@@ -5,7 +5,7 @@ import Card from '@mui/material/Card';
import MuiChip from '@mui/material/Chip'; import MuiChip from '@mui/material/Chip';
import Container from '@mui/material/Container'; import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography'; import Typography from '@mui/material/Typography';
import { styled } from '@mui/material/styles'; import {styled} from '@mui/material/styles';
import PermMediaIcon from '@mui/icons-material/PermMedia'; import PermMediaIcon from '@mui/icons-material/PermMedia';
import CodeIcon from '@mui/icons-material/Code'; import CodeIcon from '@mui/icons-material/Code';
@@ -15,33 +15,73 @@ import ServiceList from "~/components/ServiceList";
const items = [ const items = [
{ {
icon: <PermMediaIcon />, icon: <PermMediaIcon/>,
title: 'The Vox Sanctum', title: 'The Vox Sanctum',
serviceList: [ serviceList: [
{ name: "Jellyseerr", url: "http://jellyseerr.aetoskia.com", desc: "Summon films and series from the digital void.", external: true }, {
{ name: "Sonarr", url: "http://sonarr.aetoskia.com", desc: "Keep the endless chronicles of TV under iron control.", external: true }, name: "Jellyseerr",
{ name: "Radarr", url: "http://radarr.aetoskia.com", desc: "Command the legions of cinema, enforce cinematic order.", external: true }, url: "http://jellyseerr.aetoskia.com",
desc: "Summon films and series from the digital void.",
external: true
},
{
name: "Sonarr",
url: "http://sonarr.aetoskia.com",
desc: "Keep the endless chronicles of TV under iron control.",
external: true
},
{
name: "Radarr",
url: "http://radarr.aetoskia.com",
desc: "Command the legions of cinema, enforce cinematic order.",
external: true
},
], ],
description: description:
"Behold the archive of visual legends, where the eternal campaigns of film and series march forth in eternal crusade against chaos and forgetfulness.", "Behold the archive of visual legends, where the eternal campaigns of film and series march forth in eternal crusade against chaos and forgetfulness.",
}, },
{ {
icon: <CodeIcon />, icon: <CodeIcon/>,
title: 'The Forge Conclave', title: 'The Forge Conclave',
serviceList: [ serviceList: [
{ name: "Gitea", url: "http://gitea.aetoskia.com", desc: "Forge and safeguard code like a sacred relic.", external: true }, {
{ name: "Registry", url: "http://registry.aetoskia.com", desc: "Monitor core constructs of the digital empire.", external: true }, name: "Gitea",
{ name: "Drone", url: "http://drone.aetoskia.com", desc: "Automaton architect, building pipelines of perfection.", external: true }, url: "http://gitea.aetoskia.com",
desc: "Forge and safeguard code like a sacred relic.",
external: true
},
{
name: "Registry",
url: "http://registry.aetoskia.com",
desc: "Monitor core constructs of the digital empire.",
external: true
},
{
name: "Drone",
url: "http://drone.aetoskia.com",
desc: "Automaton architect, building pipelines of perfection.",
external: true
},
], ],
description: description:
"The bastion of creation — where code is forged in the fires of discipline, guarded like relics, and deployed with unyielding precision to uphold the empire's might.", "The bastion of creation — where code is forged in the fires of discipline, guarded like relics, and deployed with unyielding precision to uphold the empire's might.",
}, },
{ {
icon: <MonitorHeartIcon />, icon: <MonitorHeartIcon/>,
title: 'The Vigilant Watch', title: 'The Vigilant Watch',
serviceList: [ serviceList: [
{ name: "Portainer", url: "http://portainer.aetoskia.com", desc: "Oversee the fleet of containers with unyielding vigilance.", external: true }, {
{ name: "Traefik", url: "http://traefik.aetoskia.com", desc: "Marshal your gateways and protect the flow between realms.", external: true }, name: "Portainer",
url: "http://portainer.aetoskia.com",
desc: "Oversee the fleet of containers with unyielding vigilance.",
external: true
},
{
name: "Traefik",
url: "http://traefik.aetoskia.com",
desc: "Marshal your gateways and protect the flow between realms.",
external: true
},
], ],
description: description:
"Eyes ever watchful, guarding the realms sanctity — these sentinels oversee the flow of life and command the paths between digital dominions.", "Eyes ever watchful, guarding the realms sanctity — these sentinels oversee the flow of life and command the paths between digital dominions.",
@@ -52,10 +92,10 @@ interface ChipProps {
selected?: boolean; selected?: boolean;
} }
const Chip = styled(MuiChip)<ChipProps>(({ theme }) => ({ const Chip = styled(MuiChip)<ChipProps>(({theme}) => ({
variants: [ variants: [
{ {
props: ({ selected }) => !!selected, props: ({selected}) => !!selected,
style: { style: {
background: background:
'linear-gradient(to bottom right, hsl(210, 98%, 48%), hsl(210, 98%, 35%))', 'linear-gradient(to bottom right, hsl(210, 98%, 48%), hsl(210, 98%, 35%))',
@@ -79,10 +119,10 @@ interface MobileLayoutProps {
} }
export function MobileLayout({ export function MobileLayout({
selectedItemIndex, selectedItemIndex,
handleItemClick, handleItemClick,
selectedFeature, selectedFeature,
}: MobileLayoutProps) { }: MobileLayoutProps) {
if (!items[selectedItemIndex]) { if (!items[selectedItemIndex]) {
return null; return null;
} }
@@ -90,13 +130,13 @@ export function MobileLayout({
return ( return (
<Box <Box
sx={{ sx={{
display: { xs: 'flex', sm: 'none' }, display: {xs: 'flex', sm: 'none'},
flexDirection: 'column', flexDirection: 'column',
gap: 2, gap: 2,
}} }}
> >
<Box sx={{ display: 'flex', gap: 2, overflow: 'auto' }}> <Box sx={{display: 'flex', gap: 2, overflow: 'auto'}}>
{items.map(({ title }, index) => ( {items.map(({title}, index) => (
<Chip <Chip
size="medium" size="medium"
key={index} key={index}
@@ -107,18 +147,18 @@ export function MobileLayout({
))} ))}
</Box> </Box>
<Card variant="outlined"> <Card variant="outlined">
<Box sx={{ px: 2, pb: 2 }}> <Box sx={{px: 2, pb: 2}}>
<Typography <Typography
gutterBottom gutterBottom
sx={{ color: 'text.primary', fontWeight: 'medium' }} sx={{color: 'text.primary', fontWeight: 'medium'}}
> >
{selectedFeature.title} {selectedFeature.title}
</Typography> </Typography>
<Typography variant="body2" sx={{ color: 'text.secondary', mb: 1.5 }}> <Typography variant="body2" sx={{color: 'text.secondary', mb: 1.5}}>
{selectedFeature.description} {selectedFeature.description}
</Typography> </Typography>
</Box> </Box>
<ServiceList serviceList={selectedFeature.serviceList} /> <ServiceList serviceList={selectedFeature.serviceList}/>
</Card> </Card>
</Box> </Box>
); );
@@ -134,84 +174,82 @@ export default function Services() {
const selectedFeature = items[selectedItemIndex]; const selectedFeature = items[selectedItemIndex];
return ( return (
<Container id="features" sx={{ bgcolor: "#1a1a1a", borderRadius: 3, p: 3, boxShadow: 6 }}> <Container id="features" sx={{bgcolor: "#1a1a1a", borderRadius: 3, p: 3, boxShadow: 6}}>
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
flexDirection: { xs: 'column', md: 'row-reverse' }, flexDirection: {xs: 'column', md: 'row-reverse'},
gap: 2, gap: 2,
}} }}
> >
<div> <Box
<Box sx={{
sx={{ display: {xs: 'none', sm: 'flex'},
display: { xs: 'none', sm: 'flex' }, flexDirection: 'column',
flexDirection: 'column', gap: 2,
gap: 2, height: '100%',
height: '100%', }}
}} >
> {items.map(({icon, title, description}, index) => (
{items.map(({ icon, title, description }, index) => ( <Box
key={index}
component={Button}
onClick={() => handleItemClick(index)}
sx={[
(theme) => ({
p: 2,
height: '100%',
width: '100%',
'&:hover': {
backgroundColor: (theme.vars || theme).palette.action.hover,
},
}),
selectedItemIndex === index && {
backgroundColor: 'action.selected',
},
]}
>
<Box <Box
key={index}
component={Button}
onClick={() => handleItemClick(index)}
sx={[ sx={[
(theme) => ({ {
p: 2,
height: '100%',
width: '100%', width: '100%',
'&:hover': { display: 'flex',
backgroundColor: (theme.vars || theme).palette.action.hover, flexDirection: 'column',
}, alignItems: 'left',
}), gap: 1,
textAlign: 'left',
textTransform: 'none',
color: 'text.secondary',
},
selectedItemIndex === index && { selectedItemIndex === index && {
backgroundColor: 'action.selected', color: 'text.primary',
}, },
]} ]}
> >
<Box <Typography variant="h6">{icon} {title}</Typography>
sx={[ <Typography variant="body2">{description}</Typography>
{
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'left',
gap: 1,
textAlign: 'left',
textTransform: 'none',
color: 'text.secondary',
},
selectedItemIndex === index && {
color: 'text.primary',
},
]}
>
<Typography variant="h6">{icon} {title}</Typography>
<Typography variant="body2">{description}</Typography>
</Box>
</Box> </Box>
))} </Box>
</Box> ))}
<MobileLayout </Box>
selectedItemIndex={selectedItemIndex} <MobileLayout
handleItemClick={handleItemClick} selectedItemIndex={selectedItemIndex}
selectedFeature={selectedFeature} handleItemClick={handleItemClick}
/> selectedFeature={selectedFeature}
</div> />
<Box <Box
sx={{ sx={{
display: { xs: 'none', sm: 'flex' }, display: {xs: 'none', sm: 'flex'},
width: { xs: '100%', md: '70%' }, width: {xs: '100%', md: '70%'},
}} }}
> >
<Card <Card
variant="outlined" variant="outlined"
sx={{ sx={{
display: { xs: 'none', sm: 'flex' }, display: {xs: 'none', sm: 'flex'},
}} }}
> >
<ServiceList serviceList={selectedFeature.serviceList} /> <ServiceList serviceList={selectedFeature.serviceList}/>
</Card> </Card>
</Box> </Box>
</Box> </Box>