Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor UI improvements #4

Merged
1 commit merged into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion site/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const config: Config = {
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
Expand Down
11 changes: 10 additions & 1 deletion site/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-background-color: #f1f6f8;

--ifm-color-primary: #3c647c;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
Expand All @@ -15,6 +17,13 @@
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);

--ifm-footer-background-color: #3c647c;
--ifm-footer-title-color: #fff;
--ifm-footer-link-color: #ffffffaa;
--ifm-footer-color: #ffffffaa;

--ifm-footer-link-hover-color: #ffffffdd;
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

.heroBanner {
background: #4391B2;
background: var(--ifm-color-primary);
padding: 4rem 0;
text-align: center;
position: relative;
Expand Down
18 changes: 18 additions & 0 deletions site/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import Heading from '@theme/Heading';
import { useColorMode } from '@docusaurus/theme-common';


import styles from './index.module.css';

import HeaderBorderTop from '@site/static/img/hero-border-top.svg';
import HeaderBorderBottom from '@site/static/img/hero-border-bottom.svg';

import HeaderBorderTopDark from '@site/static/img/hero-border-top.svg';
import HeaderBorderBottomDark from '@site/static/img/hero-border-bottom.svg';

function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
const { isDarkTheme } = useColorMode();

return (
<>
<div style={{width: "100%", display: "flex"}}>
{isDarkTheme ? <HeaderBorderTopDark style={{height: "auto", width: "inherit", marginBottom: "-1px"}} /> : <HeaderBorderTop style={{height: "auto", width: "inherit", marginBottom: "-1px"}}/>}
</div>
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
Expand All @@ -25,6 +39,10 @@ function HomepageHeader() {
</div>
</div>
</header>
<div style={{width: "100%", display: "flex"}}>
{isDarkTheme ? <HeaderBorderBottomDark style={{height: "auto", width: "inherit", marginTop: "-1px"}} /> : <HeaderBorderBottom style={{height: "auto", width: "inherit", marginTop: "-1px"}}/>}
</div>
</>
);
}

Expand Down
22 changes: 22 additions & 0 deletions site/src/theme/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import Footer from '@theme-original/Footer';
import type FooterType from '@theme/Footer';
import type {WrapperProps} from '@docusaurus/types';
import { useColorMode } from '@docusaurus/theme-common';

import Prefooter from '@site/static/img/prefooter.svg';
import PrefooterDark from '@site/static/img/prefooter.svg';

type Props = WrapperProps<typeof FooterType>;

export default function FooterWrapper(props: Props): JSX.Element {
const { isDarkTheme } = useColorMode();
return (
<>
<div style={{width: "100%", display: "flex"}}>
{isDarkTheme ? <PrefooterDark style={{height: "auto", width: "inherit"}} /> : <Prefooter style={{height: "auto", width: "inherit"}}/>}
</div>
<Footer {...props} />
</>
);
}
1 change: 1 addition & 0 deletions site/static/img/hero-border-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/static/img/hero-border-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/static/img/prefooter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.