Skip to content

Commit 894e7fa

Browse files
Merge pull request #87 from deanblackborough/main
External link icon
2 parents f720acf + 697d9bc commit 894e7fa

File tree

10 files changed

+20
-14
lines changed

10 files changed

+20
-14
lines changed

app/View/Components/Helper/Control/Link/Text.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ class Text extends Component
1111
public function __construct(
1212
private readonly string $label,
1313
private readonly string $route,
14-
private readonly bool $lockable = false
14+
private readonly bool $lockable = false,
15+
private readonly bool $external = false
1516
)
1617
{
1718
}
@@ -21,7 +22,8 @@ public function render()
2122
return view('components.helper.control.link.text', [
2223
'label' => $this->label,
2324
'route' => $this->route,
24-
'lockable' => $this->lockable
25+
'lockable' => $this->lockable,
26+
'external' => $this->external,
2527
]);
2628
}
2729
}

public/css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/views/authentication/register.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<h2 class="mt-6 text-center text-3xl font-medium tracking-tight text-gray-700">Register</h2>
2222
<p class="mt-2 text-center text-base text-gray-600">
2323
Or
24-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="tryout Budget Pro." />
24+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="tryout Budget Pro." :external="true" />
2525
</p>
2626
</div>
2727

resources/views/authentication/sign-in.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<h2 class="mt-6 text-center text-3xl font-medium tracking-tight text-gray-700">Sign-in</h2>
2222
<p class="mt-2 text-center text-base text-gray-600">
2323
Or
24-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="tryout Budget Pro." />
24+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="tryout Budget Pro." :external="true" />
2525
</p>
2626
</div>
2727

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
<a @if($lockable === true && $locked !== null) href="#" @else href="{{ $route }}" @endif class="text-pinky-500 underline font-medium hover:text-pinky-900">{{ $label }}</a>
2+
@if($external === true)<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="inline h-5 w-5 text-pinky-800">
3+
<path fill-rule="evenodd" d="M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z" clip-rule="evenodd" />
4+
<path fill-rule="evenodd" d="M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z" clip-rule="evenodd" />
5+
</svg>@endif

resources/views/faqs.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139

140140
<p>
141141
Budget does not and will not support Open Banking. However, after the release of
142-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="Budget Pro" />,
142+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="Budget Pro" :external="true" />,
143143
one of our first priorities based on user feedback will be to add Open Banking support.
144144
</p>
145145

resources/views/landing.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<p class="mt-4 text-lg text-gray-800">
4444
Budget has everything you need to manage a simple Budget, if you need more control and
4545
power you can try out Budget Pro with a
46-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="30 day free trial." />
46+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="30 day free trial." :external="true" />
4747
</p>
4848

4949
<dl class="mt-16 grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 sm:gap-y-16 lg:gap-x-8">

resources/views/reasons-to-start-budgeting.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<p>
127127
If you’re kids are approaching their teenage years (good luck!), now is a great time to have them learn about
128128
how to manage their money and start budgeting. Make sure they check out our
129-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com/money-and-budgeting-for-teenagers" label="Money and Budgeting for Teenagers Page" />
129+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com/money-and-budgeting-for-teenagers" label="Money and Budgeting for Teenagers Page" :external="true" />
130130
on Budget Pro.
131131
</p>
132132

@@ -172,7 +172,7 @@
172172
<p>
173173
Whatever your reason for wanting to start a budget, we have this free Budget Calculator that
174174
can help you get started and if you need more power you can make use of our 30 day free trial
175-
of <x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="Budget Pro" />.
175+
of <x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="Budget Pro" :external="true" />.
176176
</p>
177177

178178
</div>

resources/views/what-is-budgeting.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
<p class="mt-8 text-xl leading-8 text-gray-500">
6767
There are several different approaches to budgeting and what works for one person, may not
6868
work for someone else. You can read about
69-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com/our-budgeting-story" label="our-budgeting-story" />
70-
and the approach we decided to adopt on Budget Pro.
69+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com/our-budgeting-story" label="our-budgeting-story" :external="true" />
70+
and the approach we decided to adopt on Budget Pro.
7171
</p>
7272
</div>
7373
<div class="prose prose-lg prose-indigo mx-auto mt-6 text-gray-500">
@@ -136,7 +136,7 @@
136136
our <x-helper.control.link.text :route="route('landing')" label="Free Budget App" />
137137
will help you take control of your finances and plan your spending.
138138
However, if you’d like more advanced features for managing your budget, you can try our
139-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="Budget Pro App" />, it is free for the first 30 days and then just &19.99 for a lifetime license.
139+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com" label="Budget Pro App" :external="true" />, it is free for the first 30 days and then just &19.99 for a lifetime license.
140140
</p>
141141

142142
</div>

resources/views/why-is-budgeting-important.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
you back. Perhaps you’re spending money on things you really don’t need such as unused
123123
subscriptions. Your budget can help you shine a light on unnecessary spending and redirect
124124
that money towards your financial goals. Check out our Budget Pro article on
125-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com/how-to-stop-impulse-spending" label="managing impulse spending" />.
125+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com/how-to-stop-impulse-spending" label="managing impulse spending" :external="true" />.
126126
</p>
127127

128128
<h2>Having a budget helps reduce stress</h2>
@@ -137,7 +137,7 @@
137137
<p>
138138
This article provides a brief overview of why it’s important to have a budget but if you’d
139139
like more information, there is a more detailed article on
140-
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com/why-is-budgeting-important" label="Budget Pro" />.
140+
<x-helper.control.link.text route="https://budget-pro.costs-to-expect.com/why-is-budgeting-important" label="Budget Pro" :external="true" />.
141141
</p>
142142

143143

0 commit comments

Comments
 (0)