This commit is contained in:
HolgerHatGarKeineNode
2023-03-29 15:11:40 +02:00
parent 184a6c4137
commit 96f90b5359
2 changed files with 16 additions and 12 deletions

View File

@@ -122,13 +122,17 @@ class InternArticleView extends Component
public function render() public function render()
{ {
if ($this->libraryItem->type === 'markdown_article') { $markdown = app(\Spatie\LaravelMarkdown\MarkdownRenderer::class)
$description = $this->libraryItem->excerpt ?? __('An entry in the library of Einundzwanzig.'); ->highlightTheme('github-dark')
} else { ->toHtml($this->libraryItem->value);
$description = $this->libraryItem->excerpt ?? __('Here we post important news that is relevant for everyone.'); $markdownPaid = app(\Spatie\LaravelMarkdown\MarkdownRenderer::class)
} ->highlightTheme('github-dark')
->toHtml($this->libraryItem->value_to_be_paid);
return view('livewire.news.intern-article-view')->layout('layouts.app', [ 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.'),

View File

@@ -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')
<x-markdown class="leading-normal"> <div class="leading-normal">
{!! $libraryItem->value !!} {!! $markdown !!}
</x-markdown> </div>
@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">
<x-markdown class="leading-normal"> <div class="leading-normal">
{!! $libraryItem->value_to_be_paid !!} {!! $markdownPaid !!}
</x-markdown> </div>
</div> </div>
@endif @endif