diff --git a/app/Enums/BaseEnum.php b/app/Enums/BaseEnum.php index 601f0fb0..d8496f82 100644 --- a/app/Enums/BaseEnum.php +++ b/app/Enums/BaseEnum.php @@ -56,6 +56,22 @@ abstract class BaseEnum implements JsonSerializable return array_values(static::toArray()); } + /** + * Get the enum definition + * + * @return mixed|null + */ + public function getDefinition() + { + $className = static::class; + foreach (static::$definitionCache[$className] as $definition => $enum) { + if ($enum->value === $this->value) { + return $definition; + } + } + return null; + } + /** * @param string|int $value * diff --git a/app/Enums/RecipeDifficulty.php b/app/Enums/RecipeDifficulty.php index 9c963f0d..ecc02908 100644 --- a/app/Enums/RecipeDifficulty.php +++ b/app/Enums/RecipeDifficulty.php @@ -13,20 +13,25 @@ final class RecipeDifficulty extends BaseEnum protected static function values(): array { return [ - 'veryeasy' => 0, - 'easy' => 1, - 'confirmed' => 2, - 'expert' => 3 + 'veryeasy' => 1, + 'easy' => 2, + 'confirmed' => 3, + 'expert' => 4 ]; } protected static function labels(): array { return [ - 'veryeasy' => __('Video'), - 'easy' => __('Easy'), - 'confirmed' => __('Confirmed'), + 'veryeasy' => __('Très facile'), + 'easy' => __('Facile'), + 'confirmed' => __('Confirmé'), 'expert' => __('Expert'), ]; } + + public function __toString(): string + { + return (string) $this->label; + } } diff --git a/app/Enums/RecipeType.php b/app/Enums/RecipeType.php index 1d885d5a..a48ded85 100644 --- a/app/Enums/RecipeType.php +++ b/app/Enums/RecipeType.php @@ -3,24 +3,24 @@ namespace App\Enums; /** - * @method static self video() * @method static self classic() + * @method static self video() */ final class RecipeType extends BaseEnum { protected static function values(): array { return [ - 'video' => 0, - 'classic' => 1 + 'classic' => 0, + 'video' => 1 ]; } protected static function labels(): array { return [ - 'video' => __('Video'), 'classic' => __('Classic'), + 'video' => __('Video') ]; } } diff --git a/app/Facades/RecipeType.php b/app/Facades/RecipeType.php new file mode 100644 index 00000000..e27c520c --- /dev/null +++ b/app/Facades/RecipeType.php @@ -0,0 +1,14 @@ +has('recipes.rand') || + (intval(session()->get('recipes.time', time())) - intval(time())) > (60 * 60 * 60) // 1 hour + ) { + session()->put('recipes.time', time()); + session()->put('recipes.rand', Recipes::all('id')->shuffle()->map(function ($obj) { + return $obj->id; + })->toArray()); + session()->save(); + } + + $recipes = Recipes::select('title', 'slug', 'picture', 'catch_phrase') + ->where('status', true) + ->orderByRaw(\sprintf('FIELD(id, %s)', implode(", ", session()->get('recipes.rand')))); + + if ($request->search) { + $recipes = $recipes->where('title', 'like', '%' . implode('%', explode(' ', trim($request->search))) . '%'); + } + if ($request->video_recipe) { + $recipes = $recipes->where('type', '=', RecipeType::video()->value); + } + + $ranges = Ranges::select('name', 'slug') + ->where('status', true) + ->orderBy('order') + ->get(); + + $consumptionTimes = ConsumptionTimes::select('name', 'slug') + ->where('status', true) + ->get(); + + try { + switch ($request->type) { + case 'range': + $recipes = $recipes->whereHas('products.range', function ($q) use ($request) { + $q->where('ranges.slug', $request->value); + }); + break; + case 'consumption': + $recipes = $recipes->whereHas('consumptionTimes', function ($q) use ($request) { + $q->where('consumption_times.slug', $request->value); + }); + break; + case 'preparation': + switch ($request->value) { + case 'less15': + $recipes = $recipes->where('preparation_time', '<=', 15); + break; + case '15and30': + $recipes = $recipes + ->where('preparation_time', '>=', 15) + ->where('preparation_time', '<=', 30); + break; + default: + case 'more30': + $recipes = $recipes + ->where('preparation_time', '>', 30); + break; + } + break; + case 'cooking': + switch ($request->value) { + case 'less15': + $recipes = $recipes->where('cooking_time', '<=', 15); + break; + case '15and30': + $recipes = $recipes + ->where('cooking_time', '>=', 15) + ->where('cooking_time', '<=', 30); + break; + default: + case 'more30': + $recipes = $recipes + ->where('cooking_time', '>', 30); + break; + } + break; + } + } catch (ModelNotFoundException $e) { + } + + + $recipes = $recipes->paginate(); + $type = $request->type; + $value = $request->value; + + return view('front.recipes.index', compact( + 'recipes', + 'ranges', + 'consumptionTimes', + 'type', + 'value' + )); + } + + public function show(Recipes $recipe) + { + $recipe->load('products', 'articles', 'rating'); + return view('front.recipes.show', compact('recipe')); + } + + public function rate(Recipes $recipe, RecipeRateRequest $request) + { + if ($recipe->hasBeenRatedByUser()) { + return response()->json($recipe->rating->rating); + } + $recipe->setRateForUserAndSave($request->post('rating', 0)); + return response()->json($recipe->rating->rating); + } + + public function kitchenside() + { + $recipesLimit = 3; + $featuredRecipes = Recipes::where('highlight', true) + ->where('type', RecipeType::classic()) + ->limit($recipesLimit) + ->inRandomOrder() + ->get(); + // TODO: Create video recipes to test query and css in front + $videoRecipes = Recipes::where('type', RecipeType::video()) + ->limit($recipesLimit) + ->inRandomOrder() + ->orderBy('highlight', 'desc') + ->get(); + if (count($featuredRecipes) < $recipesLimit) { + $featuredRecipes = $featuredRecipes->merge(Recipes::all() + ->inRandomOrder() + ->limit($recipesLimit - count($featuredRecipes)) + ->get()); + } + return view('front.kitchenside', compact('featuredRecipes', 'videoRecipes')); + } +} diff --git a/app/Http/Requests/RecipeIndexRequest.php b/app/Http/Requests/RecipeIndexRequest.php new file mode 100644 index 00000000..5b611e83 --- /dev/null +++ b/app/Http/Requests/RecipeIndexRequest.php @@ -0,0 +1,37 @@ + [function ($attribute, $value, $fail) { + if (!in_array($value, ['range', 'consumption', ' preparation', 'cooking'])) { + $fail('Unkown type search'); + } + }], + 'value' => 'sometimes', + 'search' => 'sometimes', + 'video_recipe' => 'sometimes' + ]; + } +} diff --git a/app/Http/Requests/RecipeRateRequest.php b/app/Http/Requests/RecipeRateRequest.php new file mode 100644 index 00000000..2500b2e1 --- /dev/null +++ b/app/Http/Requests/RecipeRateRequest.php @@ -0,0 +1,30 @@ + 'required|numeric|between:0,5.00' + ]; + } +} diff --git a/app/Models/Products.php b/app/Models/Products.php index 50a65455..0ebaf745 100644 --- a/app/Models/Products.php +++ b/app/Models/Products.php @@ -72,7 +72,7 @@ class Products extends Model public function recipes() { - return $this->belongsToMany(Recipes::class); + return $this->belongsToMany(Recipes::class, 'recipes_products', 'recipe_id', 'product_id'); } //TODO: PSR1 is not in camel caps format diff --git a/app/Models/Ranges.php b/app/Models/Ranges.php index b75069a2..6f64623e 100644 --- a/app/Models/Ranges.php +++ b/app/Models/Ranges.php @@ -17,7 +17,7 @@ class Ranges extends Model public function products() { - return $this->hasMany(Products::class); + return $this->hasMany(Products::class, 'range_id'); } public function reductions() diff --git a/app/Models/Rating.php b/app/Models/Rating.php new file mode 100644 index 00000000..bf419611 --- /dev/null +++ b/app/Models/Rating.php @@ -0,0 +1,13 @@ +belongsTo(Recipe::class); + } +} diff --git a/app/Models/Recipes.php b/app/Models/Recipes.php index 404ff37c..93679742 100644 --- a/app/Models/Recipes.php +++ b/app/Models/Recipes.php @@ -22,12 +22,70 @@ class Recipes extends Model public function articles() { - return $this->belongsToMany(Articles::class); + return $this->belongsToMany(Articles::class, 'recipes_articles', 'recipe_id', 'article_id'); } public function products() { - return $this->hasMany(Products::class); + return $this->belongsToMany(Products::class, 'recipes_products', 'recipe_id', 'product_id'); + } + + /** + * Get associated range + * + * @return Ranges|null + */ + public function associatedRange() + { + return $this->products()->first()->range; + } + + /** + * Get Associated Recipes + * @return \Illuminate\Database\Eloquent\Collection + */ + public function associatedRecipes() + { + $recipesLimit = 3; + $rangeID = $this->products()->first()->range->id ?? 0; + $preparationTime = $this->preparation_time ?? 0; + $cookingTime = $this->cooking_time ?? 0; + + $recipes = Recipes::where('id', '!=', $this->id) + ->whereHas('products.range', function ($q) use ($rangeID) { + $q->where('ranges.id', $rangeID); + })->inRandomOrder()->limit($recipesLimit)->get(); + + // With preparation time + if (count($recipes) < $recipesLimit) { + $recipes = $recipes->merge(Recipes::where('preparation_time', $preparationTime) + ->inRandomOrder() + ->limit($recipesLimit - count($recipes)) + ->get()); + } + + // With cooking time + if (count($recipes) < $recipesLimit) { + $recipes = $recipes->merge(Recipes::where('cooking_time', $cookingTime) + ->inRandomOrder() + ->limit($recipesLimit - count($recipes)) + ->get()); + } + + // Random + if (count($recipes) < $recipesLimit) { + $recipes = $recipes->merge(Recipes::limit($recipesLimit - count($recipes)) + ->inRandomOrder() + ->limit($recipesLimit - count($recipes)) + ->get()); + } + + return $recipes; + } + + public function rating() + { + return $this->hasOne(Rating::class); } public function product1() @@ -44,4 +102,46 @@ class Recipes extends Model { return $this->belongsToMany(Customers::class); } + + public function consumptionTimes() + { + return $this->belongsTo(ConsumptionTimes::class); + } + + /** + * Check if recipe has been rated by the user (in session also if not Auth) + * TODO: If User is Auth check rating for the user + * @return boolean + */ + public function hasBeenRatedByUser() + { + return session()->has(sprintf('recipes.rating.%s', $this->slug)); + } + + /** + * Set the recipes rating and memorize in session, or user + * TODO: If User is Auth save rating for the user + * @param string $rating + * @return void + */ + public function setRateForUserAndSave($rating) + { + $total = $this->rating->total + $rating; + $count = ++$this->rating->count; + $o = [ + 'total' => $total, + 'count' => $count, + 'rating' => floatval($total / $count) + ]; + if (!$this->rating->exists()) { + $this->attach(new Rating($o)); + } else { + $this->rating->total = $o['total']; + $this->rating->rating = $o['rating']; + $this->rating->count = $o['count']; + $this->rating->save(); + } + session()->put(sprintf('recipes.rating.%s', $this->slug), $rating); + session()->save(); + } } diff --git a/composer.json b/composer.json index 96a56571..5af6639b 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "laravel/framework": "^7.0", "laravel/tinker": "^2.0", "laravel/ui": "^2.1", + "mews/purifier": "^3.3", "riverskies/laravel-mobile-detect": "^1.3" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 2a4146ea..fda0af5d 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": "14f78a12265f33df7cb9bcfe39658cc7", + "content-hash": "14857a08958fe30b71c5d73d1c6ce0ca", "packages": [ { "name": "asm89/stack-cors", @@ -137,6 +137,311 @@ "description": "implementation of xdg base directory specification for php", "time": "2019-12-04T15:06:13+00:00" }, + { + "name": "doctrine/cache", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "13e3381b25847283a91948d04640543941309727" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727", + "reference": "13e3381b25847283a91948d04640543941309727", + "shasum": "" + }, + "require": { + "php": "~7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^6.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", + "keywords": [ + "abstraction", + "apcu", + "cache", + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "support": { + "issues": "https://github.com/doctrine/cache/issues", + "source": "https://github.com/doctrine/cache/tree/1.10.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } + ], + "time": "2020-07-07T18:54:01+00:00" + }, + { + "name": "doctrine/dbal", + "version": "2.12.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "adce7a954a1c2f14f85e94aed90c8489af204086" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/adce7a954a1c2f14f85e94aed90c8489af204086", + "reference": "adce7a954a1c2f14f85e94aed90c8489af204086", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.0", + "doctrine/event-manager": "^1.0", + "ext-pdo": "*", + "php": "^7.3 || ^8" + }, + "require-dev": { + "doctrine/coding-standard": "^8.1", + "jetbrains/phpstorm-stubs": "^2019.1", + "phpstan/phpstan": "^0.12.40", + "phpunit/phpunit": "^9.4", + "psalm/plugin-phpunit": "^0.10.0", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "^3.17.2" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlanywhere", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/2.12.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2020-11-14T20:26:58+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2020-05-29T18:28:51+00:00" + }, { "name": "doctrine/inflector", "version": "2.0.3", @@ -388,6 +693,60 @@ ], "time": "2020-06-16T20:11:17+00:00" }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.13.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75", + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "require-dev": { + "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd" + }, + "type": "library", + "autoload": { + "psr-0": { + "HTMLPurifier": "library/" + }, + "files": [ + "library/HTMLPurifier.composer.php" + ], + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/master" + }, + "time": "2020-06-29T00:56:53+00:00" + }, { "name": "fideloper/proxy", "version": "4.4.0", @@ -1128,6 +1487,87 @@ ], "time": "2020-05-18T15:13:39+00:00" }, + { + "name": "mews/purifier", + "version": "3.3.3", + "source": { + "type": "git", + "url": "https://github.com/mewebstudio/Purifier.git", + "reference": "8e0b3d87c79b38b8d88aeb3c0ba8b000a393a74c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mewebstudio/Purifier/zipball/8e0b3d87c79b38b8d88aeb3c0ba8b000a393a74c", + "reference": "8e0b3d87c79b38b8d88aeb3c0ba8b000a393a74c", + "shasum": "" + }, + "require": { + "ezyang/htmlpurifier": "4.13.*", + "illuminate/config": "^5.8|^6.0|^7.0|^8.0", + "illuminate/filesystem": "^5.8|^6.0|^7.0|^8.0", + "illuminate/support": "^5.8|^6.0|^7.0|^8.0", + "php": "^7.2|^8.0" + }, + "require-dev": { + "graham-campbell/testbench": "^3.2|^5.5.1", + "mockery/mockery": "^1.3.3", + "phpunit/phpunit": "^8.0|^9.0" + }, + "suggest": { + "laravel/framework": "To test the Laravel bindings", + "laravel/lumen-framework": "To test the Lumen bindings" + }, + "type": "package", + "extra": { + "laravel": { + "providers": [ + "Mews\\Purifier\\PurifierServiceProvider" + ], + "aliases": { + "Purifier": "Mews\\Purifier\\Facades\\Purifier" + } + } + }, + "autoload": { + "psr-4": { + "Mews\\Purifier\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Muharrem ERİN", + "email": "me@mewebstudio.com", + "homepage": "https://github.com/mewebstudio", + "role": "Developer" + } + ], + "description": "Laravel 5/6/7 HtmlPurifier Package", + "homepage": "https://github.com/mewebstudio/purifier", + "keywords": [ + "Purifier", + "htmlpurifier", + "laravel5 HtmlPurifier", + "laravel5 Purifier", + "laravel5 Security", + "laravel6 HtmlPurifier", + "laravel6 Purifier", + "laravel6 Security", + "security", + "xss" + ], + "support": { + "issues": "https://github.com/mewebstudio/Purifier/issues", + "source": "https://github.com/mewebstudio/Purifier/tree/3.3.3" + }, + "time": "2020-11-03T19:46:27+00:00" + }, { "name": "mobiledetect/mobiledetectlib", "version": "2.8.34", @@ -6096,5 +6536,6 @@ "platform": { "php": "^7.2.5" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.0.0" } diff --git a/config/app.php b/config/app.php index c4991e06..cb298338 100644 --- a/config/app.php +++ b/config/app.php @@ -236,6 +236,7 @@ return [ 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, + 'RecipeType' => \App\Facades\RecipeType::class ], ]; diff --git a/config/purifier.php b/config/purifier.php new file mode 100644 index 00000000..bc6dcd18 --- /dev/null +++ b/config/purifier.php @@ -0,0 +1,107 @@ +set('Core.Encoding', $this->config->get('purifier.encoding')); + * $config->set('Cache.SerializerPath', $this->config->get('purifier.cachePath')); + * if ( ! $this->config->get('purifier.finalize')) { + * $config->autoFinalize = false; + * } + * $config->loadArray($this->getConfig()); + * + * You must NOT delete the default settings + * anything in settings should be compacted with params that needed to instance HTMLPurifier_Config. + * + * @link http://htmlpurifier.org/live/configdoc/plain.html + */ + +return [ + 'encoding' => 'UTF-8', + 'finalize' => true, + 'cachePath' => storage_path('app/purifier'), + 'cacheFileMode' => 0755, + 'settings' => [ + 'default' => [ + 'HTML.Doctype' => 'HTML 4.01 Transitional', + 'HTML.Allowed' => 'div,b,strong,i,em,u,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src]', + 'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', + 'AutoFormat.AutoParagraph' => true, + 'AutoFormat.RemoveEmpty' => true, + 'AutoFormat.RemoveEmpty.RemoveNbsp' => true, + ], + 'test' => [ + 'Attr.EnableID' => 'true', + ], + "youtube" => [ + "HTML.SafeIframe" => 'true', + "URI.SafeIframeRegexp" => "%^(http://|https://|//)(www.youtube.com/embed/|player.vimeo.com/video/)%", + ], + 'custom_definition' => [ + 'id' => 'html5-definitions', + 'rev' => 1, + 'debug' => false, + 'elements' => [ + // http://developers.whatwg.org/sections.html + ['section', 'Block', 'Flow', 'Common'], + ['nav', 'Block', 'Flow', 'Common'], + ['article', 'Block', 'Flow', 'Common'], + ['aside', 'Block', 'Flow', 'Common'], + ['header', 'Block', 'Flow', 'Common'], + ['footer', 'Block', 'Flow', 'Common'], + + // Content model actually excludes several tags, not modelled here + ['address', 'Block', 'Flow', 'Common'], + ['hgroup', 'Block', 'Required: h1 | h2 | h3 | h4 | h5 | h6', 'Common'], + + // http://developers.whatwg.org/grouping-content.html + ['figure', 'Block', 'Optional: (figcaption, Flow) | (Flow, figcaption) | Flow', 'Common'], + ['figcaption', 'Inline', 'Flow', 'Common'], + + // http://developers.whatwg.org/the-video-element.html#the-video-element + ['video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', [ + 'src' => 'URI', + 'type' => 'Text', + 'width' => 'Length', + 'height' => 'Length', + 'poster' => 'URI', + 'preload' => 'Enum#auto,metadata,none', + 'controls' => 'Bool', + ]], + ['source', 'Block', 'Flow', 'Common', [ + 'src' => 'URI', + 'type' => 'Text', + ]], + + // http://developers.whatwg.org/text-level-semantics.html + ['s', 'Inline', 'Inline', 'Common'], + ['var', 'Inline', 'Inline', 'Common'], + ['sub', 'Inline', 'Inline', 'Common'], + ['sup', 'Inline', 'Inline', 'Common'], + ['mark', 'Inline', 'Inline', 'Common'], + ['wbr', 'Inline', 'Empty', 'Core'], + + // http://developers.whatwg.org/edits.html + ['ins', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']], + ['del', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']], + ], + 'attributes' => [ + ['iframe', 'allowfullscreen', 'Bool'], + ['table', 'height', 'Text'], + ['td', 'border', 'Text'], + ['th', 'border', 'Text'], + ['tr', 'width', 'Text'], + ['tr', 'height', 'Text'], + ['tr', 'border', 'Text'], + ], + ], + 'custom_attributes' => [ + ['a', 'target', 'Enum#_blank,_self,_target,_top'], + ], + 'custom_elements' => [ + ['u', 'Inline', 'Inline', 'Common'], + ], + ], + +]; diff --git a/database/migrations/2021_02_10_091453_create_ratings_table.php b/database/migrations/2021_02_10_091453_create_ratings_table.php new file mode 100644 index 00000000..6e3e24ce --- /dev/null +++ b/database/migrations/2021_02_10_091453_create_ratings_table.php @@ -0,0 +1,40 @@ +id(); + + $table->bigInteger('total')->unsigned()->default(0); + $table->integer('count')->unsigned()->default(1); + $table->float('rating')->unsigned(); + + $table->foreignId('recipes_id')->nullable(); + $table->foreign('recipes_id')->references('id')->on('recipes')->onDelete('cascade'); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('ratings'); + } +} diff --git a/database/migrations/2021_03_01_112145_migrate_old_data_base.php b/database/migrations/2021_03_01_112145_migrate_old_data_base.php index 92238b8d..b7652396 100644 --- a/database/migrations/2021_03_01_112145_migrate_old_data_base.php +++ b/database/migrations/2021_03_01_112145_migrate_old_data_base.php @@ -24,6 +24,7 @@ use App\Models\Products; use App\Models\ProductSliderPictures; use App\Models\QrCodes; use App\Models\Ranges; +use App\Models\Rating; use App\Models\Recipes; use App\Models\Reductions; use App\Models\SalesFamilies; @@ -661,7 +662,7 @@ class MigrateOldDataBase extends Migration 'updated_at' => 'updated_at' ] ], - 'recipe' => [ // ! non utilisé 'recipe_rating' + 'recipe' => [ 'model' => Recipes::class, 'bind' => [ 'id' => 'recipe_id', @@ -740,6 +741,36 @@ class MigrateOldDataBase extends Migration ] ] ], + 'Recipe ratings' => [ + 'table' => 'recipe', + 'comment' => 'Add ratings to recipes', + 'model' => Rating::class, + 'bind' => [ + 'anyprop' => [ + 'apply' => function ($recipe_id) { + $recipe_rating = $this->oldDB->table('recipe_rating') + ->select('recipe_rating_value') + ->where('recipe_rating_recipe_id', '=', $recipe_id) + ->get(); + $count = $recipe_rating->count(); + $sum = $recipe_rating->sum(function ($obj) { + return $obj->recipe_rating_value; + }); + $this->newDB->table('ratings') + ->insert([ + 'total' => $sum, + 'count' => $count, + 'rating' => $count ? floatval($sum / $count) : 0, + 'recipes_id' => $recipe_id, + 'created_at' => date('Y-m-d H:i:s'), + 'updated_at' => date('Y-m-d H:i:s'), + ]); + throw new AbortRowImportException(); + }, + 'name' => 'recipe_id' + ] + ] + ], 'Recipe products' => [ 'table' => 'recipe', 'comment' => 'Add products to recipes', diff --git a/package-lock.json b/package-lock.json index 5676e8d1..6ad57d2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7334,6 +7334,11 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true }, + "rater-js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rater-js/-/rater-js-1.0.1.tgz", + "integrity": "sha512-93MxfiXKfX2LvIIcArtSY4M5C/l5Dg9EioNeQVk1cxnxCuU14A5qXOY0O7DuWlkjBJ930pLUNsOJBcIMUv0oAg==" + }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", diff --git a/package.json b/package.json index dda01db9..7b8492ce 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "fibers": "^5.0.0", "hooper": "^0.3.4", "normalize.css": "^8.0.1", + "rater-js": "^1.0.1", "vue-select-image": "^1.9.0" } } diff --git a/resources/images/recette/bg-recette-video-header.png b/resources/images/recette/bg-recette-video-header.png new file mode 100644 index 00000000..20a9f6d3 Binary files /dev/null and b/resources/images/recette/bg-recette-video-header.png differ diff --git a/resources/images/recette/hoverRecette.png b/resources/images/recette/hoverRecette.png new file mode 100644 index 00000000..66a1901c Binary files /dev/null and b/resources/images/recette/hoverRecette.png differ diff --git a/resources/images/recette/recette_background.jpg b/resources/images/recette/recette_background.jpg new file mode 100644 index 00000000..076121bc Binary files /dev/null and b/resources/images/recette/recette_background.jpg differ diff --git a/resources/js/main.js b/resources/js/main.js index c6e6f73b..e9029269 100644 --- a/resources/js/main.js +++ b/resources/js/main.js @@ -1,7 +1,7 @@ require('@fortawesome/fontawesome-free/js/all'); window.Vue = require('vue'); window.axios = require('axios'); - +window.rater = require('rater-js'); /** * The following block of code may be used to automatically register your * Vue components. It will recursively scan this directory for the Vue diff --git a/resources/sass/_variables.scss b/resources/sass/_variables.scss index fc7a2f45..5c820935 100644 --- a/resources/sass/_variables.scss +++ b/resources/sass/_variables.scss @@ -1,5 +1,26 @@ // Body -$body-bg: #f8fafc; +$body-bg: #fbf8f5; + +// Breaking Points +$large_screen : 1366px; +$big_screen : 1200px; +$desktop : 1024px; +$tablet : 768px; +$mobile : 500px; +$xmobile : 320px; + +$minLscreen : only screen and (min-width: $large_screen); +$minBscreen : only screen and (min-width: $big_screen); +$minDesktop : only screen and (min-width: $desktop); +$minTablet : only screen and (min-width: $tablet); +$minMobile : only screen and (min-width: $mobile); +$minxMobile : only screen and (min-width: $xmobile); + +$max499 : only screen and (max-width: 499px); +$max767 : only screen and (max-width: 767px); +$max1023 : only screen and (max-width: 1023px); +$max1199 : only screen and (max-width: 1199px); +$max1365 : only screen and (max-width: 1365px); // Typography $font-family-sans-serif: 'Nunito', sans-serif; @@ -23,3 +44,20 @@ $theme-colors: ( "primary": #3176C4, "secondary": #E7374B ); + +$color10: #999595; +$color11: #ab9d8e; +$color9: #c6bcb3; +$color1: #f3ebe4; +$color2: #07386a; +$color3: #0f437e; +$color4: #1e5ba1; +$color5: #4e3238; +$color6: #f79e15; +$color8: #ffb504; +$color7: #e02125; +$orange: #ffb400; + +$vegetal: #a2e48b; +$vegetalBodyBG: #8dd175; +$vegetalTitle: #64ab4b; diff --git a/resources/sass/front/_body.scss b/resources/sass/front/_body.scss index 65b1d990..6fa4a4cc 100644 --- a/resources/sass/front/_body.scss +++ b/resources/sass/front/_body.scss @@ -3,13 +3,36 @@ } body { - background-color: #f3ebe4; + background-color: $body-bg; & p { - color: #4e3238; + color: $color5; font-size: 1.5em; font-family: 'Catamaran-Regular'; line-height: 125%; } + & h1, h2, h3, h4, h5, h6 { + color: $color5; + font-family: 'Veneer'; + } + & h1 { + font-size: 7.5em; + } + & h2 { + font-size: 6em; + } + & h3 { + font-size: 4.2em; + } + & h4 { + font-size: 4em; + } + & h5 { + font-size: 3.2em; + } + & h6 { + font-size: 1.5em; + } + } diff --git a/resources/sass/front/_footer.scss b/resources/sass/front/_footer.scss index 2f60b538..48cb13ec 100644 --- a/resources/sass/front/_footer.scss +++ b/resources/sass/front/_footer.scss @@ -1,4 +1,4 @@ -footer { +body > div > footer { display: block; height: 380px; background-color: #0f437e; diff --git a/resources/sass/front/_header.scss b/resources/sass/front/_header.scss index c415a0ae..7795a2a6 100644 --- a/resources/sass/front/_header.scss +++ b/resources/sass/front/_header.scss @@ -1,4 +1,4 @@ -html:not([data-scroll='0']) { +html:not([data-scroll="0"]) { & header { & .logo_site { & img { @@ -9,7 +9,7 @@ html:not([data-scroll='0']) { } } -header { +body > div > header { display: block; background-color: #0f437e; width: 100%; @@ -31,7 +31,7 @@ header { padding: 0; float: right; font-size: 2em; - font-family: 'Veneer'; + font-family: "Veneer"; & ul { display: flex; @@ -76,7 +76,7 @@ header { position: absolute; top: 70px; left: 0; - background-color: #FFFFFF; + background-color: #ffffff; display: flex; flex-direction: row; align-items: center; @@ -102,13 +102,13 @@ header { background-size: cover; & p { - color: #FFFFFF; + color: #ffffff; border-bottom: 3px solid #f79e15; position: relative; font-size: 2.2em; margin-right: 50px; z-index: 20; - font-family: 'Veneer'; + font-family: "Veneer"; } & img { @@ -136,7 +136,8 @@ header { display: flex; flex-direction: row; - & i, [data-icon="chevron-right"] { + & i, + [data-icon="chevron-right"] { color: #f79e15; } @@ -145,7 +146,7 @@ header { font-size: 0.8em; font-weight: bold; margin-left: 10px; - font-family: 'Catamaran-Regular'; + font-family: "Catamaran-Regular"; &:hover { color: #f79e15; diff --git a/resources/sass/front/_icons.scss b/resources/sass/front/_icons.scss new file mode 100644 index 00000000..8fadd470 --- /dev/null +++ b/resources/sass/front/_icons.scss @@ -0,0 +1,27 @@ +[class^="icon-"], [class*=" icon-"] { + font-family: 'icomoon' !important; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; +} + +.icon-notes::before { + content: "\e927"; +} +.icon-preparation::before { + content: "\e931"; +} +.icon-cuisson::before { + content: "\e90b"; +} +.icon-difficulte::before { + content: "\e90e"; +} +.icon-favorite::before { + content: "\e909"; +} +.icon-print::before { + content: "\e920"; +} diff --git a/resources/sass/front/_pagination.scss b/resources/sass/front/_pagination.scss new file mode 100644 index 00000000..88e22386 --- /dev/null +++ b/resources/sass/front/_pagination.scss @@ -0,0 +1,26 @@ +.pagination { + display: block; + text-align: center; + margin: 2em 0; + + li { + display: inline-block; + + &.active span { + color: $color6; + text-decoration: underline; + } + + a,span { + display: block; + font-size: 1.5em; + padding: 0.5em; + margin: 0.5em; + background-color: $color3; + color: $color1; + font-weight: bold; + border-radius: 1px; + border-color: $color8; + } + } +} diff --git a/resources/sass/front/_sub_header.scss b/resources/sass/front/_sub_header.scss index b148ea28..6b652233 100644 --- a/resources/sass/front/_sub_header.scss +++ b/resources/sass/front/_sub_header.scss @@ -472,6 +472,387 @@ } } +.sub_header_recipes { + background-image: url(../images/recette/recette_background.jpg); + width: 100%; + height: 38em; + margin-top: 6em; + overflow: hidden; + background-size: cover; + background-position: center center; + + & .title { + position: absolute; + left: 50%; + top: 0; + transform: translateX(-50%); + margin: 20em 0 0; + width: 100%; + z-index: 1; + + & h1 { + color: white; + text-align: center; + font-size: 7em; + font-family: 'Veneer'; + } + } + + .search-field { + position: absolute; + left: 50%; + top: 0; + transform: translateX(-50%); + margin: 31em 0 0; + width: 70em; + z-index: 1; + + .search{ + width:80%; + svg { + position: absolute; + left: 0.4em; + top: 0.6em; + font-size: 2.6em; + color: #999595; + } + } + + input { + border: none; + float: left; + } + input[type="text"] { + color: #999595; + width: 18em; + height: 2em; + font-family: "CreamyScriptRegular"; + font-size: 2.8em; + border-radius: 0.1em; + padding: 0 0.1em 0 2em; + } + input[type="submit"] { + background: $color5; + color: #fff; + cursor: pointer; + font-size: 1.5em; + font-family: 'Catamaran-Black'; + margin-left: 1.4em; + width: 11em; + height: 3.6em; + border-radius: 0.2em; + text-transform: uppercase; + } + + .checkbox-wrap { + float: right; + margin: 1em 21em 0 0; + display: flex; + align-items: center; + position: relative; + + & > label { + font-family: "CreamyScriptRegular"; + font-size: 3em; + color: #fff; + cursor: pointer; + &.label_video { + display: inline-block; + } + } + + input[type="checkbox"]:not(:checked), + input[type="checkbox"]:checked { + /* Cache la checkbox sans + la rendre invisible aux + lecteurs d'écran */ + position: absolute; + left: 0; + opacity: 0.01; + } + + + input[type="checkbox"] + label { + position: relative; /* permet de positionner la checkbox */ + padding-left: 2.3em; /* place pour la box */ + font-size: 1.05em; + line-height: 1.7; + cursor: pointer; + display: block; + font-family: "CreamyScriptRegular"; + color: #fff; + top: -1em; + right: -1em; + + + &:before { + content: ''; + display: inline-block; + position: absolute; + left: 0; + top: 0; + height: 2em; + width: 2em; + background-color: #fff; + border-color: #e5dace; + border-radius: 0.2em; + border-style: solid; + border-width: 0.2em; + } + + &:after { + position: absolute; + border-left: 0; + border-top: 0; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: #e5dace; + content: "\e902"; + font-family: 'icomoon'; + font-size: 0.8em; + left: 0.5em; + top: 0.5em; + display:none; + } + } + input[type="checkbox"]:checked + label { + &:before { + border: #4e3238; + background: #4e3238; + } + &:after { + display:block; + } + } + } + } + + .wrap-btn-right { + position: absolute; + right: 10%; + top: 235px; + display:block; + + .btn_cplm { + background-color: rgba(255,255,255,0.5); + color: $color5; + display: block; + width: 7em; + height: 2.2em; + font-family: "CreamyScriptRegular"; + font-size: 3em; + line-height: 0.8em; + margin-bottom: 0.5em; + border-radius: 0.2em; + padding: 0.2em 0 0 2.2em; + position: relative; + span { + font-family: 'Veneer'; + font-size: 1em; + display: block; + } + &.propose_recipe { + &:before { + content: "\e932"; + color: $color5; + font-family: 'icomoon' !important; + font-size: 1.3em; + position: absolute; + left: 0.35em; + top: 50%; + margin-top: -0.4em; + } + } + &.favorite_recipe { + &:before { + content: "\e909"; + color: $color5; + font-family: 'icomoon' !important; + font-size: 1em; + position: absolute; + left: 0.5em; + top: 50%; + margin-top: -0.4em; + } + } + } + } +} +.sub_header_recipe { + width: 100%; + height: 46em; + margin-top: 6em; + position : relative; + overflow: hidden; + background-size: cover; + background-position: center center; + + h1 { + font-family: 'Veneer'; + } + h5 { + font-family: 'CreamyScriptRegular'; + color: $color5; + } + + .recipeVisualHeader { + height:100%; + width:50%; + overflow:hidden; + position: relative; + + img { + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%); + min-width: 100%; + min-height: 100%; + width: auto; + height: auto; + overflow: hidden; + } + } + .recipeDetailHeader { + height: 100%; + width: 50%; + left:50%; + position: absolute; + background-color: $color1; + top:0; + + h1 { + color: $color5; + margin-top: 1.5em; + margin-left: 0.5em; + margin-right:0; + text-align: left; + text-decoration: none; + font-size: 5.4em; + line-height: 1em; + width:80%; + } + .recipeTags { + width:80%; + margin-left: 2em; + margin-right:0; + text-align:left; + display:flex; + margin-top: 2em; + + .recipeTag { + font-family: "CreamyScriptRegular"; + background-color: $color6; + color:#FFF; + font-size:2em; + padding:0.1em 0.8em; + margin-right: 0.5em; + border-radius: 1em; + } + } + + .recipeIcons{ + width:80%; + margin-left: 2em; + display: flex; + margin-top: 6em; + + & > div { + width:25%; + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: center; + + h5 { + margin-top: 0.5em; + text-align: center; + font-size: 3em; + line-height: 0.8em; + } + + i { + font-size:4em; + color: $color5; + opacity:0.6; + } + } + + .persons, .preptime, .cooktime { + border-right: 1px solid $color5; + } + + .difficulty { + & > div{ + display: flex; + align-items: center; + height: 5em; + } + .medium i { + font-size:3em; + } + .hard i { + font-size:2.5em; + } + .expert i { + font-size:2em; + } + } + } + } + + &.vegetal { + .recipeDetailHeader { + background-color: $vegetalBodyBG; + h1 { + color: #FFF; + } + .recipeTags { + .recipeTag { + background-color: $vegetalTitle; + } + } + .recipeIcons{ + & > div { + h5 { + color:#FFF; + font-family: 'CreamyScriptRegular'; + } + i { + color: $vegetalTitle; + opacity:1; + } + } + .persons { + border-right: 1px solid transparent; + } + .preptime { + border-right: 1px solid transparent; + } + .cooktime { + border-right: 1px solid transparent; + } + } + } + } +} + +#kitchenSideSubHeader { + height: 53em; + + &:after { + content: " "; + background-image: url(../images/entete.svg); + background-repeat: no-repeat; + background-position: center 100%; + background-size: 101% auto; + height: 101%; + width: 100%; + display: block; + } +} + .sub_header_ocb { width: 100%; height: 370px; diff --git a/resources/sass/front/pages/_kitchenside.scss b/resources/sass/front/pages/_kitchenside.scss new file mode 100644 index 00000000..d6fc215c --- /dev/null +++ b/resources/sass/front/pages/_kitchenside.scss @@ -0,0 +1,352 @@ +.content.kitchenside { + max-width: 100%; + background-image: url(../images/recette/bg-recette-video.jpg); + background-repeat: no-repeat; + background-position: center bottom; + background-size: 100% auto; + position: relative; + + #kitchensideHeader { + width:100%; + position:absolute; + + img { + width:100%; + } + } + + #starRecipes { + max-width: $big_screen; + margin-left: auto; + margin-right: auto; + + header { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + position: relative; + padding-left: 1em; + padding-right: 1em; + + a { + background: $color6; + font-size: 1rem; + color: #fff; + display: block; + height: 2.5em; + line-height: 2.5em; + font-family: "Catamaran-Black"; + padding: 0 1em; + text-transform: uppercase; + border-radius: 0.5em; + position: relative; + } + } + + .list-wrapper { + margin-left: auto; + margin-right: auto; + + h3 { + font-size: 4.8em; + } + + .list-recipe { + display: flex; + justify-content: center; + flex-wrap: wrap; + + .wrap_recipe { + text-align: center; + max-width: 37em; + margin-top: 2em; + margin-bottom: 2em; + + figure { + height: 22em; + margin: 0 2em 2em; + border: 0.5em solid white; + padding: 0; + position: relative; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; + + .hoverFigure { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background-color: rgba(247, 158, 21, 0.7); + z-index: 5; + opacity: 0; + display: flex; + justify-content: center; + align-items: center; + transition: opacity 500ms ease 0s; + + &:hover { + opacity: 1; + } + + h5 { + color: #ffffff; + font-size: 4em; + position: relative; + + &:before { + background-image: url(../images/recette/hoverRecette.png); + display: inline-block; + content: ""; + width: 2.5em; + height: 1em; + position: absolute; + top: -0.8em; + left: 50%; + transform: translateX(-50%); + } + &:after { + background-image: url(../images/recette/hoverRecette.png); + display: inline-block; + content: ""; + width: 2.5em; + height: 1em; + transform: rotate(180deg) translateX(54%); + position: absolute; + top: 1em; + left: 50%; + } + } + } + img { + background: $color5; + min-height: 100%; + min-width: 100%; + width: 100%; + height: auto; + } + } + p { + font-family: "Catamaran-Bold"; + font-size: 1.8em; + padding: 0 1.2em; + text-transform: uppercase; + &:last-child { + color: $color6; + font-family: "CreamyScriptRegular"; + font-size: 2.8em; + text-transform: none; + text-shadow: 0.05em 0 0 #4e3238, -0.05em 0 0 #4e3238, + 0 0.05em 0 #4e3238, 0 -0.05em 0 #4e3238, 0.05em 0.05em #4e3238, + -0.05em -0.05em 0 #4e3238, 0.05em -0.05em 0 #4e3238, + -0.05em 0.05em 0 #4e3238; + } + } + } + } + } + } + + // TODO: test and modify css rules here with video recipes (put size in em or rem) + #videoRecipes { + padding: 130px 0 130px; + + h3 { + text-align: center; + padding: 0 15px; + + &:before { + background-image: url("../images/recette/deco_title.png"); + display: inline-block; + content: ""; + width: 39px; + height: 46px; + position: relative; + top: 5px; + left: -10px; + } + + &:after { + background-image: url("../images/recette/deco_title.png"); + display: inline-block; + content: ""; + width: 39px; + height: 46px; + -ms-transform: rotate(180deg); + -webkit-transform: rotate(180deg); + transform: rotate(180deg); + position: relative; + top: 5px; + left: 10px; + } + } + + .videoRecipe { + background: none; + margin-top: 25px; + overflow: hidden; + display: flex; + justify-content: center; + + .carousel-cell { + display: block; + background: none; + text-align: center; + width: 750px; + height: auto; + + &.main-video { + display: block; + } + + .fancybox-recipe { + width: 100%; + + .wrap-video { + overflow: hidden; + background: $color5; + width: 750px; + height: 425px; + position: relative; + + img { + min-width: 100%; + min-height: 100%; + width: auto; + height: auto; + } + + &::before { + position: absolute; + content: "\f04b"; + font-family: "FontAwesome"; + text-shadow: 0px 0px 10px #000000; + color: $color1; + opacity: 0.8; + font-size: 8em; + top: 50%; + left: 50%; + z-index: 1; + transform: translate(-50%, -70%); + } + } + } + + .caption { + color: $color5; + font-family: "CreamyScriptRegular"; + font-size: 40px; + } + + &:before { + display: none; + } + } + } + + .videoRecipe { + width: 100%; + margin-top: 40px; + display: none; + @media screen and (max-width: $tablet) { + display: flex; + justify-content: center; + } + a { + background: $color7; + font-size: 15px; + color: #fff; + display: flex; + justify-content: center; + align-items: center; + min-height: 40px; + line-height: 20px; + font-family: "Catamaran-Black"; + padding: 0 20px 4px; + text-transform: uppercase; + -webkit-border-radius: 20px; + -moz-border-radius: 20px; + border-radius: 20px; + position: relative; + width: 60%; + } + } + } + + #btnEnd { + max-width: $big_screen; + margin-left: auto; + margin-right: auto; + .wrap_btn { + display: flex; + justify-content: space-around; + flex-wrap: wrap; + + .shadow_btn { + background-image: url(../images/recette/shadow_btn.png); + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom: 6rem; + width: auto; + + } + .btn_inner { + background: $color6; + border-radius: 0.8em; + display: block; + width: 34rem; + height: 18rem; + padding: 4em; + + h4 { + font-family: "Veneer"; + font-size: 6em; + line-height: 1em; + padding-bottom: 0; + text-align: right; + } + + .sub_title { + font-family: "CreamyScriptRegular"; + font-size: 3.5em; + line-height: 0.9em; + padding-top: 0.5em; + text-align: right; + } + + &.health-nutrition { + background-image: url(../images/recette/sante_nutrition.jpg); + background-size: cover; + position: relative; + overflow: hidden; + + h4, .sub_title { + color: #fff; + position: relative; + } + } + + &.club-tips { + background-image: url(../images/recette/astuce.jpg); + background-size: cover; + position: relative; + overflow: hidden; + color: #f79e15; + + h4 { + color: $color6; + position: relative; + } + + .sub_title { + position: relative; + } + } + } + } + } +} diff --git a/resources/sass/front/pages/_recipe.scss b/resources/sass/front/pages/_recipe.scss new file mode 100644 index 00000000..94f96f57 --- /dev/null +++ b/resources/sass/front/pages/_recipe.scss @@ -0,0 +1,472 @@ +.content.recipe { + display: flex; + flex-wrap: wrap; + + .share { + margin-top: 2em; + position: absolute; + width: 50%; + left: 50%; + + a { + background-color: #f1e8df; + border-radius: 50%; + display: inline-block; + height: 2em; + font-size: 3em; + line-height: 2em; + margin: 0 0.15em; + text-align: center; + width: 2em; + + i, + svg { + color: #bcafa1; + font-size: inherit; + position: relative; + top: 0.1em; + } + } + } + + aside { + width: 50%; + display: flex; + flex-direction: column; + align-items: center; + + figure { + width: 60%; + margin-top: 4em; + + img { + width: 49%; + height: auto; + &.solo { + width: 80%; + } + } + } + + h3 { + width: auto; + text-align: center; + border-bottom: 0.08em solid $color6; + margin-top: 1.5em; + margin-bottom: 1.2em; + } + + ul, + p { + width: 70%; + font-family: "CreamyScriptRegular"; + font-size: 3em; + color: $color5; + } + + ul li, + p { + margin-bottom: 0.4em; + padding-left: 1em; + position: relative; + + &::before { + content: "• "; + color: $color6; + font-size: 1.9em; + left: 0; + line-height: 1em; + position: absolute; + top: -0.2em; + } + } + } + + section { + width: 50%; + margin-top: 10em; + + header { + h2 { + font-size: 3.5em; + color: $color6; + margin-top: 0.6em; + font-family: "CreamyScriptRegular"; + line-height: 86%; + margin-bottom: 18px; + text-decoration: none; + } + } + + .preparation { + margin-top: 4em; + + ul,ol { + padding-top: 3em; + border-top: 0.1em solid #e4e8ec; + font-family: "Catamaran-Regular"; + font-size: 1.5em; + + li { + color: $color5; + margin-bottom: 0.8em; + padding-left: 1.5em; + position: relative; + + &::before { + content: ">"; + color: $color6; + font-size: 2.1em; + left: 0; + top: -0.15em; + line-height: 1em; + position: absolute; + font-weight: bold; + } + } + } + } + + .advice { + h3 { + margin-top: 1em; + } + + p { + padding-top: 2em; + border-top: 0.1em solid #e4e8ec; + } + } + + .tips { + h3 { + margin-top: 50px; + border-bottom: 1px solid #e4e8ec; + } + .tip { + margin-top: 40px; + + a { + display: flex; + flex-direction: row; + align-items: center; + + p { + text-transform: uppercase; + font-weight: bold; + font-size: 2em; + margin-left: 20px; + } + + figure { + height: 100px; + width: 150px; + min-width: 150px; + overflow: hidden; + position: relative; + + img { + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translateX(-50%) translateY(-50%); + transform: translateX(-50%) translateY(-50%); + min-width: 100%; + min-height: 100%; + width: 100%; + height: auto; + overflow: hidden; + } + } + } + } + } + } + + footer { + width: 100%; + margin-top: 4em; + display: flex; + flex-direction: column; + + .rating { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + + h5 { + padding: 5px; + font-family: "CreamyScriptRegular"; + + &.ratingShare { + padding-left: 0.6em; + border-left: 1px solid #bcafa1; + } + } + a { + display: inline-block; + font-size: 2.6em; + text-align: center; + width: 1.5em; + + i, + svg { + color: #bcafa1; + font-size: inherit; + position: relative; + top: 0.1em; + } + } + } + + .buttons { + width: 100%; + display: flex; + justify-content: center; + flex-wrap: wrap; + + .btn_cplm { + background-color: $color1; + color: #bcafa1; + display: block; + width: 7em; + height: 2.5em; + font-family: "CreamyScriptRegular"; + font-size: 3em; + line-height: 1em; + margin: 0.5em; + border-radius: 0.2em; + padding: 0.3em 0 0 2.5em; + position: relative; + + span { + font-family: "Veneer"; + font-size: 0.9em; + display: block; + } + + &.proposeRecipe { + &:before { + content: "\e932"; + color: #bcafa1; + font-family: "icomoon" !important; + font-size: 1.4em; + position: absolute; + left: 0.4em; + top: 50%; + transform: translateY(-50%); + } + &:hover { + background-color: #e97b24; + color: white; + &:before { + color: white; + } + } + } + &.favoriteRecipe { + &:before { + content: "\e909"; + color: #bcafa1; + font-family: "icomoon" !important; + font-size: 1.4em; + position: absolute; + left: 0.4em; + top: 50%; + transform: translateY(-50%); + } + &:hover { + background-color: #46c695; + color: white; + &:before { + color: white; + } + } + } + &.printRecipe { + &:before { + content: "\e920"; + color: #bcafa1; + font-family: "icomoon" !important; + font-size: 1.4em; + position: absolute; + left: 0.4em; + top: 50%; + transform: translateY(-50%); + } + &:hover { + background-color: #25b9e9; + color: white; + &:before { + color: white; + } + } + } + &.myNotes { + padding-left: 2.5em; + + &:before { + content: "\e928"; + color: #bcafa1; + font-family: "icomoon" !important; + font-size: 1.4em; + position: absolute; + left: 0.4em; + top: 50%; + transform: translateY(-50%); + } + + &:hover { + background-color: #1a5aa4; + color: white; + &:before { + color: white; + } + } + } + } + } + } + &.vegetal { + aside { + h3 { + border-bottom: 0.08em solid $vegetal; + } + + ul li, p { + &::before { + color: $vegetal; + } + } + } + section { + header { + h2 { + color: $vegetalTitle; + } + } + .preparation { + ul { + li { + &::before { + color: $vegetal; + } + } + } + } + } + } +} + +.associatedRecipe { + width: 100%; + text-align: center; + background-color: $color1; + + .list-wrapper { + margin-left: auto; + margin-right: auto; + padding-top: 4rem; + + h3 { + font-size: 4.8em; + } + + .list-recipe { + display: flex; + justify-content: center; + flex-wrap: wrap; + + .wrap_recipe { + text-align: center; + max-width: 37em; + margin-top: 2em; + margin-bottom: 2em; + + figure { + height: 22em; + margin: 0 2em 2em; + border: 0.5em solid white; + padding: 0; + position: relative; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; + + .hoverFigure { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background-color: rgba(247, 158, 21, 0.7); + z-index: 5; + opacity: 0; + display: flex; + justify-content: center; + align-items: center; + transition: opacity 500ms ease 0s; + + &:hover { + opacity: 1; + } + + h5 { + color: #ffffff; + font-size: 4em; + position: relative; + + &:before { + background-image: url(../images/recette/hoverRecette.png); + display: inline-block; + content: ""; + width: 2.5em; + height: 1em; + position: absolute; + top: -0.8em; + left: 50%; + transform: translateX(-50%); + } + &:after { + background-image: url(../images/recette/hoverRecette.png); + display: inline-block; + content: ""; + width: 2.5em; + height: 1em; + transform: rotate(180deg) translateX(54%); + position: absolute; + top: 1em; + left: 50%; + } + } + } + img { + background: $color5; + min-height: 100%; + min-width: 100%; + width: 100%; + height: auto; + } + } + p { + font-family: "Catamaran-Bold"; + font-size: 1.8em; + padding: 0 1.2em; + text-transform: uppercase; + &:last-child { + color: $color6; + font-family: "CreamyScriptRegular"; + font-size: 2.8em; + text-transform: none; + text-shadow: 0.05em 0 0 #4e3238, -0.05em 0 0 #4e3238, + 0 0.05em 0 #4e3238, 0 -0.05em 0 #4e3238, 0.05em 0.05em #4e3238, + -0.05em -0.05em 0 #4e3238, 0.05em -0.05em 0 #4e3238, + -0.05em 0.05em 0 #4e3238; + } + } + } + } + } +} diff --git a/resources/sass/front/pages/_recipes.scss b/resources/sass/front/pages/_recipes.scss new file mode 100644 index 00000000..3456f720 --- /dev/null +++ b/resources/sass/front/pages/_recipes.scss @@ -0,0 +1,216 @@ +.content.recipes { + max-width:100%; + margin: 0 auto; + + & .recipeList{ + max-width: $big_screen; + margin-top: 50px; + margin-left: auto; + margin-right: auto; + display: flex; + flex-wrap: wrap; + justify-content: space-around; + .recipeWrapper { + text-align: center; + max-width:371px; + margin-top:25px; + margin-bottom:25px; + figure { + height: 236px; + margin: 8px 8px 27px; + border: 8px solid white; + padding: 0; + position: relative; + display:flex; + align-items: center; + justify-content: center; + overflow: hidden; + .hoverFigure{ + position:absolute; + top:0; + left: 0; + height: 100%; + width: 100%; + background-color: rgba(247, 158, 21, 0.7); + z-index:5; + opacity: 0; + display: flex; + justify-content: center; + align-items: center; + transition: opacity 500ms ease 0s; + &:hover{ + opacity: 1; + } + h5{ + color:#FFFFFF; + font-size:4em; + position: relative; + &:before { + background-image: url(../images/recette/hoverRecette.png); + display: inline-block; + content: ""; + width: 100px; + height: 35px; + position: absolute; + top: -40px; + left: 50%; + transform: translateX(-50%); + } + &:after { + background-image: url(../images/recette/hoverRecette.png); + display: inline-block; + content: ""; + width: 100px; + height: 35px; + transform: rotate(180deg) translateX(54%); + position: absolute; + top: 45px; + left: 50%; + } + } + } + img { + background: $color5; + min-height:100%; + min-width: 100%; + width:100%; + height:auto; + } + } + p { + font-family: 'Catamaran-Bold'; + font-size: 18px; + padding: 0 40px; + text-transform: uppercase; + &:last-child { + color: $color6; + font-family: "CreamyScriptRegular"; + font-size: 26px; + text-transform: none; + text-shadow: 1px 0 0 #4e3238, -1px 0 0 #4e3238, 0 1px 0 #4e3238, 0 -1px 0 #4e3238, 1px 1px #4e3238, -1px -1px 0 #4e3238, 1px -1px 0 #4e3238, -1px 1px 0 #4e3238; + } + } + } + + h3 { + text-align: center; + margin-bottom: 2em; + } + } + + & .recipes-filter { + + span { + cursor: pointer; + } + + ul.recipeFilterMenu { + background-color: $color6; + position: relative; + z-index: 15; + margin: 0 auto; + display: block !important; + + & > li { + float: left; + width: 25%; + margin: 0 auto; + text-align: center; + border-right: 1px solid #fed67f; + + &:hover { + .ssmenu { + display: block; + } + a,i { + color: $color5; + } + } + + &.active { + & > a, & > span { + color: white; + } + } + + & > a, & > span { + text-align: center; + } + + .ssmenu { + display: none; + position: absolute; + width: 25%; + padding: 18px 0 21px 44px; + display: none; + z-index: 999; + background-color: #ffffff; + box-shadow: 0px 5px 5px 0px #444444; + + a { + display: block; + text-align: left; + padding: 0; + color: $color5; + + &:hover { + color: $color6; + } + } + li.active { + a { + color: $color6; + } + } + } + } + + a, label, span { + font-family: 'CreamyScriptRegular'; + color: #ffffff; + &:hover { + color: $color5; + } + } + + a, span { + text-align: left; + display: block; + font-size: 3em; + height:100%; + display: flex; + justify-content: center; + align-items: center; + padding: 30px 0; + text-align: left; + + & > h5 { + color:#FFFFFF; + font-size:1em; + } + + &:hover { + color: $color5; + h5{ + color: $color5; + } + i { + color: $color5; + } + } + & > svg { + display: inline-block; + padding-left: 10px; + } + } + & > label { + display: inline-block; + max-width: 100%; + margin-right: 21px; + font-family: 'CreamyScriptRegular'; + color: #ffffff; + font-size: 3em; + } + } + } +} diff --git a/resources/sass/main.scss b/resources/sass/main.scss index 6eb44965..02494339 100644 --- a/resources/sass/main.scss +++ b/resources/sass/main.scss @@ -1,5 +1,8 @@ @import "~normalize.css/normalize.css"; @import "~@fortawesome/fontawesome-free/css/all.min.css"; +@import "~rater-js/lib/style.css"; + +@import "variables"; @import "front/reset"; @import "front/fonts"; @import "front/body"; @@ -7,6 +10,8 @@ @import "front/sub_header"; @import "front/footer"; @import "front/icon"; +@import "front/pagination"; +@import "front/icons"; .pattern { background-repeat: repeat; @@ -64,11 +69,9 @@ @import "front/pages/home"; -@import "front/pages/products"; -@import "front/pages/product"; -@import "front/pages/legals"; -@import "front/pages/traceability"; -@import "front/pages/quality"; +@import "front/pages/kitchenside"; +@import "front/pages/recipes"; +@import "front/pages/recipe"; @import "front/pages/ocb/index"; @import "front/pages/ocb/breeder"; diff --git a/resources/views/front/icons/chevron-down.blade.php b/resources/views/front/icons/chevron-down.blade.php new file mode 100644 index 00000000..23e4e0a6 --- /dev/null +++ b/resources/views/front/icons/chevron-down.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/front/icons/facebook.blade.php b/resources/views/front/icons/facebook.blade.php new file mode 100644 index 00000000..e824012f --- /dev/null +++ b/resources/views/front/icons/facebook.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/front/icons/instagram.blade.php b/resources/views/front/icons/instagram.blade.php new file mode 100644 index 00000000..f5a5849e --- /dev/null +++ b/resources/views/front/icons/instagram.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/front/icons/pinterest.blade.php b/resources/views/front/icons/pinterest.blade.php new file mode 100644 index 00000000..e9b05afa --- /dev/null +++ b/resources/views/front/icons/pinterest.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/front/icons/search.blade.php b/resources/views/front/icons/search.blade.php new file mode 100644 index 00000000..495d2d4e --- /dev/null +++ b/resources/views/front/icons/search.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/front/icons/twitter.blade.php b/resources/views/front/icons/twitter.blade.php new file mode 100644 index 00000000..56757ff1 --- /dev/null +++ b/resources/views/front/icons/twitter.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/front/kitchenside.blade.php b/resources/views/front/kitchenside.blade.php new file mode 100644 index 00000000..b750c284 --- /dev/null +++ b/resources/views/front/kitchenside.blade.php @@ -0,0 +1,84 @@ +@extends('layouts.app') +@section('title', __('Côté cuisine')) +@section('description', __('Découvrez des recettes pour toutes les occasions, des conseils pour mieux comprendre la nutrition et des astuces Le Gaulois pour ne jamais rater sa volaille.')) +@section('sub_header') +
+ @include('front.recipes.index-header', ['title' => __('La Vie Coté Cuisine')]) +
+@endsection + +@section('content') +
+ +
+ + + + +
+ + @if(count($featuredRecipes)) +
+
+

