Skip to content

Commit ed41b45

Browse files
committed
[website] implement playground
1 parent da21944 commit ed41b45

File tree

16 files changed

+668
-166
lines changed

16 files changed

+668
-166
lines changed

README.org

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#+title: Orga
22
#+subtitle: org-mode < JavaScript
3-
#+layout: './website/src/components/landing'
43

54
* What Is It
65

packages/editor/lib/theme.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@ import { HighlightStyle, syntaxHighlighting } from '@codemirror/language'
33
import { tags as t } from '@orgajs/cm-lang'
44

55
const theme = EditorView.baseTheme({
6-
'&': {},
6+
'&': {
7+
height: '100%',
8+
},
9+
'&:focus': {
10+
outline: 'none',
11+
},
12+
'&.cm-editor.cm-focused': {
13+
outline: 'none',
14+
},
15+
'.cm-scroller': { fontFamily: 'inherit' },
716
'.hide': { display: 'none' },
817
'.cm-link': {
918
cursor: 'pointer',
@@ -37,7 +46,12 @@ const baseStyle = HighlightStyle.define([
3746
{ tag: t.keyword, fontWeight: 'bold' },
3847
{ tag: t.strong, fontWeight: 'bold' },
3948
{ tag: t.emphasis, fontStyle: 'italic' },
40-
// { tag: t.monospace, color: 'blue' }, // TODO: change font?
49+
{
50+
tag: t.monospace,
51+
borderRadius: '4px',
52+
padding: '1px 4px',
53+
fontFamily: "'JetBrains Mono', monospace",
54+
},
4155
{ tag: t.strikethrough, textDecoration: 'line-through' },
4256
{ tag: t.underline, textDecoration: 'underline' },
4357
])
@@ -46,7 +60,6 @@ const lightColors = HighlightStyle.define(
4660
[
4761
{ tag: t.keyword, color: '#e45649' },
4862
{ tag: t.comment, color: '#9ca0a4' },
49-
{ tag: t.monospace, color: 'blue' },
5063
{ tag: t.link, color: 'blue' },
5164
{ tag: t.processingInstruction, color: '#9ca0a4' },
5265
{ tag: t.attributeName, color: '#9ca0a4' },
@@ -58,7 +71,6 @@ const darkColors = HighlightStyle.define(
5871
[
5972
{ tag: t.keyword, color: 'green' },
6073
{ tag: t.comment, color: 'red' },
61-
{ tag: t.monospace, backgroundColor: 'blue' },
6274
{ tag: t.link, color: '#5cc9f5' },
6375
{ tag: t.processingInstruction, color: 'gray' },
6476
{ tag: t.attributeName, color: 'gray' },

0 commit comments

Comments
 (0)