RULEAPI-671 Remove menu button in github pages and change color theme (#359)

This commit is contained in:
Čaba Šagi 2021-09-17 10:51:48 +02:00 committed by GitHub
parent 8d5790e4cf
commit e5ab334b9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 10 deletions

View File

@ -26,9 +26,15 @@ const useStyles = makeStyles((theme) => ({
marginRight: theme.spacing(1), marginRight: theme.spacing(1),
marginTop: theme.spacing(2), marginTop: theme.spacing(2),
}, },
languageChip: {
marginRight: theme.spacing(1),
marginTop: theme.spacing(2),
backgroundColor: '#4c9bd6'
},
unimplementedMarker: { unimplementedMarker: {
marginRight: theme.spacing(1), marginRight: theme.spacing(1),
marginTop: theme.spacing(2) marginTop: theme.spacing(2),
backgroundColor: '#fd6a00'
} }
})); }));
@ -41,7 +47,7 @@ export function SearchHit(props: SearchHitProps) {
const actualLanguages = props.data.languages.filter(language => language !== 'default'); const actualLanguages = props.data.languages.filter(language => language !== 'default');
const languages = actualLanguages.map(lang => ( const languages = actualLanguages.map(lang => (
<Chip <Chip
classes={{root: classes.language}} classes={{root: classes.languageChip}}
label={lang} label={lang}
color="primary" color="primary"
/> />

View File

@ -4,11 +4,15 @@ export default makeStyles((theme) => ({
root: { root: {
flexGrow: 1, flexGrow: 1,
marginBottom: '13px', // Quickfix. For some reason the topbar overlaps on the content. marginBottom: '13px', // Quickfix. For some reason the topbar overlaps on the content.
backgroundColor: '#c72b28',
}, },
menuButton: { homeButton: {
marginRight: theme.spacing(2), marginRight: theme.spacing(2),
}, },
title: { title: {
flexGrow: 1, flexGrow: 1,
}, },
unimplemented: {
color: '#FFFFFF',
},
})); }));

View File

@ -4,7 +4,7 @@ import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography';
import IconButton from '@material-ui/core/IconButton'; import IconButton from '@material-ui/core/IconButton';
import Button from '@material-ui/core/Button'; import Button from '@material-ui/core/Button';
import MenuIcon from '@material-ui/icons/Menu'; import HomeIcon from '@material-ui/icons/Home';
import useStyles from './TopBar.style'; import useStyles from './TopBar.style';
@ -14,17 +14,15 @@ export default function TopBar() {
return ( return (
<AppBar position="static" className={classes.root}> <AppBar position="static" className={classes.root}>
<Toolbar> <Toolbar>
<IconButton edge="start" className={classes.menuButton} color="inherit" aria-label="menu"> <IconButton edge="start" className={classes.homeButton} color="inherit" aria-label="menu" href="/rspec">
<MenuIcon /> <HomeIcon />
</IconButton> </IconButton>
<Typography variant="h6" className={classes.title}> <Typography variant="h6" className={classes.title}>
SonarSource Rule Specifications SonarSource Rule Specifications
</Typography> </Typography>
<a href="https://github.com/SonarSource/rspec/pulls?q=is%3Aopen+is%3Apr+%22Create+rule%22"> <Button href="https://github.com/SonarSource/rspec/pulls?q=is%3Aopen+is%3Apr+%22Create+rule%22">
<Button> <span className={classes.unimplemented} > Unimplemented rules </span>
<span> Unimplemented rules </span>
</Button> </Button>
</a>
</Toolbar> </Toolbar>
</AppBar> </AppBar>
); );