{{ __('Les recettes du moment') }}

+ {{ __('Toutes les recettes') }} +
+
+ +
+
+ @endif + + @if(count($videoRecipes)) +
+

{{ __('Les recettes en vidéo') }}

+ + +
+ @endif + +
+ +
+
+@endsection + diff --git a/resources/views/front/recipes/index-header.blade.php b/resources/views/front/recipes/index-header.blade.php new file mode 100644 index 00000000..d87cddd1 --- /dev/null +++ b/resources/views/front/recipes/index-header.blade.php @@ -0,0 +1,29 @@ +
+

{{ $title }}

+
+
+
+ + +
+ +
+ query('video_recipe'))checked @endif> + +
+
+
+
+
+ {{ __('Proposer') }} {{ __('Une recette') }} + {{-- TODO: mettre condition ici si user connected --}} + {{-- IF CUSTOMER CONNECTED --}} + {{ __('Recettes') }} {{ __('Favorites') }} + {{-- ELSE --}} + {{ __('Recettes') }} {{ __('Favorites') }} + {{-- ENDIF --}} +
+ diff --git a/resources/views/front/recipes/index.blade.php b/resources/views/front/recipes/index.blade.php new file mode 100644 index 00000000..cc4ebb7a --- /dev/null +++ b/resources/views/front/recipes/index.blade.php @@ -0,0 +1,39 @@ +@extends('layouts.app') +@section('title', __('Toutes les recettes')) +@section('description', __('Envie de préparer des plats gourmands avec de la volaille 100% française ? Le Gaulois a la +solution avec ses recettes faciles et originales')) + +@section('sub_header') +
+ @include('front.recipes.index-header', ['title' => __('Les Recettes')]) +
+@endsection + +@section('content') +
+ @include('front.recipes.recipes-filter') + {{ $recipes->withQueryString()->links() }} +
+ @if(count($recipes)) + @foreach($recipes as $recipe) + + @endforeach + @else +

