diff --git a/.idea/kuvia.iml b/.idea/kuvia.iml index a1a37f1..a038694 100644 --- a/.idea/kuvia.iml +++ b/.idea/kuvia.iml @@ -18,6 +18,7 @@ + diff --git a/.idea/php.xml b/.idea/php.xml index f0b94d8..2f7eaf6 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -113,6 +113,7 @@ + diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index ddb5d0a..6e3a7af 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -28,6 +28,10 @@ class PublicController extends BaseController public function listGalleriesView($name) { $tenant = Tenant::query()->where("url", "=", $name)->firstOrFail(); $galleries = Gallery::query()->where("tenant", "=", $tenant->id)->orderByDesc("gallery_create_time")->orderByDesc("created_at")->get(); + $parser = new \Parsedown(); + foreach ($galleries as $gallery) { + $gallery->html = $parser->parse($gallery->description); + } return view("themes.tenant.kuvia-blog.list", ["galleries" => $galleries, "tenant" => $tenant]); } diff --git a/composer.json b/composer.json index 59e477e..feb96cb 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,15 @@ "license": "MIT", "require": { "php": "^7.3|^8.0", + "almasaeed2010/adminlte": "^3.0", + "erusev/parsedown": "^1.7", "fideloper/proxy": "^4.4", "fruitcake/laravel-cors": "^2.0", + "gumlet/php-image-resize": "1.9.*", "guzzlehttp/guzzle": "^7.0.1", "laravel/framework": "^8.12", "laravel/tinker": "^2.5", - "almasaeed2010/adminlte": "^3.0", - "league/flysystem-aws-s3-v3": "~1.0", - "gumlet/php-image-resize": "1.9.*" + "league/flysystem-aws-s3-v3": "~1.0" }, "require-dev": { "facade/ignition": "^2.5", diff --git a/composer.lock b/composer.lock index 9328b5f..954c9e4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8920d6f3aab6ae8aa7942dbb536e37b6", + "content-hash": "fdbb8e19644f726c76bfec23d2f51743", "packages": [ { "name": "almasaeed2010/adminlte", @@ -592,6 +592,56 @@ ], "time": "2020-12-29T14:50:06+00:00" }, + { + "name": "erusev/parsedown", + "version": "1.7.4", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "support": { + "issues": "https://github.com/erusev/parsedown/issues", + "source": "https://github.com/erusev/parsedown/tree/1.7.x" + }, + "time": "2019-12-30T22:54:17+00:00" + }, { "name": "fideloper/proxy", "version": "4.4.1", diff --git a/resources/views/gallery/index.blade.php b/resources/views/gallery/index.blade.php index 145a842..7a344c9 100644 --- a/resources/views/gallery/index.blade.php +++ b/resources/views/gallery/index.blade.php @@ -38,7 +38,6 @@ Upload Images Bilder Bearbeiten - Delete diff --git a/resources/views/themes/tenant/kuvia-blog/list.blade.php b/resources/views/themes/tenant/kuvia-blog/list.blade.php index affc6bc..a4f7153 100644 --- a/resources/views/themes/tenant/kuvia-blog/list.blade.php +++ b/resources/views/themes/tenant/kuvia-blog/list.blade.php @@ -9,7 +9,7 @@

{{ $gallery->name }}

published {{ $gallery->gallery_create_time }}

-

{{ $gallery->description }}

+

{{ $gallery->html }}

More