This commit is contained in:
HolgerHatGarKeineNode
2023-03-29 15:25:35 +02:00
parent 96f90b5359
commit 42e2f9eacb
4 changed files with 47 additions and 17 deletions

View File

@@ -6,9 +6,11 @@ use App\Models\LibraryItem;
use App\Traits\LNBitsTrait; use App\Traits\LNBitsTrait;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use Livewire\Component; use Livewire\Component;
use RalphJSmit\Laravel\SEO\Support\SEOData; use RalphJSmit\Laravel\SEO\Support\SEOData;
use SimpleSoftwareIO\QrCode\Facades\QrCode; use SimpleSoftwareIO\QrCode\Facades\QrCode;
use Spatie\CommonMarkShikiHighlighter\HighlightCodeExtension;
use WireUi\Traits\Actions; use WireUi\Traits\Actions;
class InternArticleView extends Component class InternArticleView extends Component
@@ -123,10 +125,12 @@ class InternArticleView extends Component
public function render() public function render()
{ {
$markdown = app(\Spatie\LaravelMarkdown\MarkdownRenderer::class) $markdown = app(\Spatie\LaravelMarkdown\MarkdownRenderer::class)
->highlightTheme('github-dark') ->addExtension(new CommonMarkCoreExtension())
->addExtension(new HighlightCodeExtension('github-dark'))
->toHtml($this->libraryItem->value); ->toHtml($this->libraryItem->value);
$markdownPaid = app(\Spatie\LaravelMarkdown\MarkdownRenderer::class) $markdownPaid = app(\Spatie\LaravelMarkdown\MarkdownRenderer::class)
->highlightTheme('github-dark') ->addExtension(new CommonMarkCoreExtension())
->addExtension(new HighlightCodeExtension('github-dark'))
->toHtml($this->libraryItem->value_to_be_paid); ->toHtml($this->libraryItem->value_to_be_paid);
return view('livewire.news.intern-article-view', [ return view('livewire.news.intern-article-view', [

View File

@@ -41,6 +41,7 @@
"sentry/sentry-laravel": "^3.2", "sentry/sentry-laravel": "^3.2",
"simplesoftwareio/simple-qrcode": "^4.2", "simplesoftwareio/simple-qrcode": "^4.2",
"simplito/elliptic-php": "^1.0", "simplito/elliptic-php": "^1.0",
"spatie/commonmark-shiki-highlighter": "^2.1",
"spatie/eloquent-sortable": "^4.0", "spatie/eloquent-sortable": "^4.0",
"spatie/icalendar-generator": "^2.5", "spatie/icalendar-generator": "^2.5",
"spatie/laravel-ciphersweet": "^1.0", "spatie/laravel-ciphersweet": "^1.0",

2
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "471af56992a63a07d0e7097c14ef9c30", "content-hash": "07fa7a3b9d1380a7e43243241a7cfda3",
"packages": [ "packages": [
{ {
"name": "akuechler/laravel-geoly", "name": "akuechler/laravel-geoly",

View File

@@ -1,4 +1,29 @@
<style> <style>
.shiki .highlight {
background-color: hsl(197, 88%, 94%);
padding: 3px 0;
}
.shiki .add {
background-color: hsl(136, 100%, 96%);
padding: 3px 0;
}
.shiki .del {
background-color: hsl(354, 100%, 96%);
padding: 3px 0;
}
.shiki.focus .line:not(.focus) {
transition: all 250ms;
filter: blur(2px);
}
.shiki.focus:hover .line {
transition: all 250ms;
filter: blur(0);
}
.comments { .comments {
--comments-color-background: rgb(34, 34, 34); --comments-color-background: rgb(34, 34, 34);
--comments-color-background: rgb(34, 34, 34); --comments-color-background: rgb(34, 34, 34);