From e255f1df4ca5f5abaea6d0536dfaa323c46f8aca Mon Sep 17 00:00:00 2001 From: Gustavo Luigi Date: Mon, 29 Nov 2021 15:33:43 -0300 Subject: [PATCH] adapt themee to lumino version 2.2 --- config.json | 54 ++++++++++- content/contents/default.blade.php | 140 +++-------------------------- content/includes/meta.blade.php | 47 ++++------ content/index.blade.php | 30 +++---- content/lists/default.blade.php | 48 +++------- content/lists/faq.blade.php | 2 +- content/lists/produkte.blade.php | 118 +++++++++--------------- content/news.blade.php | 89 +----------------- 8 files changed, 151 insertions(+), 377 deletions(-) diff --git a/config.json b/config.json index 1ba89c3..db7e8f0 100644 --- a/config.json +++ b/config.json @@ -7,5 +7,57 @@ "name": "Areya Webservices", "link": "https://www.areya.de/" }, - "lumino-version": {"min": "2.2", "max": "2.2"} + "lumino-version": {"min": "2.2", "max": "2.2"}, + "content-types": [ + { + "name":"News", + "description":"Neuigkeiten", + "icon":"newspaper", + "status":"1", + "fields": [ + { + "name": "Neuigkeit", + "type": "textfield", + "required": "1" + }, + { + "name": "Link", + "type": "url", + "required": "0" + } + ] + }, + { + "name":"Produkte", + "description":"Produkte", + "icon":"shopping-bag", + "status":"1", + "fields": [ + { + "name": "Beschreibung", + "type": "textfield", + "required": "1" + }, + { + "name": "Preis", + "type": "number", + "attr": "{'min':'0','step':'0.01'}", + "required": "0" + } + ] + }, + { + "name":"Fragen & Antworten", + "description":"Fragen & Antworten", + "icon":"question-circle", + "status":"1", + "fields": [ + { + "name": "Antwort", + "type": "textfield", + "required": "1" + } + ] + } + ] } \ No newline at end of file diff --git a/content/contents/default.blade.php b/content/contents/default.blade.php index 00d2680..2afc6d4 100644 --- a/content/contents/default.blade.php +++ b/content/contents/default.blade.php @@ -2,61 +2,34 @@ @section('content')
- - - - - - -
- - - -
- -

{{$nach->title}}

- +

{{$content->title}}

- -
- Veröffentlicht: {{date('d.m.Y', strtotime($nach->created_at))}} - + Veröffentlicht: {{date('d.m.Y', strtotime($content->created_at))}}
- -
- -
- - - @if ($nach->image) + @if ($content->image)
- +
@endif -
- - - - - -

- {!! isset($nach->additional_fields['1']) ? $nach->additional_fields['1'] : 'keine Angaben' !!} - + {!! !empty($content->description)?$content->description:'keine Angaben' !!}


- - @if(App::environment('production')) - -
- - - @if (\App\Models\Nachrichten::whereJsonContains('additional_fields->14', $nach->additional_fields['14'])->where('approved', 1)->where('id', '!=', $nach->id)->limit(4)->get()->sortByDesc('created_at')->count() > 0) - -
-
-
-

Ähnliche Jobangebote

-
-
- - @foreach (\App\Models\Nachrichten::whereJsonContains('additional_fields->14', $nach->additional_fields['14'])->where('approved', 1)->where('id', '!=', $nach->id)->limit(3)->get()->sortByDesc('created_at') as $nachLimit) -
- -
-
-
-
- - - -
- - - - -
-
-
{{date('d.m.Y', strtotime($nachLimit->created_at))}}
- -
- -
- -
-
-
- @endforeach - @endif - -
-
-
-
-
- @endif
diff --git a/content/includes/meta.blade.php b/content/includes/meta.blade.php index e5d8b9d..2139c99 100644 --- a/content/includes/meta.blade.php +++ b/content/includes/meta.blade.php @@ -1,9 +1,6 @@ - - - @@ -13,45 +10,33 @@ -@if (\Route::currentRouteName() == 'nachrichten.get' and isset($nach)) - {{ $nach->title}} - - - @isset($nach->additional_fields['17']) - - - @endisset - +@if (\Route::currentRouteName() == 'content' and isset($content)) + {{ $content->title}} - - - + + + - - - @if ($nach->image) - + @if ($content->image) + @else - + @endif +@elseif (\Route::currentRouteName() == 'content' and isset($list)) + Aktuelle Stellenangebote in {{ $list->name }} + - -@elseif (\Route::currentRouteName() == 'list.get' and isset($listModel)) - - Aktuelle Stellenangebote in {{ $listModel->name }} - - - - + + - + - @if ($listModel->image) - + @if ($list->image) + @else @endif diff --git a/content/index.blade.php b/content/index.blade.php index db4abd6..2f9eed3 100644 --- a/content/index.blade.php +++ b/content/index.blade.php @@ -103,39 +103,33 @@

