Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianPrieber committed Mar 16, 2023
1 parent 6633ced commit 3fecf4a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion resources/views/components/application-logo.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@if(file_exists(base_path("/littlelink/images/avatar.png" )))
<img class="mb-5" src="{{ asset('/littlelink/images/avatar.png') }}" srcset="{{ asset('/littlelink/images/avatar@2x.png 2x') }}" style="width: 150px;">
<img class="mb-5" src="{{ asset('/littlelink/images/avatar.png') }}" style="width: 150px;">
@else
<img class="mb-5" src="{{ asset('/littlelink/images/avatar@2x.png') }}">
@endif
4 changes: 2 additions & 2 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ function themeAsset($path){
@foreach($updatedPages as $page)
@if(file_exists(base_path("img/$page->littlelink_name" . ".png" )))
<a href="{{ url('') }}/@<?= $page->littlelink_name ?>" target="_blank">
<img src="{{ asset("img/$page->littlelink_name" . ".png") }}" srcset="{{ asset("img/$page->littlelink_name" . "@2x.png 2x") }}" width="50px" height="50px">
<img src="{{ asset("img/$page->littlelink_name" . ".png") }}" width="50px" height="50px">
</a>
@else
<a href="{{ url('') }}/@<?= $page->littlelink_name ?>" target="_blank">
<img src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="50px" height="50px">
<img src="{{ asset('littlelink/images/logo.svg') }}" width="50px" height="50px">
</a>
@endif
@endforeach
Expand Down
6 changes: 3 additions & 3 deletions resources/views/panel/edit-user.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@

<div class="form-group col-lg-8">
@if(file_exists(base_path("img/" . $user->id . ".png")))
<img src="{{ asset("img/" . $user->id . ".png") }}" srcset="{{ asset("img/$user->id" . "@2x.png 2x") }}" width="128px" height="128px" style="object-fit: cover;">
<img src="{{ asset("img/" . $user->id . ".png") }}" img/$user->id" . "@2x.png 2x") }}" width="128px" height="128px" style="object-fit: cover;">
@elseif(file_exists(base_path("littlelink/images/").findFile('avatar')))
<img class="rounded-avatar" src="{{ asset('littlelink/images/'.findFile('avatar')) }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="128px" height="128px" style="object-fit: cover;">
<img class="rounded-avatar" src="{{ asset('littlelink/images/'.findFile('avatar')) }}" width="128px" height="128px" style="object-fit: cover;">
@else
<img src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="128px" height="128px" style="object-fit: cover;">
<img src="{{ asset('littlelink/images/logo.svg') }}" width="128px" height="128px" style="object-fit: cover;">
@endif
@if(file_exists(base_path("img/" . $user->id . ".png")))<br><a title="Remove icon" class="hvr-grow p-1 text-danger" style="padding-left:5px;" href="?delete"><i class="bi bi-trash-fill"></i> Delete</a>@endif
@if($_SERVER['QUERY_STRING'] === 'delete' and File::exists(base_path('img/' . $user->id . '.png')))@php File::delete(base_path('img/' . $user->id . '.png')); header("Location: ".url()->current()); die(); @endphp @endif
Expand Down

0 comments on commit 3fecf4a

Please sign in to comment.