Skip to content

Commit 115bb6f

Browse files
authored
Merge pull request #280 from YousefED/docs-link-and-styling
Docs menu link & styling
2 parents e142eff + 1d89f84 commit 115bb6f

File tree

5 files changed

+86
-10
lines changed

5 files changed

+86
-10
lines changed

packages/editor/src/app/main/components/Logo.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.logo {
2-
padding: 15px 0;
2+
padding: 11px 0 15px 0;
33
height: 100%;
44
max-width: 100%;
55
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.sub {
2+
font-weight: 600;
3+
margin: 3px 0 0 7px;
4+
font-size: 0.9em;
5+
color: #8a9db3;
6+
-webkit-user-select: none;
7+
-moz-user-select: none;
8+
-ms-user-select: none;
9+
user-select: none;
10+
}
11+
12+
.separator {
13+
height: 70%;
14+
width: 1px;
15+
background-color: #f3f3f3;
16+
margin-left: 2.1em;
17+
margin-right: 0.8em;
18+
}
19+
20+
.link {
21+
align-items: center;
22+
display: inline-flex;
23+
text-decoration: none !important;
24+
color: #2b4869;
25+
position: relative;
26+
padding: 0 1em;
27+
font-weight: 500;
28+
font-size: 0.95em;
29+
}
30+
31+
.link:after {
32+
transition: 150ms ease-in-out all;
33+
content: "";
34+
display: block;
35+
width: 100%;
36+
height: 2px;
37+
position: absolute;
38+
bottom: 0;
39+
background-color: transparent;
40+
left: 0;
41+
}
42+
43+
.link:hover {
44+
color: #2b4869;
45+
}
46+
47+
.link:hover.link:after {
48+
background-color: #2b4869;
49+
}

packages/editor/src/app/main/components/Navigation.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ import { VscSignIn } from "react-icons/vsc";
99
import { getStoreService } from "../../../store/local/stores";
1010
import { ProfilePopup } from "./ProfilePopup";
1111
import { Logo } from "./Logo";
12+
import styles from "./Navigation.module.css";
1213

1314
const ProductHome = () => {
1415
return (
1516
<>
1617
<Logo></Logo>
17-
<span style={{ fontWeight: "bold", marginTop: 3, marginLeft: 10 }}>
18-
{" "}
19-
Alpha community preview
20-
</span>
18+
<span className={styles.sub}> Alpha preview</span>
19+
<div className={styles.separator}></div>
2120
</>
2221
);
2322
};
@@ -31,7 +30,20 @@ export const Navigation = observer(() => {
3130
return (
3231
<AN
3332
renderProductHome={ProductHome}
34-
primaryItems={[]}
33+
primaryItems={[
34+
<a
35+
href="/docs"
36+
className={styles.link}
37+
onClick={(e) => {
38+
e.preventDefault();
39+
navigationStore.navigateToDocs();
40+
}}>
41+
Documentation
42+
</a>,
43+
// <PrimaryButton onClick={navigationStore.navigateToDocs}>
44+
// Documentation
45+
// </PrimaryButton>,
46+
]}
3547
renderProfile={observer(() => (
3648
<>
3749
{sessionStore.isLoggedIn && (

packages/editor/src/app/main/components/startscreen/StartScreen.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@ export const StartScreen = observer(() => {
2424
}
2525
}
2626

27-
function onDocsClick(e: any) {
27+
function onTutorialClick(e: any) {
2828
e.preventDefault();
2929
navigationStore.navigateToTutorial();
3030
}
3131

32+
function onDocsClick(e: any) {
33+
e.preventDefault();
34+
navigationStore.navigateToDocs();
35+
}
36+
3237
return (
3338
<>
3439
<div className="page centered">
@@ -60,7 +65,7 @@ export const StartScreen = observer(() => {
6065
<a
6166
className="button primary"
6267
href="/docs/interactive-introduction.md"
63-
onClick={onDocsClick}>
68+
onClick={onTutorialClick}>
6469
Try interactive tutorial
6570
</a>
6671

@@ -216,7 +221,7 @@ export const StartScreen = observer(() => {
216221
<div>
217222
<a
218223
href="/docs/interactive-introduction.md"
219-
onClick={onDocsClick}
224+
onClick={onTutorialClick}
220225
className="button">
221226
Try interactive tutorial
222227
</a>
@@ -240,10 +245,16 @@ export const StartScreen = observer(() => {
240245
<li>
241246
<a
242247
href="/docs/interactive-introduction.md"
243-
onClick={onDocsClick}>
248+
onClick={onTutorialClick}>
244249
<span>Interactive introduction</span>
245250
</a>
246251
</li>
252+
<li>
253+
<a href="/docs" onClick={onDocsClick}>
254+
<span>Documentation</span>
255+
</a>
256+
</li>
257+
247258
{/* <li>
248259
<a
249260
target="_blank"

packages/editor/src/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ a:focus {
2121
outline: none;
2222
}
2323

24+
a {
25+
color: #2c73c5;
26+
}
27+
2428
/* @import "~react-resizable/css/styles.css"; */
2529
body {
2630
margin: 0;

0 commit comments

Comments
 (0)