Skip to content

Commit 043a264

Browse files
authored
Fix styles (#328)
* move and fix some styles * fix assets
1 parent 781fd57 commit 043a264

File tree

11 files changed

+161
-154
lines changed

11 files changed

+161
-154
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { observer } from "mobx-react-lite";
22
import { Link, To } from "react-router-dom";
3+
import buttonStyles from "../../../styles/buttons.module.css";
34
import { toProfilePage } from "../../routes/routes";
45
import styles from "./NotebookOverviewItem.module.css";
56

@@ -38,7 +39,9 @@ export const NotebookOverviewItem = observer(
3839
<span className={styles.username}>{props.author.username}</span>
3940
</Link>
4041

41-
<Link className="button button-small inverted" to={props.to}>
42+
<Link
43+
className={`${buttonStyles.button} ${buttonStyles.buttonSmall} ${buttonStyles.inverted}`}
44+
to={props.to}>
4245
View
4346
</Link>
4447
</div>

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { observer } from "mobx-react-lite";
22
import { Link, useNavigate } from "react-router-dom";
33
import { getStoreService } from "../../../../store/local/stores";
4+
import buttonStyles from "../../../../styles/buttons.module.css";
45
import {
56
OpenNewPageDialog,
67
toDocs,
@@ -52,12 +53,14 @@ export const StartScreen = observer(() => {
5253
</p>
5354
</div>
5455
<div className={styles.buttons}>
55-
<Link className="button primary" to={toTutorial()}>
56+
<Link
57+
className={`${buttonStyles.button} ${buttonStyles.primary}`}
58+
to={toTutorial()}>
5659
Try interactive tutorial
5760
</Link>
5861

5962
<a
60-
className="button secondary"
63+
className={`${buttonStyles.button} ${buttonStyles.secondary}`}
6164
href="/"
6265
onClick={onNewNotebookClick}>
6366
Create new notebook
@@ -207,11 +210,11 @@ export const StartScreen = observer(() => {
207210
</p>
208211

209212
<div className={styles.buttons}>
210-
<Link to={toTutorial()} className="button">
213+
<Link to={toTutorial()} className={`${buttonStyles.button}`}>
211214
Try interactive tutorial
212215
</Link>
213216
<a
214-
className="button secondary"
217+
className={`${buttonStyles.button} ${buttonStyles.secondary}`}
215218
onClick={onNewNotebookClick}
216219
href="/">
217220
Create new notebook

packages/editor/src/fonts-inter.css

Lines changed: 0 additions & 94 deletions
This file was deleted.

packages/editor/src/index.host.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { createRoot } from "react-dom/client";
1010
import App from "./app/App";
1111
import { MATRIX_CONFIG } from "./config/config";
1212
import { validateHostDomain } from "./config/security";
13-
import "./index.css";
1413
import { setMonacoDefaults } from "./runtime/editor";
1514
import setupNpmTypeResolver from "./runtime/editor/languages/typescript/npmTypeResolver";
1615
import setupTypecellTypeResolver from "./runtime/editor/languages/typescript/typecellTypeResolver";
1716
import { MonacoContext } from "./runtime/editor/MonacoContext";
1817
import { initializeStoreService } from "./store/local/stores";
18+
import "./styles/index.css";
1919

2020
// polyfills (mostly required for matrix-crdt)
2121
(window as any).Buffer = Buffer;

packages/editor/src/index.iframe.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
getMainDomainFromIframe,
77
validateFrameDomain,
88
} from "./config/security";
9-
import "./iframe.css";
109
import Frame from "./runtime/executor/executionHosts/sandboxed/iframesandbox/Frame";
10+
import "./styles/iframe.css";
1111

1212
if (import.meta.env.DEV) {
1313
// disables error overlays
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.button {
2+
border-radius: 10px;
3+
padding: 20px 30px;
4+
background-color: #1e2328;
5+
color: white;
6+
font-weight: 600;
7+
font-size: 18px;
8+
9+
/* transition: 150ms all ease-in-out; */
10+
box-shadow: rgb(0 0 0 / 18%) 0px 0.60323px 0.60323px -1.25px,
11+
rgb(0 0 0 / 16%) 0px 2.29021px 2.29021px -2.5px,
12+
rgb(0 0 0 / 6%) 0px 10px 10px -3.75px;
13+
}
14+
15+
.buttonSmall {
16+
border-radius: 6px;
17+
padding: 10px 14px;
18+
font-size: 14px;
19+
}
20+
21+
.button:hover {
22+
color: white;
23+
background-color: #3e454b;
24+
text-decoration: none;
25+
}
26+
27+
.button.primary {
28+
background-color: #1fb597;
29+
}
30+
31+
.button.primary:hover {
32+
background-color: #13cca7;
33+
}
34+
35+
.button.secondary {
36+
background-color: #467ea1;
37+
}
38+
39+
.button.secondary:hover {
40+
background-color: rgb(77, 154, 202);
41+
}
42+
43+
.button.inverted {
44+
color: #676767;
45+
background-color: transparent;
46+
border: 1px solid #676767;
47+
}
48+
49+
.button.inverted:hover {
50+
background-color: #f3f3f3;
51+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/* Generated using https://google-webfonts-helper.herokuapp.com/fonts/inter?subsets=latin */
2+
3+
/* inter-100 - latin */
4+
@font-face {
5+
font-family: "Inter";
6+
font-style: normal;
7+
font-weight: 100;
8+
src: local(""),
9+
url("../assets/inter-v12-latin/inter-v12-latin-100.woff2") format("woff2"),
10+
/* Chrome 26+, Opera 23+, Firefox 39+ */
11+
url("../assets/inter-v12-latin/inter-v12-latin-100.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
12+
}
13+
/* inter-200 - latin */
14+
@font-face {
15+
font-family: "Inter";
16+
font-style: normal;
17+
font-weight: 200;
18+
src: local(""),
19+
url("../assets/inter-v12-latin/inter-v12-latin-200.woff2") format("woff2"),
20+
/* Chrome 26+, Opera 23+, Firefox 39+ */
21+
url("../assets/inter-v12-latin/inter-v12-latin-200.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
22+
}
23+
/* inter-300 - latin */
24+
@font-face {
25+
font-family: "Inter";
26+
font-style: normal;
27+
font-weight: 300;
28+
src: local(""),
29+
url("../assets/inter-v12-latin/inter-v12-latin-300.woff2") format("woff2"),
30+
/* Chrome 26+, Opera 23+, Firefox 39+ */
31+
url("../assets/inter-v12-latin/inter-v12-latin-300.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
32+
}
33+
/* inter-regular - latin */
34+
@font-face {
35+
font-family: "Inter";
36+
font-style: normal;
37+
font-weight: 400;
38+
src: local(""),
39+
url("../assets/inter-v12-latin/inter-v12-latin-regular.woff2")
40+
format("woff2"),
41+
/* Chrome 26+, Opera 23+, Firefox 39+ */
42+
url("../assets/inter-v12-latin/inter-v12-latin-regular.woff")
43+
format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
44+
}
45+
/* inter-500 - latin */
46+
@font-face {
47+
font-family: "Inter";
48+
font-style: normal;
49+
font-weight: 500;
50+
src: local(""),
51+
url("../assets/inter-v12-latin/inter-v12-latin-500.woff2") format("woff2"),
52+
/* Chrome 26+, Opera 23+, Firefox 39+ */
53+
url("../assets/inter-v12-latin/inter-v12-latin-500.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
54+
}
55+
/* inter-600 - latin */
56+
@font-face {
57+
font-family: "Inter";
58+
font-style: normal;
59+
font-weight: 600;
60+
src: local(""),
61+
url("../assets/inter-v12-latin/inter-v12-latin-600.woff2") format("woff2"),
62+
/* Chrome 26+, Opera 23+, Firefox 39+ */
63+
url("../assets/inter-v12-latin/inter-v12-latin-600.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
64+
}
65+
/* inter-700 - latin */
66+
@font-face {
67+
font-family: "Inter";
68+
font-style: normal;
69+
font-weight: 700;
70+
src: local(""),
71+
url("../assets/inter-v12-latin/inter-v12-latin-700.woff2") format("woff2"),
72+
/* Chrome 26+, Opera 23+, Firefox 39+ */
73+
url("../assets/inter-v12-latin/inter-v12-latin-700.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
74+
}
75+
/* inter-800 - latin */
76+
@font-face {
77+
font-family: "Inter";
78+
font-style: normal;
79+
font-weight: 800;
80+
src: local(""),
81+
url("../assets/inter-v12-latin/inter-v12-latin-800.woff2") format("woff2"),
82+
/* Chrome 26+, Opera 23+, Firefox 39+ */
83+
url("../assets/inter-v12-latin/inter-v12-latin-800.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
84+
}
85+
/* inter-900 - latin */
86+
@font-face {
87+
font-family: "Inter";
88+
font-style: normal;
89+
font-weight: 900;
90+
src: local(""),
91+
url("../assets/inter-v12-latin/inter-v12-latin-900.woff2") format("woff2"),
92+
/* Chrome 26+, Opera 23+, Firefox 39+ */
93+
url("../assets/inter-v12-latin/inter-v12-latin-900.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
94+
}

packages/editor/src/iframe.css renamed to packages/editor/src/styles/iframe.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* @import-normalize; */
2-
@import "../../../node_modules/@atlaskit/css-reset/dist/bundle.css";
2+
@import "../../../../node_modules/@atlaskit/css-reset/dist/bundle.css";
33
@import "github-markdown.css";
44
@import url("fonts-inter.css");
55

0 commit comments

Comments
 (0)