mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
markdown
This commit is contained in:
@@ -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
|
||||||
@@ -46,19 +48,19 @@ class InternArticleView extends Component
|
|||||||
}
|
}
|
||||||
if ($this->libraryItem->lecturer->paynym) {
|
if ($this->libraryItem->lecturer->paynym) {
|
||||||
$this->payNymQrCode = base64_encode(QrCode::format('png')
|
$this->payNymQrCode = base64_encode(QrCode::format('png')
|
||||||
->size(300)
|
->size(300)
|
||||||
->merge($this->libraryItem->lecturer->getFirstMedia('avatar')
|
->merge($this->libraryItem->lecturer->getFirstMedia('avatar')
|
||||||
? str(
|
? str(
|
||||||
$this->libraryItem
|
$this->libraryItem
|
||||||
->lecturer
|
->lecturer
|
||||||
->getFirstMediaPath('avatar'))
|
->getFirstMediaPath('avatar'))
|
||||||
->replace('/home/einundzwanzig/portal.einundzwanzig.space',
|
->replace('/home/einundzwanzig/portal.einundzwanzig.space',
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
: '/public/img/einundzwanzig.png',
|
: '/public/img/einundzwanzig.png',
|
||||||
.3)
|
.3)
|
||||||
->errorCorrection('H')
|
->errorCorrection('H')
|
||||||
->generate($this->libraryItem->lecturer->paynym));
|
->generate($this->libraryItem->lecturer->paynym));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,14 +125,16 @@ 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', [
|
||||||
'markdown' => $markdown,
|
'markdown' => $markdown,
|
||||||
'markdownPaid' => $markdownPaid,
|
'markdownPaid' => $markdownPaid,
|
||||||
])->layout('layouts.app', [
|
])->layout('layouts.app', [
|
||||||
'SEOData' => new SEOData(
|
'SEOData' => new SEOData(
|
||||||
|
|||||||
@@ -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
2
composer.lock
generated
@@ -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",
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user