-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lukas Frey <[email protected]>
- Loading branch information
1 parent
fa38e8b
commit 38b1fd3
Showing
38 changed files
with
1,989 additions
and
290 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const args = process.argv.slice(2); | ||
|
||
async function main(args) { | ||
const {grammars} = await import('tm-grammars'); | ||
const language = args[0]; | ||
const meta = grammars | ||
.find(obj => obj.name === language || | ||
(obj.hasOwnProperty('aliases') && obj.aliases.includes(language)) | ||
); | ||
process.stdout.write(meta ? meta.displayName : 'Text'); | ||
} | ||
|
||
|
||
main(args) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,9 +1,10 @@ | ||
{ | ||
"devDependencies": { | ||
"devDependencies": { | ||
"conventional-changelog-conventionalcommits": "^7.0.2", | ||
"semantic-release": "^22.0.5" | ||
}, | ||
"dependencies": { | ||
"shiki": "^1.2.3" | ||
"shiki": "^1.2.3", | ||
"tm-grammars": "^1.7.2" | ||
} | ||
} |
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,8 @@ | ||
<?php | ||
|
||
return [ | ||
'knowledge-base' => 'Dokumentace', | ||
'help' => 'Nápověda', | ||
'open-documentation' => 'Otevřít dokumentaci', | ||
'close' => 'Zavřít', | ||
]; |
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,8 @@ | ||
<?php | ||
|
||
return [ | ||
'knowledge-base' => 'Dokumentation', | ||
'help' => 'Hilfe', | ||
'open-documentation' => 'Dokumentation öffnen', | ||
'close' => 'Schließen', | ||
]; |
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,8 @@ | ||
<?php | ||
|
||
return [ | ||
'knowledge-base' => 'Documentation', | ||
'help' => 'Help', | ||
'open-documentation' => 'Open documentation', | ||
'close' => 'Close', | ||
]; |
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,41 @@ | ||
@pushonce('styles') | ||
<style> | ||
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap'); | ||
.shiki * { | ||
font-family: "JetBrains Mono", monospace; | ||
font-optical-sizing: auto; | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
</style> | ||
@endpushonce | ||
|
||
<div @class([ | ||
"bg-gray-900 text-gray-200 dark:bg-gray-800/80 rounded-lg p-2 pt-0 mb-4", | ||
]) | ||
x-data | ||
> | ||
<div class="text-xs text-white/50 py-2 px-1 flex flex-row items-center justify-between"> | ||
<span>{{$language}}</span> | ||
<span | ||
class="hover:cursor-pointer hover:text-white/70 flex items-center justify-center gap-1 text-xs" | ||
x-on:click.prevent=" | ||
if (navigator.clipboard) { | ||
navigator.clipboard.writeText($root.querySelector('.shiki').textContent); | ||
new FilamentNotification().title('Code copied to your clipboard.').success().send(); | ||
} | ||
const range = document.createRange(); | ||
range.selectNodeContents($root.querySelector('.shiki')); | ||
window.getSelection().removeAllRanges(); | ||
window.getSelection().addRange(range); | ||
"> | ||
<x-icon name='heroicon-o-clipboard' class='w-4 h-4'/> | ||
<span x-show="navigator.clipboard">Copy</span> | ||
<span x-show="! navigator.clipboard">Select</span> | ||
</span> | ||
</div> | ||
<div class="rounded-lg p-4 leading-relaxed bg-gray-700/80 [&_.shiki]:!bg-transparent"> | ||
{!! $code !!} | ||
</div> | ||
</div> |
Oops, something went wrong.