Skip to content

Commit

Permalink
feat: ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iib0011 committed Feb 25, 2025
1 parent 8917c3c commit d4c5446
Show file tree
Hide file tree
Showing 35 changed files with 190 additions and 68 deletions.
65 changes: 51 additions & 14 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<p align="center"><img src="src/assets/logo.png" width="80"></p>
<h1 align="center">OmniTools</h1>
<p align="center"><img src="src/assets/logo.png" width="150"></p>

[//]: # ([![Docker Pulls]&#40;https://img.shields.io/docker/pulls/iib0011/omni-tools&#41;]&#40;https://hub.docker.com/r/iib0011/omni-tools&#41;)

Expand Down Expand Up @@ -100,7 +99,7 @@ npm run test
npm run test:e2e
```

[//]: # (<img src="https://api.star-history.com/svg?repos=iib0011/omni-tools&type=Date">)
<img src="https://api.star-history.com/svg?repos=iib0011/omni-tools&type=Date">

## 🤝 Looking to contribute?

Expand Down
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@iconify/react": "^5.2.0",
"@testing-library/jest-dom": "^6.4.5",
"@testing-library/react": "^14.3.1",
"@types/color": "^3.0.6",
Expand Down
3 changes: 1 addition & 2 deletions scripts/create-tool.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ createToolFile(
`
import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
// import image from '@assets/text.png';
export const tool = defineTool('${type}', {
name: '${toolNameTitleCase}',
path: '${toolName}',
// image,
icon: '',
description: '',
shortDescription: '',
keywords: ['${toolName.split('-').join("', '")}'],
Expand Down
4 changes: 3 additions & 1 deletion src/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export default function Hero() {
...params.InputProps,
endAdornment: <SearchIcon />,
sx: {
borderRadius: 4
borderRadius: 4,
backgroundColor: 'white'
}
}}
onChange={(event) => handleInputChange(event, event.target.value)}
Expand Down Expand Up @@ -114,6 +115,7 @@ export default function Hero() {
borderRadius: 3,
borderColor: 'grey',
borderStyle: 'solid',
backgroundColor: 'white',
cursor: 'pointer',
'&:hover': { backgroundColor: '#FAFAFD' }
}}
Expand Down
13 changes: 11 additions & 2 deletions src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,18 @@ const Navbar: React.FC = () => {
return (
<AppBar
position="static"
style={{ backgroundColor: 'white', color: 'black' }}
style={{
backgroundColor: 'white',
color: 'black'
}}
>
<Toolbar sx={{ justifyContent: 'space-between', alignItems: 'center' }}>
<Toolbar
sx={{
justifyContent: 'space-between',
alignItems: 'center',
boxShadow: '0px 2px 2px #C8C9CE'
}}
>
<img
onClick={() => navigate('/')}
style={{ cursor: 'pointer' }}
Expand Down
39 changes: 32 additions & 7 deletions src/components/ToolHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,46 @@ import Typography from '@mui/material/Typography';
import ToolBreadcrumb from './ToolBreadcrumb';
import { capitalizeFirstLetter } from '../utils/string';
import Grid from '@mui/material/Grid';
import { Icon, IconifyIcon } from '@iconify/react';
import { categoriesColors } from '../config/uiConfig';

interface ToolHeaderProps {
title: string;
description: string;
image?: string;
icon?: IconifyIcon;
type: string;
}

function ToolLinks() {
return (
<Grid container spacing={2} mt={1}>
<Grid item md={12} lg={4}>
<Button fullWidth variant="outlined" href="#tool">
<Button
sx={{ backgroundColor: 'white' }}
fullWidth
variant="outlined"
href="#tool"
>
Use This Tool
</Button>
</Grid>
<Grid item md={12} lg={4}>
<Button fullWidth variant="outlined" href="#examples">
<Button
sx={{ backgroundColor: 'white' }}
fullWidth
variant="outlined"
href="#examples"
>
See Examples
</Button>
</Grid>
<Grid item md={12} lg={4}>
<Button fullWidth variant="outlined" href="#tour">
<Button
sx={{ backgroundColor: 'white' }}
fullWidth
variant="outlined"
href="#tour"
>
Learn How to Use
</Button>
</Grid>
Expand All @@ -34,7 +51,7 @@ function ToolLinks() {
}

export default function ToolHeader({
image,
icon,
title,
description,
type
Expand All @@ -60,10 +77,18 @@ export default function ToolHeader({
<ToolLinks />
</Grid>

{image && (
{icon && (
<Grid item xs={12} md={4}>
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
<img width={'250'} src={image} />
<Icon
icon={icon}
fontSize={'250'}
color={
categoriesColors[
Math.floor(Math.random() * categoriesColors.length)
]
}
/>
</Box>
</Grid>
)}
Expand Down
8 changes: 5 additions & 3 deletions src/components/ToolLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ import Separator from './Separator';
import AllTools from './allTools/AllTools';
import { getToolsByCategory } from '@tools/index';
import { capitalizeFirstLetter } from '../utils/string';
import { IconifyIcon } from '@iconify/react';

export default function ToolLayout({
children,
title,
description,
image,
icon,
type
}: {
title: string;
description: string;
image?: string;
icon?: IconifyIcon | string;
type: string;
children: ReactNode;
}) {
Expand All @@ -36,6 +37,7 @@ export default function ToolLayout({
display={'flex'}
flexDirection={'column'}
alignItems={'center'}
sx={{ backgroundColor: '#F5F5FA' }}
>
<Helmet>
<title>{`${title} - Omni Tools`}</title>
Expand All @@ -44,7 +46,7 @@ export default function ToolLayout({
<ToolHeader
title={title}
description={description}
image={image}
icon={icon}

Check failure on line 49 in src/components/ToolLayout.tsx

View workflow job for this annotation

GitHub Actions / test-and-build

Type 'string | IconifyIcon | undefined' is not assignable to type 'IconifyIcon | undefined'.
type={type}
/>
{children}
Expand Down
3 changes: 2 additions & 1 deletion src/components/input/ToolFileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export default function ToolFileInput({
height: globalInputHeight,
border: preview ? 0 : 1,
borderRadius: 2,
boxShadow: '5'
boxShadow: '5',
bgcolor: 'white'
}}
>
{preview ? (
Expand Down
9 changes: 8 additions & 1 deletion src/components/input/ToolTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ export default function ToolTextInput({
fullWidth
multiline
rows={10}
inputProps={{ 'data-testid': 'text-input' }}
sx={{
'&.MuiTextField-root': {
backgroundColor: 'white'
}
}}
inputProps={{
'data-testid': 'text-input'
}}
/>
<InputFooter handleCopy={handleCopy} handleImport={handleImportClick} />
<input
Expand Down
3 changes: 2 additions & 1 deletion src/components/result/ToolFileResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export default function ToolFileResult({
height: globalInputHeight,
border: preview ? 0 : 1,
borderRadius: 2,
boxShadow: '5'
boxShadow: '5',
bgcolor: 'white'
}}
>
{preview && (
Expand Down
Loading

0 comments on commit d4c5446

Please sign in to comment.