Skip to content

Commit 4a6ddc3

Browse files
committed
Added capitalization to buttons
Buttons now support full capitalization of the default button names. For example, Previously, GitHub would be displayed as Github. Now, the proper capitalization is uses.
1 parent c8ee3f1 commit 4a6ddc3

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

config/button-names.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
$buttonNames = array(
4+
'github' => 'GitHub',
5+
'gitlab' => 'GitLab',
6+
'linkedin' => 'linkedIn',
7+
'paypal' => 'PayPal',
8+
'soundcloud' => 'SoundCloud',
9+
'tiktok' => 'TikTok',
10+
'whatsapp' => 'WhatsApp',
11+
'wordpress' => 'WordPress',
12+
'youtube' => 'YouTube',
13+
);

resources/views/littlelink.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ function get_operating_system() {
284284
@elseif($link->name === "heading")
285285
<h2>{{ $link->title }}</h2>
286286
@else
287-
<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>
287+
<?php include base_path('config/button-names.php'); $newLinkName = $linkName; foreach($buttonNames as $key => $value) { if($newLinkName == $key) { $newLinkName = $value; } } ?>
288+
<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($newLinkName) }}</a></div>
288289
@endif
289290
@endforeach
290291

@@ -297,4 +298,4 @@ function get_operating_system() {
297298
@if(theme('enable_custom_code') == "true" and theme('enable_custom_body_end') == "true" and env('ALLOW_CUSTOM_CODE_IN_THEMES') == 'true')@include($GLOBALS['themeName'] . '.extra.custom-body-end')@endif
298299

299300
</body>
300-
</html>
301+
</html>

0 commit comments

Comments
 (0)