-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/button-updates' into develop
- Loading branch information
Showing
22 changed files
with
182 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
(function() { | ||
"use strict"; | ||
|
||
document.querySelectorAll('a[href$=".pdf"]').forEach(function(item) { | ||
item.innerHTML += ' (pdf)'; | ||
document.querySelectorAll('a[href$=".pdf"]').forEach(function(link) { | ||
const pdfSpan = document.createElement("span"); | ||
const pdfLabel = document.createTextNode(" (pdf)"); | ||
if(link.classList.contains('button') && link.children.length > 0) { | ||
const lastChild = link.children.length - 1; | ||
pdfSpan.appendChild(pdfLabel); | ||
link.children[lastChild].appendChild(pdfSpan); | ||
} else if(!link.classList.contains('button') && link.getElementsByTagName('img').length > 0) { | ||
pdfSpan.appendChild(pdfLabel); | ||
link.appendChild(pdfSpan); | ||
|
||
} else { | ||
link.innerHTML += ' (pdf)'; | ||
} | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// pdf.js appends a span for styling | ||
a[href$=".pdf"] img + span { | ||
@apply bg-green-600 text-white rounded-sm absolute right-0 bottom-0 pt-0.5 pb-1 px-2 mr-1 mb-1 leading-none font-bold text-sm tracking-wide; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
resources/views/components/buttons/bg-image-dark.blade.php
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
resources/views/components/buttons/bg-image-light.blade.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
{{-- | ||
$button => array // ['title', 'link', 'excerpt'] | ||
$button => array // ['title', 'link', 'excerpt', 'relative_url'] | ||
--}} | ||
|
||
@if(!empty($button['link'])) | ||
<a href="{{ $button['link'] }}" class="button @if(!empty($button['excerpt']) || !empty($button['relative_url']) || !empty($button['secondary_relative_url']))button--two-line @endif {{ $class ?? '' }}"> | ||
@if(!empty($button['relative_url']) || !empty($button['secondary_relative_url']))<img src="{{ $button['relative_url'] ?? $button['secondary_relative_url'] }}" alt="{{ $button['filename_alt_text'] ?? $button['secondary_alt_text'] }}">@endif | ||
<a href="{{ $button['link'] }}" class="button {{ $class }} @if(!empty($button['excerpt'])) button--two-line @elseif(!empty($button['relative_url'])) button--icon-one-line @endif "> | ||
@if(!empty($button['relative_url'])) @image($button['relative_url'], $button['filename_alt_text'], 'button__image lazy') @endif | ||
|
||
<div>{{ $button['title'] }}</div> | ||
|
||
@if(!empty($button['excerpt']))<div>{{ $button['excerpt'] }}</div>@endif | ||
<div class="button__title">{{ $button['title'] }}</div> | ||
@if(!empty($button['excerpt']))<div class="button__excerpt">{{ $button['excerpt'] }}</div>@endif | ||
</a> | ||
@endif |
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
resources/views/components/buttons/green-gradient.blade.php
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.