- Added Database page. - Added Xenforo API compatibility - Added Hovercard - Added Notifications
45 lines
879 B
PHP
45 lines
879 B
PHP
<?php
|
|
|
|
namespace App\View\Components;
|
|
|
|
use App\Models\Entry;
|
|
use Closure;
|
|
use Illuminate\Contracts\View\View;
|
|
use Illuminate\View\Component;
|
|
|
|
class EntryCard extends Component
|
|
{
|
|
|
|
/**
|
|
* Acronym for entry badge.
|
|
* TODO: Add in common.css other colors.
|
|
*/
|
|
public const array ENTRY_TYPES_BADGE = [
|
|
'translations' => "Trans",
|
|
'romhacks' => 'Hack',
|
|
'homebrew' => 'HBrew',
|
|
'utilities' => 'Util',
|
|
'documents' => 'Doc',
|
|
'lua-scripts' => 'Lua',
|
|
'tutorials' => 'Tuto'
|
|
];
|
|
|
|
/**
|
|
* Create a new component instance.
|
|
*/
|
|
public function __construct(
|
|
public Entry $entry,
|
|
)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Get the view / contents that represent the component.
|
|
*/
|
|
public function render(): View|Closure|string
|
|
{
|
|
return view('components.entry-card');
|
|
}
|
|
}
|