Changed logo

As part of the new logo (https://github.com/JulianPrieber/littlelink-custom/milestone/1) I'm now using the new 'logo.svg' vector logo.

For this, I added an if-else statement in most cases, which first check for a custom logo uploaded by the admin or the avatar of an individual user. If the image doesn't exist, the default logo (logo.svg) is used.
This commit is contained in:
JulianPrieber 2022-02-20 13:12:25 +01:00
parent 5db777053e
commit 96cfd5b4c1
7 changed files with 46 additions and 11 deletions

View File

@ -1 +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') }}"> <img class="mb-5" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}">
@else
<img src="{{ asset('littlelink/images/logo.svg') }}" alt="Logo"></img>
@endif

View File

@ -10,7 +10,11 @@
<link rel="stylesheet" href="{{ asset('littlelink/css/brands.css') }}"> <link rel="stylesheet" href="{{ asset('littlelink/css/brands.css') }}">
<link rel="stylesheet" href="{{ asset('littlelink/css/hover-min.css') }}"> <link rel="stylesheet" href="{{ asset('littlelink/css/hover-min.css') }}">
<link rel="stylesheet" href="{{ asset('littlelink/css/animate.css') }}"> <link rel="stylesheet" href="{{ asset('littlelink/css/animate.css') }}">
@if(file_exists(base_path("littlelink/images/avatar.png" )))
<link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}"> <link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}">
@else
<link rel="icon" type="image/png" href="{{ asset('littlelink/images/logo.svg') }}">
@endif
<!-- begin dark mode detection --> <!-- begin dark mode detection -->
<script src="{{ asset('littlelink/js/js.cookie.min.js') }}"></script> <script src="{{ asset('littlelink/js/js.cookie.min.js') }}"></script>
@ -58,7 +62,14 @@
</div> </div>
<div class="column" style="margin-top: 10%"> <div class="column" style="margin-top: 10%">
<!-- Your Image Here --> <!-- Your Image Here -->
<img src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}"> @if(file_exists(base_path("littlelink/images/avatar.png" )))
<img class="rounded-avatar" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="100px" height="100px">
@else
<div class="parent fadein" >
<img class="image1 rotate" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo"></img>
<img class="image2" src="{{ asset('littlelink/images/just-ll.svg') }}" alt="Logo"></img>
</div>
@endif
<!-- Your Name --> <!-- Your Name -->
<h1 class="mt-5"> {{ config('app.name') }} </h1> <h1 class="mt-5"> {{ config('app.name') }} </h1>
@ -88,7 +99,7 @@
</a> </a>
@else @else
<a href="{{ config('app.url') }}/@<?= $page->littlelink_name ?>" target="_blank"> <a href="{{ config('app.url') }}/@<?= $page->littlelink_name ?>" target="_blank">
<img src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="50px" height="50px"> <img src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="50px" height="50px">
</a> </a>
@endif @endif
@endforeach @endforeach

View File

@ -10,7 +10,11 @@
<link rel="stylesheet" href="{{ asset('/studio/css/bootstrap.min.css') }}"> <link rel="stylesheet" href="{{ asset('/studio/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('/studio/css/style-dashboard.css') }}"> <link rel="stylesheet" href="{{ asset('/studio/css/style-dashboard.css') }}">
@if(file_exists(base_path("littlelink/images/avatar.png" )))
<link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}"> <link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}">
@else
<img src="{{ asset('littlelink/images/logo.svg') }}" alt="Logo"></img>
@endif
</head> </head>
<body> <body>

View File

