Implemented updates for themes v2
This commit is contained in:
parent
3c5b4b29a2
commit
4d9c1e120b
|
@ -15,6 +15,7 @@ return [
|
||||||
|
|
||||||
'paths' => [
|
'paths' => [
|
||||||
resource_path('views'),
|
resource_path('views'),
|
||||||
|
base_path('themes'),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -3,6 +3,28 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
@foreach($information as $info) @php $GLOBALS['themeName'] = $info->theme; @endphp @endforeach
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Theme Config
|
||||||
|
function theme($key){
|
||||||
|
$key = trim($key);
|
||||||
|
$file = base_path('themes/' . $GLOBALS['themeName'] . '/config.php');
|
||||||
|
if (file_exists($file)) {
|
||||||
|
$config = include $file;
|
||||||
|
if (isset($config[$key])) {
|
||||||
|
return $config[$key];
|
||||||
|
}}
|
||||||
|
return null;}
|
||||||
|
|
||||||
|
// Theme Custom Asset
|
||||||
|
function themeAsset($path){
|
||||||
|
$path = url('themes/' . $GLOBALS['themeName'] . '/extra/custom-assets/' . $path);
|
||||||
|
return $path;}
|
||||||
|
?>
|
||||||
|
|
||||||
|
@if(theme('enable_custom_code') == "true" and theme('enable_custom_head') == "true")@include($GLOBALS['themeName'] . '.extra.custom-head')@endif
|
||||||
|
|
||||||
@include('layouts.analytics')
|
@include('layouts.analytics')
|
||||||
|
|
||||||
@if(config('advanced-config.littlelink_title') != '' and env('HOME_URL') === '')
|
@if(config('advanced-config.littlelink_title') != '' and env('HOME_URL') === '')
|
||||||
|
@ -102,6 +124,8 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@if(theme('enable_custom_code') == "true" and theme('enable_custom_body') == "true")@include($GLOBALS['themeName'] . '.extra.custom-body')@endif
|
||||||
|
|
||||||
@if($info->theme != '' and $info->theme != 'default')
|
@if($info->theme != '' and $info->theme != 'default')
|
||||||
<!-- Enables parallax background animations -->
|
<!-- Enables parallax background animations -->
|
||||||
<div class="background-container">
|
<div class="background-container">
|
||||||
|
@ -202,7 +226,7 @@ function get_operating_system() {
|
||||||
</span>
|
</span>
|
||||||
@else
|
@else
|
||||||
<span class="copy-icon" role="button">
|
<span class="copy-icon" role="button">
|
||||||
<div onclick="alert('URL has been copied to your clipboard!')" align="right" class="sharediv"><div><a class="sharebutton button-hover icon-hover"><i style="color: black;" class="fa-solid fa-share sharebutton-img share-icon hvr-icon"></i><span class="sharebutton-mb">Share</span></a></div></div>
|
<div onclick="alert('URL has been copied to your clipboard!')" align="right" class="sharediv"><div><a class="sharebutton button-hover icon-hover"><img alt="share-icon" class="sharebutton-img share-icon hvr-icon" src="{{ asset('\/littlelink/icons\/')}}share.svg"><span class="sharebutton-mb">Share</span></a></div></div>
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
<script src="{{ asset('littlelink/js/share.button.js') }}"></script>
|
<script src="{{ asset('littlelink/js/share.button.js') }}"></script>
|
||||||
|
@ -235,19 +259,19 @@ function get_operating_system() {
|
||||||
@foreach($links as $link)
|
@foreach($links as $link)
|
||||||
@php $linkName = str_replace('default ','',$link->name) @endphp
|
@php $linkName = str_replace('default ','',$link->name) @endphp
|
||||||
@if($link->button_id === 0)
|
@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}}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif >{{ $link->title }}</a></div>
|
||||||
@elseif($link->name === "phone")
|
@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>
|
<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="@if(theme('use_custom_icons') == "true"){{ url('themes/' . $GLOBALS['themeName'] . '/extra/custom-icons')}}/phone{{theme('custom_icon_extension')}} @else{{ asset('\/littlelink/icons\/')}}phone.svg @endif"></i>{{ $link->title }}</a></div>
|
||||||
@elseif($link->name === "custom" and $link->custom_css === "" or $link->custom_css === "NULL")
|
@elseif($link->name === "custom" and $link->custom_css === "" or $link->custom_css === "NULL" or theme('allow_custom_buttons') == "false")
|
||||||
<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>
|
<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}}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><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 != "")
|
@elseif($link->name === "custom" 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 . '/' . $link->link}}" target="_blank"><i style="color: {{$link->custom_icon}}" class="icon hvr-icon fa {{$link->custom_icon}}"></i>{{ $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 . '/' . $link->link}}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><i style="color: {{$link->custom_icon}}" class="icon hvr-icon fa {{$link->custom_icon}}"></i>{{ $link->title }}</a></div>
|
||||||
@elseif($link->name === "buy me a coffee")
|
@elseif($link->name === "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="{{ route('clickNumber') . '/' . $link->id . '/' . $link->link}}" target="_blank"><img alt="button-icon" class="icon hvr-icon" src="{{ asset('\/littlelink/icons\/')}}coffee.svg">Buy me a Coffee</a></div>
|
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-coffee 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 ><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($link->name === "custom_website"and $link->custom_css === "" or $link->custom_css === "NULL")
|
@elseif($link->name === "custom_website"and $link->custom_css === "" or $link->custom_css === "NULL" or theme('allow_custom_buttons') == "false")
|
||||||
<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 . '/' . $link->link}}" target="_blank"><img alt="button-icon" class="icon hvr-icon" src="https://icons.duckduckgo.com/ip3/{{strp($link->link)}}.ico">{{ $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 . '/' . $link->link}}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="https://icons.duckduckgo.com/ip3/{{strp($link->link)}}.ico">{{ $link->title }}</a></div>
|
||||||
@elseif($link->name === "custom_website" and $link->custom_css != "")
|
@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 . '/' . $link->link}}" target="_blank"><img alt="button-icon" class="icon hvr-icon" src="https://icons.duckduckgo.com/ip3/{{strp($link->link)}}.ico">{{ $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 . '/' . $link->link}}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="button-icon" class="icon hvr-icon" src="https://icons.duckduckgo.com/ip3/{{strp($link->link)}}.ico">{{ $link->title }}</a></div>
|
||||||
@elseif($link->name === "space")
|
@elseif($link->name === "space")
|
||||||
<?php
|
<?php
|
||||||
if (is_numeric($link->title) and $link->title < 10)
|
if (is_numeric($link->title) and $link->title < 10)
|
||||||
|
@ -260,7 +284,7 @@ function get_operating_system() {
|
||||||
@elseif($link->name === "heading")
|
@elseif($link->name === "heading")
|
||||||
<h2>{{ $link->title }}</h2>
|
<h2>{{ $link->title }}</h2>
|
||||||
@else
|
@else
|
||||||
<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"><img alt="button-icon" class="icon hvr-icon" src="{{ asset('\/littlelink/icons\/') . $linkName }}.svg">{{ ucfirst($linkName) }}</a></div>
|
<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}}" @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">{{ ucfirst($linkName) }}</a></div>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
@ -269,5 +293,8 @@ function get_operating_system() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if(theme('enable_custom_code') == "true" and theme('enable_custom_body_end') == "true")@include($GLOBALS['themeName'] . '.extra.custom-body-end')@endif
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue