aboutsummaryrefslogtreecommitdiffstats
path: root/language-web
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-07-02 17:20:21 +0200
committerLibravatar Kristóf Marussy <marussy@mit.bme.hu>2021-07-02 17:20:21 +0200
commit76713b81f6a6fa575a33600d3216541efa3a09ac (patch)
tree5d5c8c93c99382e9c5b1435bd247638c0c8c6be9 /language-web
parentAdd italic font (diff)
downloadrefinery-76713b81f6a6fa575a33600d3216541efa3a09ac.tar.gz
refinery-76713b81f6a6fa575a33600d3216541efa3a09ac.tar.zst
refinery-76713b81f6a6fa575a33600d3216541efa3a09ac.zip
JetBrains Mono font
Diffstat (limited to 'language-web')
-rw-r--r--language-web/package-lock.json14
-rw-r--r--language-web/package.json2
-rw-r--r--language-web/src/main/css/index.scss22
-rw-r--r--language-web/src/main/js/editor/EditorButtons.jsx5
4 files changed, 25 insertions, 18 deletions
diff --git a/language-web/package-lock.json b/language-web/package-lock.json
index 335d3d74..906035ba 100644
--- a/language-web/package-lock.json
+++ b/language-web/package-lock.json
@@ -8,7 +8,7 @@
8 "version": "1.0.0", 8 "version": "1.0.0",
9 "license": "EPL-2.0", 9 "license": "EPL-2.0",
10 "dependencies": { 10 "dependencies": {
11 "@fontsource/fira-code": "^4.4.5", 11 "@fontsource/jetbrains-mono": "^4.4.5",
12 "@fontsource/roboto": "^4.4.5", 12 "@fontsource/roboto": "^4.4.5",
13 "@material-ui/core": "^4.11.4", 13 "@material-ui/core": "^4.11.4",
14 "@material-ui/icons": "^4.11.2", 14 "@material-ui/icons": "^4.11.2",
@@ -1678,10 +1678,10 @@
1678 "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", 1678 "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz",
1679 "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" 1679 "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow=="
1680 }, 1680 },
1681 "node_modules/@fontsource/fira-code": { 1681 "node_modules/@fontsource/jetbrains-mono": {
1682 "version": "4.4.5", 1682 "version": "4.4.5",
1683 "resolved": "https://registry.npmjs.org/@fontsource/fira-code/-/fira-code-4.4.5.tgz", 1683 "resolved": "https://registry.npmjs.org/@fontsource/jetbrains-mono/-/jetbrains-mono-4.4.5.tgz",
1684 "integrity": "sha512-ap1UKABzbPrUTgIB376n8CSJ7mbJYxGm52A60BHnGHjU2cSDBqNUAColdERgFWgLHfybWXQT13ZrNhAdynf9rg==" 1684 "integrity": "sha512-/xBExp46j7LF0v3mVSy46gEL4NICOyTW8zLKEJegMd5pRBprTwcPY1xpDnAbsljiq9gMSvUyoV4aJ+D61wjjCw=="
1685 }, 1685 },
1686 "node_modules/@fontsource/roboto": { 1686 "node_modules/@fontsource/roboto": {
1687 "version": "4.4.5", 1687 "version": "4.4.5",
@@ -14339,10 +14339,10 @@
14339 "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", 14339 "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz",
14340 "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" 14340 "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow=="
14341 }, 14341 },
14342 "@fontsource/fira-code": { 14342 "@fontsource/jetbrains-mono": {
14343 "version": "4.4.5", 14343 "version": "4.4.5",
14344 "resolved": "https://registry.npmjs.org/@fontsource/fira-code/-/fira-code-4.4.5.tgz", 14344 "resolved": "https://registry.npmjs.org/@fontsource/jetbrains-mono/-/jetbrains-mono-4.4.5.tgz",
14345 "integrity": "sha512-ap1UKABzbPrUTgIB376n8CSJ7mbJYxGm52A60BHnGHjU2cSDBqNUAColdERgFWgLHfybWXQT13ZrNhAdynf9rg==" 14345 "integrity": "sha512-/xBExp46j7LF0v3mVSy46gEL4NICOyTW8zLKEJegMd5pRBprTwcPY1xpDnAbsljiq9gMSvUyoV4aJ+D61wjjCw=="
14346 }, 14346 },
14347 "@fontsource/roboto": { 14347 "@fontsource/roboto": {
14348 "version": "4.4.5", 14348 "version": "4.4.5",
diff --git a/language-web/package.json b/language-web/package.json
index 9804a841..6c06bdb2 100644
--- a/language-web/package.json
+++ b/language-web/package.json
@@ -39,7 +39,7 @@
39 "webpack-subresource-integrity": "^5.0.0-alpha.5" 39 "webpack-subresource-integrity": "^5.0.0-alpha.5"
40 }, 40 },
41 "dependencies": { 41 "dependencies": {
42 "@fontsource/fira-code": "^4.4.5", 42 "@fontsource/jetbrains-mono": "^4.4.5",
43 "@fontsource/roboto": "^4.4.5", 43 "@fontsource/roboto": "^4.4.5",
44 "@material-ui/core": "^4.11.4", 44 "@material-ui/core": "^4.11.4",
45 "@material-ui/icons": "^4.11.2", 45 "@material-ui/icons": "^4.11.2",
diff --git a/language-web/src/main/css/index.scss b/language-web/src/main/css/index.scss
index 5b03d1fc..319dff8d 100644
--- a/language-web/src/main/css/index.scss
+++ b/language-web/src/main/css/index.scss
@@ -1,5 +1,5 @@
1@use '@fontsource/roboto/scss/mixins' as Roboto; 1@use '@fontsource/roboto/scss/mixins' as Roboto;
2@use '@fontsource/fira-code/scss/mixins' as FiraCode; 2@use '@fontsource/jetbrains-mono/scss/mixins' as JetbrainsMono;
3 3
4@import 'codemirror/lib/codemirror'; 4@import 'codemirror/lib/codemirror';
5@import 'codemirror/addon/hint/show-hint'; 5@import 'codemirror/addon/hint/show-hint';
@@ -11,20 +11,22 @@ $robotoWeights: 300, 400, 500, 700;
11 @include Roboto.fontFace($fontName: 'Roboto', $weight: $weight, $style: italic); 11 @include Roboto.fontFace($fontName: 'Roboto', $weight: $weight, $style: italic);
12} 12}
13 13
14$firaCodeWeights: 400, 600; 14$jetbrainsMonoWeights: 400, 700;
15@each $weight in $firaCodeWeights { 15@each $weight in $jetbrainsMonoWeights {
16 @include FiraCode.fontFace($fontName: 'Fira Code', $weight: $weight); 16 @include JetbrainsMono.fontFace($fontName: 'JetBrains Mono', $weight: $weight);
17 @include JetbrainsMono.fontFace($fontName: 'JetBrains Mono', $weight: $weight, $style: italic);
17} 18}
18@include FiraCode.fontFaceVariable($fontName: 'Fira CodeVariable'); 19@include JetbrainsMono.fontFaceVariable($fontName: 'JetBrains MonoVariable');
20@include JetbrainsMono.fontFaceVariable($fontName: 'JetBrains MonoVariable', $style: italic);
19 21
20body { 22body {
21 font-family: 'Roboto'; 23 font-family: 'Roboto', sans-serif;
22} 24}
23 25
24.CodeMirror { 26.CodeMirror, .CodeMirror-hints {
25 font-size: 16px; 27 font-size: 16px;
26 height: 100%; 28 height: 100%;
27 font-family: 'Fira CodeVariable', 'Fira Code', monospace; 29 font-family: 'JetBrains MonoVariable', 'JetBrains Mono', monospace;
28 font-feature-settings: 'liga', 'calt'; 30 font-feature-settings: 'liga', 'calt';
29 font-weight: 400; 31 font-weight: 400;
30 text-rendering: optimizeLegibility; 32 text-rendering: optimizeLegibility;
@@ -92,6 +94,7 @@ body {
92} 94}
93 95
94.problem-abstract { 96.problem-abstract {
97 font-style: italic;
95} 98}
96 99
97.problem-reference { 100.problem-reference {
@@ -99,7 +102,7 @@ body {
99} 102}
100 103
101.problem-containment { 104.problem-containment {
102 font-weight: 600; 105 font-weight: 700;
103} 106}
104 107
105.cm-quoted-name, .problem-enum-node { 108.cm-quoted-name, .problem-enum-node {
@@ -107,6 +110,7 @@ body {
107} 110}
108 111
109.problem-new-node { 112.problem-new-node {
113 font-style: italic;
110} 114}
111 115
112.problem-variable { 116.problem-variable {
diff --git a/language-web/src/main/js/editor/EditorButtons.jsx b/language-web/src/main/js/editor/EditorButtons.jsx
index 62f82f29..422c8a6d 100644
--- a/language-web/src/main/js/editor/EditorButtons.jsx
+++ b/language-web/src/main/js/editor/EditorButtons.jsx
@@ -8,6 +8,7 @@ import FormatListNumberedIcon from '@material-ui/icons/FormatListNumbered';
8import RedoIcon from '@material-ui/icons/Redo'; 8import RedoIcon from '@material-ui/icons/Redo';
9import UndoIcon from '@material-ui/icons/Undo'; 9import UndoIcon from '@material-ui/icons/Undo';
10import ToggleButton from '@material-ui/lab/ToggleButton'; 10import ToggleButton from '@material-ui/lab/ToggleButton';
11
11import { useRootStore } from '../RootStore'; 12import { useRootStore } from '../RootStore';
12 13
13const useStyles = makeStyles(theme => ({ 14const useStyles = makeStyles(theme => ({
@@ -40,6 +41,7 @@ export default observer(() => {
40 disabled={!editorStore.canUndo} 41 disabled={!editorStore.canUndo}
41 onClick={() => editorStore.undo()} 42 onClick={() => editorStore.undo()}
42 className={classes.iconButton} 43 className={classes.iconButton}
44 aria-label='Undo'
43 > 45 >
44 <UndoIcon fontSize='small'/> 46 <UndoIcon fontSize='small'/>
45 </Button> 47 </Button>
@@ -47,6 +49,7 @@ export default observer(() => {
47 disabled={!editorStore.canRedo} 49 disabled={!editorStore.canRedo}
48 onClick={() => editorStore.redo()} 50 onClick={() => editorStore.redo()}
49 className={classes.iconButton} 51 className={classes.iconButton}
52 aria-label='REdo'
50 > 53 >
51 <RedoIcon fontSize='small'/> 54 <RedoIcon fontSize='small'/>
52 </Button> 55 </Button>
@@ -57,11 +60,11 @@ export default observer(() => {
57 className={classes.divider} 60 className={classes.divider}
58 /> 61 />
59 <ToggleButton 62 <ToggleButton
60 value='Show line numbers'
61 selected={editorStore.showLineNumbers} 63 selected={editorStore.showLineNumbers}
62 onChange={() => editorStore.toggleLineNumbers()} 64 onChange={() => editorStore.toggleLineNumbers()}
63 size='small' 65 size='small'
64 className={classes.flatToggleButton} 66 className={classes.flatToggleButton}
67 aria-label='Show line numbers'
65 > 68 >
66 <FormatListNumberedIcon fontSize='small'/> 69 <FormatListNumberedIcon fontSize='small'/>
67 </ToggleButton> 70 </ToggleButton>