Skip to content

Commit

Permalink
Merge pull request #8 from apility/dev
Browse files Browse the repository at this point in the history
Adds url() helper to button href
  • Loading branch information
erikdju authored Mar 12, 2024
2 parents 3bc8074 + 3608131 commit 19ed274
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/newsletter-foundation.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

'button' => [
'sizes' => [
'small' => 'Litem',
'small' => 'Liten',
'medium' => 'Medium',
'large' => 'Stor',
],
Expand All @@ -74,7 +74,7 @@
],
],

/*
/*
|--------------------------------------------------------------------------
| Image formats
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/button-row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

<x-netflex-newsletter-foundation::button
text="{!! $button->name !!}"
href="{{ content($hash.'_link') ? content($hash.'_link')->url : '#' }}"
href="{{ content($hash.'_link') ? content($hash.'_link')->url : '/' }}"
background="{{ content($hash.'_color') ?? config('newsletter-foundation.defaults.button.background') }}"
color="{{ get_newsletter_text_color(content($hash.'_color') ?? config('newsletter-foundation.defaults.button.background')) }}"
padding="{{ get_newsletter_button_padding(content($hash.'_size') ?? config('newsletter-foundation.defaults.button.padding')) }}"
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/button.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@props([
'href' => '#',
'href' => '/',
'background' => config('newsletter-foundation.defaults.button.background'),
'color' => get_newsletter_text_color(config('newsletter-foundation.defaults.button.background')),
'padding' => config('newsletter-foundation.button.padding.'.config('newsletter-foundation.defaults.button.padding')),
Expand All @@ -20,7 +20,7 @@
rel="noopener"
class="{{ $class }}"
target="_blank"
href="{{ $href }}"
href="{{ url($href) }}"
style="background-color: {{ content('color') ?? $background }}; font-size: {{ $fontSize }}; font-weight: {{ $fontWeight }}; padding: {{ $padding }}; color: {{ $color }}; border-radius: {{ $borderRadius }}; border: {{ $border }}; text-decoration:none; display: {{ $display }}; mso-padding-alt: 0; text-align:center;">
<!--[if mso]>
<i style="letter-spacing: 15px; mso-font-width: -100%; mso-text-raise: 20pt;">&nbsp;</i>
Expand Down

0 comments on commit 19ed274

Please sign in to comment.