Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bodobraegger committed Sep 1, 2023
1 parent b29d732 commit 7fb79ac
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 70 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function App() {
<LinksContext.Provider value={links}>
<PageLayout>
<PageLayout.Header>
<Header sections={sections} startPageMenuName={'start'}></Header>
<Header />
</PageLayout.Header>
<PageLayout.Content>
<div className="flex-column flex-1 min-width-0">
Expand Down
9 changes: 2 additions & 7 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,17 @@ import {
KebabHorizontalIcon
} from '@primer/octicons-react'

import { SectionT } from './Section'
import LanguagePicker from './LanguagePicker'
import SearchInput from './SearchInput'
import SidebarNav from './SidebarNav'
import styles from './Header.module.scss'
import { withTranslation } from 'react-i18next'

type Props = {
sections: Array<SectionT>
startPageMenuName: String
t?: any
}

const Header = (props: Props) => {

const Header = ({ t }: Props) => {
const [scroll, setScroll] = useState(false)
const [isSidebarOpen, setIsSidebarOpen] = useState(false)
const openSidebar = useCallback(() => setIsSidebarOpen(true), [])
Expand Down Expand Up @@ -138,7 +134,6 @@ const Header = (props: Props) => {
role='banner'
aria-label='Main'
>

<div className={cx('d-flex flex-items-center')}>
<IconButton
className="color-fg-muted border hide-xl mr-3"
Expand Down Expand Up @@ -179,7 +174,7 @@ const Header = (props: Props) => {
>
SidebarNav Header
</Dialog.Header>
<SidebarNav startPageMenuName={props.startPageMenuName} variant="overlay" />
<SidebarNav startPageMenuName={t('startPage.menuName')} variant="overlay" />
</Dialog>


Expand Down
2 changes: 1 addition & 1 deletion src/components/SidebarNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function SidebarNav(props: Props) {
<div
className={cx(
variant === 'overlay' ? 'd-xxl-none' : 'd-none d-lg-block d-xxl-block',
'bg-primary overflow-y-auto flex-shrink-0',

)}
>
</div>
Expand Down
48 changes: 6 additions & 42 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,44 +27,9 @@

html {
font-family: sans-serif;


/* TODO: think about scrollbar design
scrollbar-color: var(--color-primary) var(--color-primary-light);
scrollbar-width: thin;
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-track {
background: var(--color-primary-light);
&:hover {
background: brightness(var(--lightness));
}
}
&::-webkit-scrollbar-thumb {
background: var(--color-primary);
-webkit-border-radius: 5px;
&:hover {
background: brightness(var(--lightness));
}
}
*/
}


body, #root {
margin: 0;
height: 100%; // fixes 100vh on mobile browsers
overflow: hidden;
}

.App {
min-height: 100vh; // fills available space with footer at the bottom
}

img {
max-width: 100%;
}
Expand All @@ -82,6 +47,12 @@ ul, ol {
list-style-position:inside;

}
.icon {
align-self:center; // height: 100%;
// margin: 0em 1.5em 0em -1.5em;
padding-right: 0.5em;
width: 80px;
}


.bg-primary {
Expand All @@ -91,10 +62,3 @@ ul, ol {
.bg-secondary {
background-color: var(--color-primary-light) !important;
}

.icon {
align-self:center; // height: 100%;
// margin: 0em 1.5em 0em -1.5em;
padding-right: 0.5em;
width: 80px;
}
19 changes: 0 additions & 19 deletions src/styles/utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,6 @@
width: 1px;
}

/* Screen Reader Only
------------------------------------------------------------------------------*/
.skip-button {
width: auto;
height: auto;
clip: auto;
overflow: hidden;
z-index: 101;
padding: 16px;

&:not(:focus) {
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
width: 1px;
margin: -1px;
padding: 0px;
}
}

/* Responsive display utilities
------------------------------------------------------------------------------*/
Expand Down

0 comments on commit 7fb79ac

Please sign in to comment.