{{ __('Aucun résultat') }}

+ @endif +
+ {{ $recipes->withQueryString()->links() }} +
+@endsection + diff --git a/resources/views/front/recipes/recipes-filter.blade.php b/resources/views/front/recipes/recipes-filter.blade.php new file mode 100644 index 00000000..3f51b265 --- /dev/null +++ b/resources/views/front/recipes/recipes-filter.blade.php @@ -0,0 +1,102 @@ + + diff --git a/resources/views/front/recipes/show.blade.php b/resources/views/front/recipes/show.blade.php new file mode 100644 index 00000000..7f50f2b5 --- /dev/null +++ b/resources/views/front/recipes/show.blade.php @@ -0,0 +1,239 @@ +@extends('layouts.app') +@section('title', $recipe->title) +@section('description', __('Recette de cuisine - :recipeTitle', ['recipeTitle' => $recipe->title])) + +@section('sub_header') +
+
+ @if($recipe->type->equals(RecipeType::video())) + + @else + {{ $recipe->title }} + @endif +
+
+

{{ $recipe->title }}

+ @if(strlen($recipe->tags)) +
+ @foreach(explode(',', $recipe->tags) as $tag) + @if(strlen($tag)) +
{{ $tag }}
+ @endif + @endforeach +
+ @endif +
+ @if($recipe->number_people) +
+ +
{{ __(':count personne(s)', ['count' => $recipe->number_people]) }}
+
+ @endif + @if($recipe->preparation_time) +
+ +
{!! sprintf(__(':time min %s de préparation', ['time' => $recipe->preparation_time]), '
') !!}
+
+ @endif + @if($recipe->cooking_time) +
+ +
{!! sprintf(__(':time min %s de cuisson', ['time' => $recipe->cooking_time]), '
') !!}
+
+ @endif +
+
+ @for($i = 0; $i < $recipe->difficulty->value; $i++) + + @endfor +
+
{{ $recipe->difficulty }}
+
+
+
+
+@endsection + +@section('content') +
+ + + @if($recipe->ingredients) + + @endif + +
+ @if(strlen($recipe->catch_phrase)) +
+

"{{ $recipe->catch_phrase }}"

+
+ @endif + + @if(strlen($recipe->preparation)) +
+

{{ __('Préparation') }}

+
{!! clean($recipe->preparation) !!}
+
+ @endif + + @if(strlen($recipe->advice)) +
+

{{ __('Le Conseil Le Gaulois') }}

+
{!! clean($recipe->advice) !!}
+
+ @endif + + @if(count($recipe->articles)) + + @endif + + {{-- TODO: Missing notes on legaulois2020 + {% if notes|length > 0 %} +
+

Mes Notes

+

{{notes}}

+
+ {% endif %} --}} + +
+ + +
+
+
+

{{ __('Recettes qui pourraient vous intéresser') }}

+
+ @foreach($recipe->associatedRecipes() as $rcp) + + @endforeach +
+
+
+{{-- + + + --}} +@endsection + +@push('scripts') + +@endpush + diff --git a/resources/views/layouts/app-header.blade.php b/resources/views/layouts/app-header.blade.php index 6bc68140..1ef83b40 100644 --- a/resources/views/layouts/app-header.blade.php +++ b/resources/views/layouts/app-header.blade.php @@ -21,7 +21,7 @@