fipamo/resources/views/includes/recent-meta.blade.php
ro c85e145774
added getbyIndex for pages, urlencode page titles
the theme controller was grabbing the index by its page name, which was
bad because that might change. that was replaced with a getById function
since the index id will always be 0 since it's the first page. this is a
seperate function from getByUuid which is a unique indentifier for each
page which was being used interchangably before the fix. all of those
references have been cleaned up to reference which type of id is needed

there was also a bug that happened on rendering when there were special
characters in the title. this was solved by saving the title as a
urlencoded string and then just decodded when it was needed for display
on the front end
2024-09-04 14:32:36 -06:00

56 lines
1.2 KiB
PHP

@php
if($page['menu'] == 'true')
{
$menu = 'true';
}else{
$menu = 'false';
}
if($page['published'] == 'true')
{
$published = 'true';
}else{
$published = 'false';
}
if($page['featured'] == 'true')
{
$featured = 'true';
}else{
$featured = 'false';
}
@endphp
<aside>
<strong>
{{ $page['updated'] }}
</strong>
<hr/>
<strong>
@php
$title = urldecode($page['title']);
@endphp
{{ $title }}
</strong>
<hr/>
<button data-active="{{ $menu }}">
<svg id="option-menu-pin" class="icon">
<use id="option-menu-pin" xlink:href="/assets/images/global/sprite.svg#entypo-pin"/>
</svg>
</button>
<button data-active="{{ $published }}">
<svg id="option-published-icon" class="icon">
<use id="option-published-icon" xlink:href="/assets/images/global/sprite.svg#entypo-globe"/>
</svg>
</button>
<button data-active="{{ $featured }}">
<svg id="option-feature-icon" class="icon">
<use id="option-feature-icon" xlink:href="/assets/images/global/sprite.svg#entypo-star"/>
</svg>
</button>
</aside>