diff --git a/app/Http/Controllers/ChampionController.php b/app/Http/Controllers/ChampionController.php index 4994d61..0a8c14c 100644 --- a/app/Http/Controllers/ChampionController.php +++ b/app/Http/Controllers/ChampionController.php @@ -47,7 +47,11 @@ class ChampionController extends Controller */ public function show(Champion $champion) { - // + $champion = Cache::remember('championShowCache' . $champion->slug, 60 * 60 * 8, function () use ($champion) { + return $champion->load('skins', 'lanes'); + }); + + return view('champions.show', compact('champion')); } /** diff --git a/app/Models/Champion.php b/app/Models/Champion.php index b4e7b7e..2c198aa 100644 --- a/app/Models/Champion.php +++ b/app/Models/Champion.php @@ -42,6 +42,11 @@ class Champion extends Model ]; } + public function getRouteKeyName(): string + { + return 'slug'; + } + public function skins(): HasMany { return $this->hasMany(ChampionSkin::class); diff --git a/resources/css/app.css b/resources/css/app.css index b5c61c9..18258ec 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,3 +1,35 @@ @tailwind base; @tailwind components; @tailwind utilities; + +.glow-shadow::before { + content: ""; + position: absolute; + inset: 0; + border-radius: 1rem; + background: linear-gradient(90deg, rgba(239, 148, 61, 0.7), rgba(245, 101, 35, 0.7)); + opacity: 0; + filter: blur(5px); + animation: glow 4s infinite; +} + +@keyframes glow { + 0% { + opacity: 0.5; + filter: blur(8px); + } + 50% { + opacity: 0.2; + filter: blur(13px); + } + 100% { + opacity: 0.5; + filter: blur(8px); + } +} + +@media (prefers-reduced-motion: reduce) { + .glow-shadow::before { + display: none; + } +} diff --git a/resources/views/champions/show.blade.php b/resources/views/champions/show.blade.php new file mode 100644 index 0000000..6bde8c2 --- /dev/null +++ b/resources/views/champions/show.blade.php @@ -0,0 +1,53 @@ + + + +
+ + + + + + + + + + + + + + +Heimerdinger Presents:
+