Skip to content

Commit 40daecb

Browse files
committed
chore: revert to native php function
The function starts_with only exists at Laravel context and need to be imported. The function str_starts_with is native of PHP. Signed-off-by: Vitor Mattos <[email protected]>
1 parent e874b10 commit 40daecb

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

source/_layouts/team-member.blade.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,18 @@
3333
<div class="col-lg-12">
3434
<div class="ud-single-team wow fadeInUp" data-aos-delay=".1s">
3535
<div class="ud-team-image-wrapper">
36-
@if(starts_with($page->gravatar, '/'))
37-
<img
38-
src="{{ $page->baseUrl . $page->gravatar }}"
39-
alt="{{ $page->name }}"
40-
class="shape shape-1 mb-5"
41-
/>
42-
@else
43-
<img
44-
src="https://www.gravatar.com/avatar/{{$page->gravatar}}?size=170"
45-
alt="{{ $page->name }}"
46-
class="shape shape-1 mb-5"
47-
/>
48-
@endif
36+
@php
37+
if (str_starts_with($page->gravatar, '/')) {
38+
$gravatar = $page->baseUrl . $page->gravatar;
39+
} else {
40+
$gravatar = 'https://www.gravatar.com/avatar/' . $page->gravatar . '?size=170';
41+
}
42+
@endphp
43+
<img
44+
src="{{ $gravatar }}"
45+
alt="{{ $page->name }}"
46+
class="shape shape-1 mb-5"
47+
/>
4948
</div>
5049
@if($page->social)
5150
<ul class="ud-team-socials">

0 commit comments

Comments
 (0)