Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit a724199

Browse files
committed
added find out more button
1 parent aff4d17 commit a724199

File tree

8 files changed

+77
-3
lines changed

8 files changed

+77
-3
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React from 'react';
2+
import { FiChevronRight } from 'react-icons/all';
3+
import { useHistory } from 'react-router-dom';
4+
import styles from './styles.module.css';
5+
import clsx from 'clsx';
6+
7+
export type Props = { to: string; className?: string; name: string };
8+
9+
const PlainButton: React.FC<Props> = (props) => {
10+
const { to, className, name } = props;
11+
const history = useHistory();
12+
13+
return (
14+
<button
15+
className={clsx(styles.ButtonContainer, className)}
16+
onClick={() => {
17+
if (to.startsWith('http')) {
18+
window.open(to, '_blank');
19+
return;
20+
}
21+
history.push(to);
22+
}}>
23+
<div>{name}</div>
24+
<FiChevronRight size={16} className={styles.Chevron} />
25+
</button>
26+
);
27+
};
28+
29+
export default PlainButton;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.ButtonContainer {
2+
background: transparent;
3+
border: none;
4+
5+
color: var(--ifm-color-on-background-2);
6+
7+
font-size: var(--ifm-font-size-12);
8+
font-weight: bold;
9+
10+
cursor: pointer;
11+
12+
display: flex;
13+
flex-direction: row;
14+
align-items: center;
15+
justify-content: center;
16+
17+
18+
transition: 0.3s ease all;
19+
}
20+
21+
.ButtonContainer:hover {
22+
color: var(--ifm-color-on-background-3);
23+
}
24+
25+
.Chevron {
26+
margin-left: 2px;
27+
margin-top: 2px;
28+
}

src/components/buttons/PrimaryButton/styles.module.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.ButtonContainer {
22
color: var(--ifm-color-on-primary);
33
background-color: var(--ifm-color-primary);
4+
45
border-radius: 3px;
56
border: none;
67

@@ -9,9 +10,12 @@
910

1011
cursor: pointer;
1112

12-
padding: 15px 30px;
13+
display: flex;
14+
flex-direction: row;
1315
align-items: center;
1416
justify-content: center;
17+
padding: 15px 30px;
18+
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3);
1519

1620
transition: 0.3s ease all;
1721
}

src/components/other/MouseScroller/styles.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
transform: translateX(-50%);
44
position: absolute;
55
bottom: 40px;
6+
z-index: 1;
67
}
78

89
.Mouse {

src/components/other/SectionScroller/styles.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
overflow: hidden;
1212
font-size: var(--ifm-font-size-18);
1313
background-color: var(--ifm-color-surface);
14+
filter: drop-shadow(0px 8px 10px rgba(0, 0, 0, 0.25));
1415
}
1516

1617
.SectionInnerContainer {

src/pages/LandingPage/components/HeaderView/styles.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
margin: 0 auto;
66
max-width: var(--ifm-container-width);
7-
padding: 8rem 0 16rem 0;
7+
padding: 8rem 1rem 16rem 1rem;
88
}
99

1010
.AstronautImage {
@@ -75,7 +75,7 @@
7575

7676
@media (max-width: 768px) {
7777
.Container {
78-
padding: 8rem 1rem;
78+
padding: 8rem 1rem 10rem 1rem;
7979
}
8080

8181
.HeaderTitle {

src/pages/LandingPage/components/StraightforwardView/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import SectionScroller, {
55
SectionInterface,
66
} from '../../../../components/other/SectionScroller';
77
import { FiEdit, FiRepeat, FiServer, FiUsers, FiZap } from 'react-icons/all';
8+
import PlainButton from '../../../../components/buttons/PlainButton';
89

910
const sections: SectionInterface[] = [
1011
{
@@ -102,6 +103,11 @@ const StraightforwardView: React.FC = () => {
102103
<Spacer height={50} />
103104
<Spacer height={10} />
104105
<SectionScroller sections={sections} startIndex={1} />
106+
<PlainButton
107+
to={'docs/introduction'}
108+
name={'Find out more'}
109+
className={styles.FoundOutMoreButton}
110+
/>
105111
</div>
106112
</div>
107113
);

src/pages/LandingPage/components/StraightforwardView/styles.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@
4040
font-size: var(--ifm-font-size-16);
4141
color: var(--ifm-color-on-background-3);
4242
}
43+
44+
.FoundOutMoreButton {
45+
align-self: flex-start;
46+
margin: 20px 10px 10px 50px;
47+
}

0 commit comments

Comments
 (0)