-
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.
Fixes #30
- Loading branch information
Showing
15 changed files
with
125 additions
and
28 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
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
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,12 @@ | ||
<script setup lang="ts"></script> | ||
|
||
<template> | ||
<div class="overflow-scroll h-fit max-h-60 resize-y"><slot /></div> | ||
</template> | ||
|
||
<style scoped> | ||
/* Override max-height when resized. */ | ||
.resize-y[style*="height"] { | ||
max-height: unset; | ||
} | ||
</style> |
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,21 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ | ||
code: string; | ||
language?: string; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<highlightjs | ||
:code | ||
:language | ||
:autodetect="false" | ||
class="text-xs rounded whitespace-pre-wrap [overflow-wrap:anywhere]" | ||
/> | ||
</template> | ||
|
||
<style> | ||
pre code.hljs { | ||
@apply p-2 bg-stone-800; | ||
} | ||
</style> |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<pre | ||
class="bg-stone-600 text-lime-50 text-xs p-2 rounded whitespace-pre-wrap [overflow-wrap:anywhere]" | ||
class="bg-stone-800 text-lime-50 text-xs p-2 rounded whitespace-pre-wrap [overflow-wrap:anywhere]" | ||
><slot /></pre> | ||
</template> |
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
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
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
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
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
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
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,12 @@ | ||
import hljs from "highlight.js/lib/core"; | ||
import xml from "highlight.js/lib/languages/xml"; | ||
import yaml from "highlight.js/lib/languages/yaml"; | ||
import highlightPlugin from "@highlightjs/vue-plugin"; | ||
import "highlight.js/styles/base16/monokai.css"; | ||
|
||
hljs.registerLanguage("xml", xml); | ||
hljs.registerLanguage("yaml", yaml); | ||
|
||
export default highlightPlugin; | ||
|
||
export type SyntaxLanguage = "xml" | "yaml"; |
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
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
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