@ -11,26 +11,28 @@
<!-- This shows a preview for title, description and avatar image of users profiles if shared on social media sites --> <!-- This shows a preview for title, description and avatar image of users profiles if shared on social media sites -->
<!-- Facebook Meta Tags --> <!-- Facebook Meta Tags -->
<meta property="og:url" content="{{ config('app.url') }}/@littlelink_name""> <meta property="og:url" content="{{ config('app.url') }}/@littlelink_name">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:title" content="{{ $userinfo->littlelink_name }}"> <meta property="og:title" content="{{ $userinfo->littlelink_name }}">
<meta property="og:description" content="{{ $userinfo->littlelink_description }}"> <meta property="og:description" content="{{ $userinfo->littlelink_description }}">
@if(file_exists(base_path("img/$littlelink_name" . ".png" ))) @if(file_exists(base_path("img/$littlelink_name" . ".png" )))
<meta property="og:image" content="{{ asset("img/$littlelink_name" . ".png") }}"> <meta property="og:image" content="{{ asset("img/$littlelink_name" . ".png") }}">
@if(file_exists(base_path("littlelink/images/avatar.png" )))
<img class="rounded-avatar" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="100px" height="100px">
@else @else
<meta property="og:image" content="{{ asset('littlelink/images/avatar@2x.png') }}"> <meta property="og:image" content="{{ asset('littlelink/images/logo.svg') }}">
@endif @endif
<!-- Twitter Meta Tags --> <!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="{{ config('app.url') }}/@littlelink_name"> <meta property="twitter:domain" content="{{ config('app.url') }}/@littlelink_name">
<meta property="twitter:url" content="https://prieber.com/socials/index.php/"> <meta property="twitter:url" content="{{ config('app.url') }}/@littlelink_name">
<meta name="twitter:title" content="{{ $userinfo->littlelink_name }}"> <meta name="twitter:title" content="{{ $userinfo->littlelink_name }}">
<meta name="twitter:description" content="{{ $userinfo->littlelink_description }}"> <meta name="twitter:description" content="{{ $userinfo->littlelink_description }}">
@if(file_exists(base_path("img/$littlelink_name" . ".png" ))) @if(file_exists(base_path("img/$littlelink_name" . ".png" )))
<meta name="twitter:image" content="{{ asset("img/$littlelink_name" . ".png") }}"> <meta name="twitter:image" content="{{ asset("img/$littlelink_name" . ".png") }}">
@else @else
<meta name="twitter:image" content="{{ asset('littlelink/images/avatar@2x.png') }}"> <meta name="twitter:image" content="{{ asset('littlelink/images/logo.svg') }}">
@endif @endif
<!--#### END Meta Tags social media preview images ####--> <!--#### END Meta Tags social media preview images ####-->
@ -41,7 +43,7 @@
<link rel="stylesheet" href="{{ asset('littlelink/css/brands.css') }}"> <link rel="stylesheet" href="{{ asset('littlelink/css/brands.css') }}">
<link rel="stylesheet" href="{{ asset('littlelink/css/hover-min.css') }}"> <link rel="stylesheet" href="{{ asset('littlelink/css/hover-min.css') }}">
<link rel="stylesheet" href="{{ asset('littlelink/css/animate.css') }}"> <link rel="stylesheet" href="{{ asset('littlelink/css/animate.css') }}">
<link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}"> <link rel="icon" type="image/png" href="{{ asset('littlelink/images/logo.svg') }}">
<style> <style>
.container { max-width: 1080px !important; } .container { max-width: 1080px !important; }
.button-title { .button-title {
@ -94,8 +96,10 @@
<!-- Your Image Here --> <!-- Your Image Here -->
@if(file_exists(base_path("img/$littlelink_name" . ".png" ))) @if(file_exists(base_path("img/$littlelink_name" . ".png" )))
<img class="rounded-avatar" src="{{ asset("img/$littlelink_name" . ".png") }}" width="100px" height="100px"> <img class="rounded-avatar" src="{{ asset("img/$littlelink_name" . ".png") }}" width="100px" height="100px">
@else @if(file_exists(base_path("littlelink/images/avatar.png" )))
<img class="rounded-avatar" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="100px" height="100px"> <img class="rounded-avatar" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="100px" height="100px">
@else
<img class="rounded-avatar" src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="100px" height="100px">
@endif @endif
@foreach($information as $info) @foreach($information as $info)

View File

@ -25,7 +25,11 @@
<!-- Favicon <!-- Favicon
--> -->
@if(file_exists(base_path("littlelink/images/avatar.png" )))
<link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}"> <link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}">
@else
<link rel="icon" type="image/png" href="{{ asset('littlelink/images/logo.svg') }}">
@endif
</head> </head>
<body> <body>
@ -37,7 +41,11 @@
<div class="column" style="margin-top: 10%"> <div class="column" style="margin-top: 10%">
<!-- Your Image Here --> <!-- Your Image Here -->
<img src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}"> @if(file_exists(base_path("littlelink/images/avatar.png" )))
<img src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}">
@else
<img src="https://prieber.com/social/littlelink/images/logo.svg" alt="Logo"></img>
@endif
<br> <br>
<div class="jumbotron"> <div class="jumbotron">

View File

@ -27,8 +27,10 @@
<div class="form-group col-lg-8"> <div class="form-group col-lg-8">
@if(file_exists(base_path("img/$user->littlelink_name" . ".png" ))) @if(file_exists(base_path("img/$user->littlelink_name" . ".png" )))
<img src="{{ asset("img/$user->littlelink_name" . ".png") }}" srcset="{{ asset("img/$user->littlelink_name" . "@2x.png 2x") }}" width="100px" height="100px"> <img src="{{ asset("img/$user->littlelink_name" . ".png") }}" srcset="{{ asset("img/$user->littlelink_name" . "@2x.png 2x") }}" width="100px" height="100px">
@if(file_exists(base_path("littlelink/images/avatar.png" )))
<img class="rounded-avatar" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="100px" height="100px">
@else @else
<img src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}"> <img src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}">
@endif @endif
</div> </div>

View File

@ -15,8 +15,10 @@
<div class="form-group col-lg-8"> <div class="form-group col-lg-8">
@if(file_exists(base_path("img/$page->littlelink_name" . ".png" ))) @if(file_exists(base_path("img/$page->littlelink_name" . ".png" )))
<img src="{{ asset("img/$page->littlelink_name" . ".png") }}" srcset="{{ asset("img/$page->littlelink_name" . "@2x.png 2x") }}" width="100px" height="100px"> <img src="{{ asset("img/$page->littlelink_name" . ".png") }}" srcset="{{ asset("img/$page->littlelink_name" . "@2x.png 2x") }}" width="100px" height="100px">
@if(file_exists(base_path("littlelink/images/avatar.png" )))
<img class="rounded-avatar" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="100px" height="100px">
@else @else
<img src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}"> <img src="{{ asset('littlelink/images/logo.svg') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}">
@endif @endif
</div> </div>