Skip to content

Commit

Permalink
Add a new default avatar using a greyscale Laravel logo (#759)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jan 8, 2022
1 parent 3e13297 commit 9eb234c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions public/images/laravelio-icon-gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/images/laravelio-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 15 additions & 7 deletions resources/views/components/avatar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
<a href="{{ route('profile', $user->username()) }}">
@endunless

<x-buk-avatar
:search="$user->githubUsername()"
provider="github"
:fallback="asset('/images/user.svg')"
:alt="$user->name()"
{{ $attributes->merge(['class' => 'rounded-full text-gray-500']) }}
/>
@if ($user->githubUsername())
<x-buk-avatar
:search="$user->githubUsername()"
provider="github"
:fallback="asset('/images/laravelio-icon-gray.svg')"
:alt="$user->name()"
{{ $attributes->merge(['class' => 'bg-gray-50 rounded-full']) }}
/>
@else
<img
src="{{ asset('images/laravelio-icon-gray.svg') }}"
alt="{{ $user->name() }}"
{{ $attributes->merge(['class' => 'bg-gray-50 rounded-full']) }}
/>
@endif

@unless ($unlinked)
</a>
Expand Down

0 comments on commit 9eb234c

Please sign in to comment.