forked from wesbos/hot-tips
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
815 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const websocket = new WebSocket(`ws://localhost:5786`); | ||
|
||
websocket.onmessage = (message) => { | ||
const data = JSON.parse(message.data); | ||
if (data.type === `css`) { | ||
document.querySelector(`style#${data.id}`).innerHTML = data.css; | ||
} | ||
console.log(`Received:`, data); | ||
}; | ||
|
||
websocket.onclose = () => { | ||
console.log(`Disconnected`); | ||
}; | ||
|
||
websocket.onerror = (error) => { | ||
console.log(`Error: ${error}`); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* Test */ | ||
|
||
/* Method 1: Fix it! */ | ||
/* Solution: Fix it! */ | ||
/** Problem 1: */ | ||
/* todo: Fix later */ | ||
/** this is a regular comment*/ | ||
/** this is a | ||
multi line comment | ||
*/ | ||
|
||
.monaco-editor { | ||
& span.ced-1-TextEditorDecorationType22-1, | ||
span.ced-1-TextEditorDecorationType26-1 { | ||
background: #ffc600; | ||
box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.01), 0 0 10px 10px rgba(0, 0, 0, 0.1); | ||
font-family: "Radnika Next"; | ||
font-weight: 900; | ||
padding: 0px; | ||
line-height: 1.5; | ||
color: black !important; | ||
display: inline-block; | ||
transform: rotate(-1deg); | ||
} | ||
} | ||
|
||
/* this is handy for testing if its working */ | ||
.editor-container { | ||
border: 2px solid orange !important; | ||
} |
Oops, something went wrong.