Aktuelle Neuigkeiten

- @foreach(filterByContentType($mdNachrichten, "News")->take(3) as $nach) + @foreach(filterByContentType($mdContents, "News")->take(3) as $content)
- @if ($nach->image) - + @if ($content->image) + @else @endif -
- - -
- {{ $nach->created_at->diffForHumans() }} + {{ $content->created_at->diffForHumans() }}
- {!! isset($nach->additional_fields['1']) ? $nach->additional_fields['1'] : 'keine Angaben' !!} + {!! !empty($content->description)?$content->description:'keine Angaben' !!}
- -
- @foreach(filterByContentType($mdNachrichten, "Produkte")->take(6) as $nach) + @foreach(filterByContentType($mdContents, "Produkte")->take(6) as $content)
- - @if ($nach->image) - + + @if ($content->image) + @else diff --git a/content/lists/default.blade.php b/content/lists/default.blade.php index 83ffc15..4598c9f 100644 --- a/content/lists/default.blade.php +++ b/content/lists/default.blade.php @@ -1,40 +1,26 @@ @extends('template.'.config('settings.template').'.content.master') @section('content') - - - -
-

{{ $listModel->name }}

+

{{ $list->name }}


- @if (isset($listModel)) - {{ $listModel->description }} + @if (isset($list)) + {{ $list->description }} @endif - -
- -
- - - @foreach($nachrichten as $nach) - - + @foreach($contents as $nach) - - @endforeach - {!! $nachrichten->render() !!} + {!! $contents->render() !!}

diff --git a/content/lists/faq.blade.php b/content/lists/faq.blade.php index 0a3dff4..cefd6d0 100644 --- a/content/lists/faq.blade.php +++ b/content/lists/faq.blade.php @@ -43,7 +43,7 @@
- {!! isset($nach->additional_fields['2']) ? $nach->additional_fields['2'] : 'keine Angaben' !!} + {!! !empty($content->description)?$content->description:'keine Angaben' !!}
diff --git a/content/lists/produkte.blade.php b/content/lists/produkte.blade.php index 8cf96f0..bd75c7b 100644 --- a/content/lists/produkte.blade.php +++ b/content/lists/produkte.blade.php @@ -1,80 +1,46 @@ @extends('template.'.config('settings.template').'.content.master') @section('content') - - - - -
-
-

{{ $listModel->name }}

-
- @if (isset($listModel)) - {{ $listModel->description }} - @endif - - -
-
- - -
- + +
+ @endforeach + {!! $contents->render() !!} +
+
+
+
+
+
+
+
@stop \ No newline at end of file diff --git a/content/news.blade.php b/content/news.blade.php index 00d2680..11068d8 100644 --- a/content/news.blade.php +++ b/content/news.blade.php @@ -70,98 +70,11 @@

- {!! isset($nach->additional_fields['1']) ? $nach->additional_fields['1'] : 'keine Angaben' !!} - + {!! !empty($content->description)?$content->description:'keine Angaben' !!}


- - @if(App::environment('production')) - -
- - - @if (\App\Models\Nachrichten::whereJsonContains('additional_fields->14', $nach->additional_fields['14'])->where('approved', 1)->where('id', '!=', $nach->id)->limit(4)->get()->sortByDesc('created_at')->count() > 0) - -
-
-
-

Ähnliche Jobangebote

-
-
- - @foreach (\App\Models\Nachrichten::whereJsonContains('additional_fields->14', $nach->additional_fields['14'])->where('approved', 1)->where('id', '!=', $nach->id)->limit(3)->get()->sortByDesc('created_at') as $nachLimit) -
- -
-
-
-
- - - -
- - - - -
-
-
{{date('d.m.Y', strtotime($nachLimit->created_at))}}
- -
- -
- -
-
-
- @endforeach - @endif - -
-
-
-
-
- @endif