Skip to content

Commit cefd28a

Browse files
Merge pull request #564 from LeviSnoot/main
feat: add firefish button
2 parents 6ad366a + 15da93a commit cefd28a

File tree

5 files changed

+65
-11
lines changed

5 files changed

+65
-11
lines changed

assets/linkstack/css/brands.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,23 @@ button:hover,
430430
filter: brightness(90%);
431431
}
432432

433+
/* Firefish */
434+
.button.button-firefish {
435+
color: #fff;
436+
background-image: linear-gradient(
437+
45deg,
438+
#DB44DB,
439+
1%,
440+
#EC476D,
441+
80%,
442+
#F6AE4A
443+
);
444+
}
445+
.button.button-firefish:hover,
446+
.button.button-firefish:focus {
447+
filter: brightness(90%);
448+
}
449+
433450
/* Firefox */
434451
.button.button-firefox {
435452
color: #FFFFFF;

assets/linkstack/icons/firefish.svg

Lines changed: 21 additions & 0 deletions
Loading

config/button-names.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'dev-to' => 'DEV',
1212
'epic-games' => 'Epic Games',
1313
'f-droid' => 'F-Droid',
14+
'firefish' => 'Firefish',
1415
'furaffinity' => 'FurAffinity',
1516
'github' => 'GitHub',
1617
'gitlab' => 'GitLab',

database/seeders/ButtonSeeder.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,22 @@ public function run()
421421
[
422422
'name' => 'trakt'
423423
],
424+
424425
[
425426
'name' => 'last-fm'
426427
],
428+
427429
[
428430
'name' => 'itaku'
429431
],
432+
430433
[
431434
'name' => 'furaffinity'
432435
],
436+
437+
[
438+
'name' => 'firefish'
439+
],
433440
];
434441

435442
Button::insert($buttons);

resources/views/littlelink.blade.php

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
<head>
66
<meta charset="utf-8">
77

8-
{{-- Mastodon re="me" link --}}
8+
{{-- Fediverse rel="me" links --}}
9+
@php
10+
$relMe = "mastodon, firefish";
11+
$relMeList = explode(', ', $relMe);
12+
@endphp
13+
914
@foreach($links as $link)
10-
@if($link->name === "mastodon")
15+
@if(in_array($link->name, $relMeList))
1116
<link href="{{$link->link}}" rel="me">
1217
@endif
1318
@endforeach
14-
19+
1520
<?php
1621
// Theme Config
1722
if (!function_exists('theme')) {
@@ -51,7 +56,7 @@ function themeAsset($path){
5156
@endif
5257

5358
@if(env('CUSTOM_META_TAGS') == 'true')
54-
@include('layouts.meta')
59+
@include('layouts.meta')
5560
@else
5661
<meta name="description" content="{{ $userinfo->littlelink_description }}">
5762
<meta name="author" content="{{ $userinfo->name }}">
@@ -82,7 +87,7 @@ function themeAsset($path){
8287
</style>
8388
@endif
8489
@endif
85-
90+
8691
<!--#### BEGIN Meta Tags social media preview images ####-->
8792
<!-- This shows a preview for title, description and avatar image of users profiles if shared on social media sites -->
8893

@@ -98,7 +103,7 @@ function themeAsset($path){
98103
@else
99104
<meta property="og:image" content="{{ asset('assets/linkstack/images/logo.svg') }}">
100105
@endif
101-
106+
102107
<!-- Twitter Meta Tags -->
103108
<meta name="twitter:card" content="summary_large_image">
104109
<meta property="twitter:domain" content="{{ url('') }}/{{ "@" . $littlelink_name }}">
@@ -119,7 +124,7 @@ function themeAsset($path){
119124
{{-- <script>{!! file_get_contents(base_path("assets/external-dependencies/fontawesome.js")) !!}</script> --}}
120125
<style>{!! str_replace('../', 'studio/', file_get_contents(base_path("assets/external-dependencies/fontawesome.css"))) !!}</style>
121126

122-
@include('layouts.fonts')
127+
@include('layouts.fonts')
123128
<style>{!! file_get_contents(base_path("assets/linkstack/css/normalize.css")) !!}</style>
124129
<style>{!! file_get_contents(base_path("assets/linkstack/css/animate.css")) !!}</style>
125130
@if(file_exists(base_path("assets/linkstack/images/").findFile('favicon')))
@@ -265,7 +270,7 @@ function themeAsset($path){
265270
<!-- Short Bio -->
266271
<style>.description-parent * {margin-bottom: 1em;}.description-parent {padding-bottom: 30px;}</style>
267272
<center><div class="fadein description-parent"><p class="fadein">@if(env('ALLOW_USER_HTML') === true){!! $info->littlelink_description !!}@else{{ $info->littlelink_description }}@endif</p></div></center>
268-
273+
269274
<!-- Icons -->
270275
@php $icons = DB::table('links')->where('user_id', $userinfo->id)->where('button_id', 94)->get(); @endphp
271276
@if(count($icons) > 0)
@@ -276,7 +281,7 @@ function themeAsset($path){
276281
</div>
277282
@endif
278283

279-
@endforeach
284+
@endforeach
280285

281286
<!-- Buttons -->
282287
@php $initial = 1; @endphp
@@ -296,6 +301,9 @@ function themeAsset($path){
296301
@case('buy me a coffee')
297302
<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="{{ $link->name }}" 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('\/assets/linkstack/icons\/')}}coffee.svg @endif">Buy me a Coffee</a></div>
298303
@break
304+
@case('firefish')
305+
<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 . "?" . $link->link }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="{{ $link->name }}" 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('\/assets/linkstack/icons\/') . "firefish" }}.svg @endif">{{ $link->title }}</a></div>
306+
@break
299307
@case('mastodon')
300308
<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 . "?" . $link->link }}" @if(theme('open_links_in_same_tab') != "true")target="_blank"@endif ><img alt="{{ $link->name }}" 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('\/assets/linkstack/icons\/') . "mastodon" }}.svg @endif">{{ $link->title }}</a></div>
301309
@break
@@ -334,12 +342,12 @@ function themeAsset($path){
334342
@endforeach
335343

336344
@include('layouts.footer')
337-
345+
338346
</div>
339347
</div>
340348
</div>
341349

342350
@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
343351

344352
</body>
345-
</html>
353+
</html>

0 commit comments

Comments
 (0)