Skip to content

Commit 26275c1

Browse files
committed
"Reset to default" button now works with themes
The reset to default button on the Button Editor now works with custom theme buttons.
1 parent 40000b9 commit 26275c1

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

resources/views/littlelink.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ function get_operating_system() {
173173
@if($link->button_id === 0)
174174
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-title button hvr-grow hvr-icon-wobble-vertical" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id . '/' . $link->link}}" target="_blank">
175175
{{ $link->title }}</a></div>
176-
@elseif($link->name === "custom" and $link->custom_css === "")
176+
@elseif($link->name === "custom" and $link->custom_css === "" or $link->custom_css === "NULL")
177177
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-{{ $link->name }} button hvr-grow hvr-icon-wobble-vertical" 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>
178178
@elseif($link->name === "custom" and $link->custom_css != "")
179179
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button hvr-grow hvr-icon-wobble-vertical" 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>
180180
@elseif($link->name === "buy me a coffee")
181181
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-coffee button hvr-grow hvr-icon-wobble-vertical" 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>
182-
@elseif($link->name === "custom_website"and $link->custom_css === "")
182+
@elseif($link->name === "custom_website"and $link->custom_css === "" or $link->custom_css === "NULL")
183183
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button-custom_website button hvr-grow hvr-icon-wobble-vertical" rel="noopener noreferrer nofollow" href="{{ route('clickNumber') . '/' . $link->id . '/' . $link->link}}" target="_blank"><img alt="button-icon" class="icon hvr-icon" src="http://www.google.com/s2/favicons?domain={{$link->link}}">{{ $link->title }}</a></div>
184184
@elseif($link->name === "custom_website" and $link->custom_css != "")
185185
<div style="--delay: {{ $initial++ }}s" class="button-entrance"><a class="button button hvr-grow hvr-icon-wobble-vertical" 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="http://www.google.com/s2/favicons?domain={{$link->link}}">{{ $link->title }}</a></div>

resources/views/studio/button-editor.blade.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,7 @@
240240
@csrf
241241
<div class="form-group col-lg-8">
242242
<textarea style="display: none;" rows="9" type="text" name="custom_css" value="" class="form-control">
243-
color: #FFFFFF;
244-
background-color: #FFFFFF;
245-
background-image: linear-gradient(-135deg,#0f0c29,#302b63,#24243e)
243+
NULL
246244
</textarea>
247245
</div>
248246
<button type="submit" class="mt-3 ml-3 btn btn-info">Reset to default</button>
@@ -251,9 +249,9 @@
251249
<br><br><div id="result" style="left: 1%; position: relative; background-color:#2c2d3a; border-radius: 25px; min-width:300px; max-width:950px; height:300px; box-shadow: 0 10px 20px -10px rgba(0,0,0, 0.6);">
252250
<div style="position: relative; top: 50%; transform: translateY(-50%);">
253251
<h2 align="center" style="color:white">Result:</h2>
254-
@if($custom_css === "" and $buttonId == 1)
252+
@if($custom_css === "" or $custom_css === "NULL" and $buttonId == 1)
255253
<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>
256-
@elseif($custom_css === "" and $buttonId == 2)
254+
@elseif($custom_css === "" or $custom_css === "NULL" and $buttonId == 2)
257255
<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="http://www.google.com/s2/favicons?domain={{$link}}">{{ $title }}</div></div></center>
258256
@elseif($custom_css != "" and $buttonId == 2)
259257
<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="http://www.google.com/s2/favicons?domain={{$link}}">{{ $title }}</div></div></center>

0 commit comments

Comments
 (0)