Revert "Moved favicon API offsite"

This reverts commit 940e7e35a5.
This commit is contained in:
Julian Prieber 2022-11-28 17:03:17 +01:00
parent 9b9444468d
commit 4b1054fc1f
7 changed files with 11 additions and 17 deletions

View File

@ -1,4 +1,3 @@
<?php use App\Models\Link; ?>
<?php
/**
* Website: http://sourceforge.net/projects/simplehtmldom/
@ -2435,16 +2434,11 @@ return $favicon;
?>
<?php
if($_SERVER['QUERY_STRING'] !== ''){
try{
$link = Link::find($_SERVER['QUERY_STRING']);
$link = $link->link;
if($_SERVER['QUERY_STRING'] !== '' and $_SERVER['REMOTE_ADDR'] == $_SERVER['SERVER_ADDR']){
header("HTTP/1.1 302 Found");
$header = getFavIcon($link);
$header = getFavIcon($_SERVER['QUERY_STRING']);
header("Location: $header");
exit();
} catch (exception $e) {exit();}
}
?>

View File

@ -5,7 +5,7 @@
<a class="button button-custom button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id . '/' . $link->link}}" @if(theme('open_links_in_same_tab') !="true" )target="_blank" @endif>
@if($params->GetSiteIcon ?? true)
<img alt="button-icon" class="icon hvr-icon" src="{{asset('studio/favicon/favicon.gif')}}" onload="this.src='{{url('ico').'?'.$BaseURL}}'" loading="lazy">
<img alt="button-icon" class="icon hvr-icon" src="{{url('ico').'?'.$BaseURL}}" loading="lazy">
@endif
{{ $link->title }}

View File

@ -213,9 +213,9 @@ foreach($pages as $page)
@elseif($button['button'] === "buy me a coffee")
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-coffee button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ $button['link'] }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="@if(theme('use_custom_icons') == "true"){{ url('themes/' . $GLOBALS['themeName'] . '/extra/custom-icons')}}/coffee{{theme('custom_icon_extension')}} @else{{ asset('\/littlelink/icons\/')}}coffee.svg @endif">Buy me a Coffee</a></div>
@elseif($button['button'] === "custom_website" and ($button['custom_css'] === "" or $button['custom_css'] === "NULL") or (theme('allow_custom_buttons') == "false" and $button['button'] === "custom_website"))
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-custom_website button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ $button['link'] }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="{{asset('studio/favicon/favicon.gif')}}" onload="this.src='{{url('ico').'?'.$button['link']}}'" loading="lazy">{{ $button['title'] }}</a></div>
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-custom_website button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ $button['link'] }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="{{url('ico').'?'.$button['link']}}" loading="lazy">{{ $button['title'] }}</a></div>
@elseif($button['button'] === "custom_website" and $button['custom_css'] != "")
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-hover icon-hover" style="{{ $button['custom_css'] }}" rel="noopener noreferrer nofollow" href="{{ $button['link'] }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="{{asset('studio/favicon/favicon.gif')}}" onload="this.src='{{url('ico').'?'.$button['link']}}'" loading="lazy">{{ $button['title'] }}</a></div>
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-hover icon-hover" style="{{ $button['custom_css'] }}" rel="noopener noreferrer nofollow" href="{{ $button['link'] }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="{{url('ico').'?'.$button['link']}}" loading="lazy">{{ $button['title'] }}</a></div>
@elseif($button['button'] === "space")
<?php
if (is_numeric($button['title']) and $button['title'] < 10)

View File

@ -275,9 +275,9 @@ function get_operating_system() {
@elseif($link->name === "mastodon")
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-{{ $link->name }} button button-hover icon-hover" rel="me noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="@if(theme('use_custom_icons') == "true"){{ url('themes/' . $GLOBALS['themeName'] . '/extra/custom-icons')}}/{{$linkName}}{{theme('custom_icon_extension')}} @else{{ asset('\/littlelink/icons\/') . $linkName }}.svg @endif">{{ $link->title }}</a></div>
@elseif($link->name === "custom_website"and $link->custom_css === "" or $link->custom_css === "NULL" or (theme('allow_custom_buttons') == "false" and $link->name === "custom"))
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-custom_website button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="{{url('ico').'?'.$link->id}}" loading="lazy">{{ $link->title }}</a></div>
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-custom_website button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="{{url('ico').'?'.$link->link}}" loading="lazy">{{ $link->title }}</a></div>
@elseif($link->name === "custom_website" and $link->custom_css != "")
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-hover icon-hover" style="{{ $link->custom_css }}" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="{{url('ico').'?'.$link->id}}" loading="lazy">{{ $link->title }}</a></div>
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-hover icon-hover" style="{{ $link->custom_css }}" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="{{url('ico').'?'.$link->link}}" loading="lazy">{{ $link->title }}</a></div>
@elseif($link->name === "space")
<?php
if (is_numeric($link->title) and $link->title < 10)

View File

@ -216,7 +216,7 @@ var button_css = {
@if($buttonId == 1)
<center><div id="sample" style="--delay: 1s; border-radius:8px !important; max-width: 400px; width: 80%; class="button-entrance"><div class="button-demo button hvr-grow hvr-icon-wobble-vertical"><img class="icon hvr-icon" src="{{ asset('\/littlelink/icons\/') . 'custom' }}.svg">{{ $title }}</div></div></center>
@else
<center><div id="sample" style="--delay: 1s; border-radius:8px !important; max-width: 400px; width: 80%; class="button-entrance"><div class="button-demo button hvr-grow hvr-icon-wobble-vertical"><img class="wicon hvr-icon" src="{{asset('studio/favicon/favicon.gif')}}" onload="this.src='{{url('ico').'?'.$link}}'" loading="lazy">{{ $title }}</div></div></center>
<center><div id="sample" style="--delay: 1s; border-radius:8px !important; max-width: 400px; width: 80%; class="button-entrance"><div class="button-demo button hvr-grow hvr-icon-wobble-vertical"><img class="wicon hvr-icon" src="{{url('ico').'?'.$link}}" loading="lazy">{{ $title }}</div></div></center>
@endif
</section>
@ -255,9 +255,9 @@ NULL
@if($custom_css === "" or $custom_css === "NULL" and $buttonId == 1)
<center><div style="--delay: 1s" class="button-entrance"><div class="button-demo button-custom button hvr-grow hvr-icon-wobble-vertical"><img class="icon hvr-icon fa {{$custom_icon}}">{{ $title }}</div></div></center>
@elseif($custom_css === "" or $custom_css === "NULL" and $buttonId == 2)
<center><div style="--delay: 1s" class="button-entrance"><div class="button-custom_website button hvr-grow hvr-icon-wobble-vertical"><img class="wicon hvr-icon" src="{{asset('studio/favicon/favicon.gif')}}" onload="this.src='{{url('ico').'?'.$link}}'" loading="lazy">{{ $title }}</div></div></center>
<center><div style="--delay: 1s" class="button-entrance"><div class="button-custom_website button hvr-grow hvr-icon-wobble-vertical"><img class="wicon hvr-icon" src="{{url('ico').'?'.$link}}" loading="lazy">{{ $title }}</div></div></center>
@elseif($custom_css != "" and $buttonId == 2)
<center><div style="--delay: 1s" class="button-entrance"><div style="{{ $custom_css }}" class="button-custom_website button hvr-grow hvr-icon-wobble-vertical"><img class="wicon hvr-icon" src="{{asset('studio/favicon/favicon.gif')}}" onload="this.src='{{url('ico').'?'.$link}}'" loading="lazy">{{ $title }}</div></div></center>
<center><div style="--delay: 1s" class="button-entrance"><div style="{{ $custom_css }}" class="button-custom_website button hvr-grow hvr-icon-wobble-vertical"><img class="wicon hvr-icon" src="{{url('ico').'?'.$link}}" loading="lazy">{{ $title }}</div></div></center>
@else
<center><div style="--delay: 1s" class="button-entrance"><div style="{{ $custom_css }}" class="button-demo hvr-grow hvr-icon-wobble-vertical"><i style="color: {{$custom_icon}}" class="icon hvr-icon fa {{$custom_icon}}"></i>{{ $title }}</div></div></center>
@endif

View File

@ -68,7 +68,7 @@
<span class='h6'>
<?php $button = Button::find($link->button_id); if(isset($button->name)){$buttonName = $button->name;}else{$buttonName = 0;} ?>
@if($button->name == "custom_website")
<span style="border: 1px solid #d0d4d7 !important;border-radius:5px;background-color:#6c757d;width:25px!important;height:25px!important;"><img style="margin-bottom:3px;margin-left:4px;margin-right:4px;max-width:15px;max-height:15px;" alt="button-icon" class="icon hvr-icon" src="{{asset('studio/favicon/favicon.gif')}}" onload="this.src='{{url('ico').'?'.$link->link}}'" loading="lazy"></span>
<span style="border: 1px solid #d0d4d7 !important;border-radius:5px;background-color:#6c757d;width:25px!important;height:25px!important;"><img style="margin-bottom:3px;margin-left:4px;margin-right:4px;max-width:15px;max-height:15px;" alt="button-icon" class="icon hvr-icon" src="{{url('ico').'?'.$link->link}}" loading="lazy"></span>
@elseif($button->name == "space")
<span style="border: 1px solid #d0d4d7 !important;border-radius:5px;background-color:#6c757d;width:25px!important;height:25px!important;"><i style="margin-left:2.83px;margin-right:-1px;color:#fff;" class='bi bi-distribute-vertical'>&nbsp;</i></span>
@elseif($button->name == "heading")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB