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:
@@ -124,25 +124,7 @@ class InternArticleView extends Component
|
|||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
$markdown = '';
|
return view('livewire.news.intern-article-view')->layout('layouts.app', [
|
||||||
$markdownPaid = '';
|
|
||||||
if ($this->libraryItem->value) {
|
|
||||||
$markdown = app(\Spatie\LaravelMarkdown\MarkdownRenderer::class)
|
|
||||||
->addExtension(new CommonMarkCoreExtension())
|
|
||||||
->addExtension(new HighlightCodeExtension('github-dark'))
|
|
||||||
->toHtml($this->libraryItem->value);
|
|
||||||
}
|
|
||||||
if ($this->libraryItem->value_to_be_paid) {
|
|
||||||
$markdownPaid = app(\Spatie\LaravelMarkdown\MarkdownRenderer::class)
|
|
||||||
->addExtension(new CommonMarkCoreExtension())
|
|
||||||
->addExtension(new HighlightCodeExtension('github-dark'))
|
|
||||||
->toHtml($this->libraryItem->value_to_be_paid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return view('livewire.news.intern-article-view', [
|
|
||||||
'markdown' => $markdown,
|
|
||||||
'markdownPaid' => $markdownPaid,
|
|
||||||
])->layout('layouts.app', [
|
|
||||||
'SEOData' => new SEOData(
|
'SEOData' => new SEOData(
|
||||||
title: $this->libraryItem->name,
|
title: $this->libraryItem->name,
|
||||||
description: strip_tags($this->libraryItem->excerpt) ?? __('Here we post important news that is relevant for everyone.'),
|
description: strip_tags($this->libraryItem->excerpt) ?? __('Here we post important news that is relevant for everyone.'),
|
||||||
|
|||||||
@@ -148,9 +148,9 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($libraryItem->type === 'markdown_article' || $libraryItem->type === 'markdown_article_extern')
|
@if($libraryItem->type === 'markdown_article' || $libraryItem->type === 'markdown_article_extern')
|
||||||
<div class="leading-normal">
|
<x-markdown class="leading-normal">
|
||||||
{!! $markdown !!}
|
{!! $libraryItem->value !!}
|
||||||
</div>
|
</x-markdown>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -287,9 +287,9 @@
|
|||||||
<div
|
<div
|
||||||
class="prose md:prose-lg prose-invert mx-auto mt-5 text-gray-100 lg:col-start-1 lg:row-start-1 lg:max-w-none">
|
class="prose md:prose-lg prose-invert mx-auto mt-5 text-gray-100 lg:col-start-1 lg:row-start-1 lg:max-w-none">
|
||||||
|
|
||||||
<div class="leading-normal">
|
<<x-markdown class="leading-normal">
|
||||||
{!! $markdownPaid !!}
|
{!! $libraryItem->value_to_be_paid !!}
|
||||||
</div>
|
</x-markdown>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
Reference in New Issue
Block a user