Skip to content

Commit 9eb234c

Browse files
joelbutcherJoel Butcherdriesvints
authored
Add a new default avatar using a greyscale Laravel logo (#759)
* added new default avatar * added tests * use laravelio logo * use lighter gray * fix tests * wip * wip * wip Co-authored-by: Joel Butcher <[email protected]> Co-authored-by: Dries Vints <[email protected]>
1 parent 3e13297 commit 9eb234c

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/images/laravelio-icon-gray.svg

+10
Loading

public/images/laravelio-logo.svg

+1-1
Loading

resources/views/components/avatar.blade.php

+15-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@
77
<a href="{{ route('profile', $user->username()) }}">
88
@endunless
99

10-
<x-buk-avatar
11-
:search="$user->githubUsername()"
12-
provider="github"
13-
:fallback="asset('/images/user.svg')"
14-
:alt="$user->name()"
15-
{{ $attributes->merge(['class' => 'rounded-full text-gray-500']) }}
16-
/>
10+
@if ($user->githubUsername())
11+
<x-buk-avatar
12+
:search="$user->githubUsername()"
13+
provider="github"
14+
:fallback="asset('/images/laravelio-icon-gray.svg')"
15+
:alt="$user->name()"
16+
{{ $attributes->merge(['class' => 'bg-gray-50 rounded-full']) }}
17+
/>
18+
@else
19+
<img
20+
src="{{ asset('images/laravelio-icon-gray.svg') }}"
21+
alt="{{ $user->name() }}"
22+
{{ $attributes->merge(['class' => 'bg-gray-50 rounded-full']) }}
23+
/>
24+
@endif
1725

1826
@unless ($unlinked)
1927
</a>

0 commit comments

Comments
 (0)