Skip to content

Commit 6dcacf0

Browse files
committed
Update various files and folders for Minecraft section and general setup
1 parent ed9fdfe commit 6dcacf0

6 files changed

Lines changed: 36 additions & 3 deletions

File tree

app/Providers/AppServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Illuminate\Support\Facades\View;
1313
use Illuminate\Support\ServiceProvider;
1414
use Illuminate\Validation\Rules\Password;
15-
15+
use Illuminate\Support\Facades\Blade;
1616
class AppServiceProvider extends ServiceProvider
1717
{
1818
/**
@@ -82,6 +82,9 @@ function ($view) {
8282
);
8383
});
8484

85+
// Register the Minecraft Blade component
86+
Blade::component('homepage.minecraft', 'minecraft');
87+
8588
$this->bootAuth();
8689
$this->bootEvent();
8790
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\View\Components;
4+
5+
use Closure;
6+
use Illuminate\Contracts\View\View;
7+
use Illuminate\View\Component;
8+
9+
class MinecraftSection extends Component
10+
{
11+
/**
12+
* Create a new component instance.
13+
*/
14+
public function __construct()
15+
{
16+
//
17+
}
18+
19+
/**
20+
* Get the view / contents that represent the component.
21+
*/
22+
public function render(): View|Closure|string
23+
{
24+
return view('components.minecraft-section');
25+
}
26+
}
10.3 KB
Binary file not shown.
5.82 KB
Loading

resources/views/homepage/minecraft.blade.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111

1212
<div class="flex flex-col justify-center tablet:max-w-[322px] max-tablet:w-full max-tablet:min-w-0 max-sm:w-full max-tablet:text-center max-tablet:px-8">
1313
<div class="flex flex-col w-full max-tablet:pt-[15px]">
14-
<img loading="lazy" src="/images/homepage/minecraftlogo.png" alt="Minecraft Education logo" class="max-w-[350px] object-contain mx-auto w-full aspect-[2.4]" />
14+
<picture>
15+
<source type="image/avif" srcset="/images/avif/homepage/minecraftlogo.avif">
16+
<source type="image/webp" srcset="/images/webp/homepage/minecraftlogo.webp">
17+
<img loading="lazy" src="/images/homepage/minecraftlogo.png" alt="Minecraft Education logo" class="max-w-[350px] object-contain mx-auto w-full aspect-[2.4]" />
18+
</picture>
1519
</div>
1620
<p class="text-xl font-bold leading-truly-normal text-secondary">
1721
Team up with Minecraft Education for EU Code Week! Discover how Minecraft Education can teach coding and AI skills.

resources/views/static/home.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</section>
3232

3333
{{-- Include the Minecraft section here --}}
34-
@include('homepage.minecraft')
34+
<x-minecraft />
3535

3636
<section class="sub-section" id="organize-activity">
3737

0 commit comments

Comments
 (0)