Add icon for slider
continuous-integration/drone/push Build is passing Details

This commit is contained in:
philipp lang 2021-10-31 10:04:35 +01:00
parent 1ba46f7532
commit 091a9a5bde
2 changed files with 6 additions and 1 deletions

View File

@ -23,7 +23,7 @@
{{post.intro}} … {{post.intro}} …
</div> </div>
<div class="flex px-6 py-3 bg-gray-100 items-center border border-t"> <div class="flex px-6 py-3 bg-gray-100 items-center border border-t">
{{'facebook-square'|sprite('w-6 h-6 mr-3 fill-current text-primary-500')}} {{post.page.icon|sprite('w-6 h-6 mr-3 fill-current text-primary-500')}}
<span class="text-sm text-gray-600">Beitrag anschauen</span> <span class="text-sm text-gray-600">Beitrag anschauen</span>
</div> </div>
</a> </a>

View File

@ -74,6 +74,11 @@ class Page extends Model
return 'social/'.$this->slug.'/'; return 'social/'.$this->slug.'/';
} }
public function getIconAttribute(): string
{
return "{$this->type}-slider";
}
public function beforeDelete() { public function beforeDelete() {
$this->posts->each->delete(); $this->posts->each->delete();