Added phone number button

This commit is contained in:
Julian Prieber 2022-07-15 17:46:26 +02:00
parent 4ba6daba5e
commit 564a9d160b
4 changed files with 11 additions and 4 deletions

View File

@ -107,7 +107,9 @@ class UserController extends Controller
'button' => 'required'
]);
if (stringStartsWith($request->link,'http://') == 'true' or stringStartsWith($request->link,'https://') == 'true' or stringStartsWith($request->link,'mailto:') == 'true')
if ($request->button == 'phone')
$link1 = 'tel:' . $request->link;
elseif (stringStartsWith($request->link,'http://') == 'true' or stringStartsWith($request->link,'https://') == 'true')
$link1 = $request->link;
else
$link1 = 'https://' . $request->link;

View File

@ -98,11 +98,14 @@ class ButtonSeeder extends Seeder
'name' => 'patreon'
],
[
'name' => 'paypal'
],
[
'name' => 'phone'
],
[
'name' => 'pinterest'
],

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svgjs="http://svgjs.com/svgjs" xmlns:xlink="http://www.w3.org/1999/xlink" width="288" height="288"><svg xmlns="http://www.w3.org/2000/svg" width="288" height="288" enable-background="new 0 0 64 64" viewBox="0 0 64 64"><path fill="#fff" d="M41.883,27.817c0,0-1.479-1.715-2.495-1.715h-0.845v-3.949c0-1.104-0.896-2-2-2s-2,0.896-2,2v3.949h-5.085v-3.949 c0-1.104-0.896-2-2-2s-2,0.896-2,2v3.949h-0.847c-1.016,0-2.494,1.715-2.494,1.715L11.175,38.033 c-0.419,0.392-0.76,1.107-0.76,1.598v0.888v11.735c0,2.028,1.646,3.673,3.674,3.673h35.823c2.028,0,3.673-1.645,3.673-3.673V40.519 c0,0,0-0.396,0-0.888c0-0.49-0.341-1.206-0.76-1.598L41.883,27.817z M48.585,50.927h-33.17V40.915l10.114-9.443l0.177-0.161 l0.177-0.205c0.001-0.001,0.002-0.002,0.003-0.004h12.227l0.16,0.185l0.197,0.184l10.114,9.443V50.927z" class="color000 svgShape"/><path fill="#fff" d="M40.127 8.073H23.873c-8.283 0-15.001 6.718-15.001 15.003v2.004c0 .565.458 1.022 1.024 1.022h9.211c1.381 0 2.501-1.118 2.501-2.5v-5.153c0-1.38 1.119-2.5 2.5-2.5h15.783c1.381 0 2.501 1.12 2.501 2.5v5.153c0 1.382 1.119 2.5 2.5 2.5h9.213c.565 0 1.022-.457 1.022-1.022v-2.004C55.128 14.791 48.412 8.073 40.127 8.073zM32 33.638c-4.214 0-7.632 3.418-7.632 7.632 0 4.215 3.418 7.632 7.632 7.632 4.215 0 7.632-3.417 7.632-7.632C39.632 37.056 36.215 33.638 32 33.638zM32 43.133c-1.029 0-1.863-.834-1.863-1.863s.834-1.863 1.863-1.863 1.863.834 1.863 1.863S33.029 43.133 32 43.133z" class="color000 svgShape"/></svg></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -233,8 +233,9 @@ function get_operating_system() {
@foreach($links as $link)
@php $linkName = str_replace('default ','',$link->name) @endphp
@if($link->button_id === 0)
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-title button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id . '/' . $link->link}}" target="_blank">
{{ $link->title }}</a></div>
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-title button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id . '/' . $link->link}}" target="_blank">{{ $link->title }}</a></div>
@elseif($link->name === "phone")
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-default button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ $link->link }}"><img alt="button-icon" class="icon hvr-icon" src="{{ asset('\/littlelink/icons\/')}}phone.svg"></i>{{ $link->title }}</a></div>
@elseif($link->name === "custom" and $link->custom_css === "" or $link->custom_css === "NULL")
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-{{ $link->name }} button button-hover icon-hover" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id . '/' . $link->link}}" target="_blank"><i style="color: {{$link->custom_icon}}" class="icon hvr-icon fa {{$link->custom_icon}}"></i>{{ $link->title }}</a></div>
@elseif($link->name === "custom" and $link->custom_css != "")