Skip to content

Commit

Permalink
move svgs to components
Browse files Browse the repository at this point in the history
  • Loading branch information
dnoneill committed Sep 20, 2024
1 parent a9b547a commit 528b302
Show file tree
Hide file tree
Showing 32 changed files with 229 additions and 21 deletions.
1 change: 0 additions & 1 deletion app/assets/images/blacklight/arrow-alt-circle-left.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/arrow-alt-circle-right.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/arrow_back_ios.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/arrow_forward_ios.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/check.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/check_circle.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/chevron_right.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/close.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/edit.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/error.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/highlight_off.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/info.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/warning.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/zoom_in.svg

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/images/blacklight/zoom_out.svg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
cursor: pointer;
}

.blacklight-icon-arrow-alt-circle-left, .blacklight-icon-arrow-alt-circle-right {
.blacklight-icons-arrow-alt-circle-left, .blacklight-icons-arrow-alt-circle-right {
display: inline-block;
fill: $gray-600;
height: 44px;
Expand All @@ -49,7 +49,7 @@
}

[aria-disabled="true"] {
.blacklight-icon-arrow-alt-circle-left, .blacklight-icon-arrow-alt-circle-right {
.blacklight-icons-arrow-alt-circle-left, .blacklight-icons-arrow-alt-circle-right {
fill: $gray-400;

&:hover,&:focus {
Expand All @@ -66,7 +66,7 @@

@media screen and (min-width: breakpoint-min("md")) {
.browse-group-categories-controls {
.blacklight-icon-arrow-alt-circle-left, .blacklight-icon-arrow-alt-circle-right {
.blacklight-icons-arrow-alt-circle-left, .blacklight-icons-arrow-alt-circle-right {
height: 32px;
width: 32px;
}
Expand All @@ -81,7 +81,7 @@
}

[dir="rtl"] {
.browse-group-categories-block .blacklight-icon-arrow-alt-circle-left, .blacklight-icon-arrow-alt-circle-right{
.browse-group-categories-block .blacklight-icons-arrow-alt-circle-left, .blacklight-icons-arrow-alt-circle-right{
transform: rotate(180deg);
}
// Hack to override overflow issue not fixed in RTL upstream in tiny-slider
Expand Down
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/arrow_alt_circle_left_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for ArrowAltCircleLeft
class ArrowAltCircleLeftComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<!-- Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->
<path d="M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm116-292H256v-70.9c0-10.7-13-16.1-20.5-8.5L121.2 247.5c-4.7 4.7-4.7 12.2 0 16.9l114.3 114.9c7.6 7.6 20.5 2.2 20.5-8.5V300h116c6.6 0 12-5.4 12-12v-64c0-6.6-5.4-12-12-12z"/>
</svg>
SVG
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for ArrowAltCircleRight
class ArrowAltCircleRightComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<!-- Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->
<path d="M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zM140 300h116v70.9c0 10.7 13 16.1 20.5 8.5l114.3-114.9c4.7-4.7 4.7-12.2 0-16.9l-114.3-115c-7.6-7.6-20.5-2.2-20.5 8.5V212H140c-6.6 0-12 5.4-12 12v64c0 6.6 5.4 12 12 12z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/arrow_back_ios_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for ArrowBackIos
class ArrowBackIosComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path opacity=".87" fill="none" d="M0 0h24v24H0V0z"/>
<path d="M17.51 3.87L15.73 2.1 5.84 12l9.9 9.9 1.77-1.77L9.38 12l8.13-8.13z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/arrow_forward_ios_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for ArrowForwardIos
class ArrowForwardIosComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path opacity=".87" fill="none" d="M24 24H0V0h24v24z"/>
<path d="M6.49 20.13l1.77 1.77 9.9-9.9-9.9-9.9-1.77 1.77L14.62 12l-8.13 8.13z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/check_circle_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for CheckCircle
class CheckCircleComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z"/>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/check_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for Check
class CheckComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z"/>
<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/chevron_right_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for ChevronRight
class ChevronRightComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z"/>
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/close_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for Close
class CloseComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/edit_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for Edit
class EditComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z"/>
<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM21.41 6.34l-3.75-3.75-2.53 2.54 3.75 3.75 2.53-2.54z"/>
</svg>
SVG
end
end
end
14 changes: 14 additions & 0 deletions app/components/blacklight/icons/error_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for Error
class ErrorComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/highlight_off_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for HighlightOff
class HighlightOffComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/info_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for Info
class InfoComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z"/>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
</svg>
SVG
end
end
end
14 changes: 14 additions & 0 deletions app/components/blacklight/icons/warning_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for Warning
class WarningComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/zoom_in_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for ZoomIn
class ZoomInComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm.5-7H9v2H7v1h2v2h1v-2h2V9h-2z"/>
</svg>
SVG
end
end
end
15 changes: 15 additions & 0 deletions app/components/blacklight/icons/zoom_out_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module Blacklight
module Icons
# Icon for ZoomOut
class ZoomOutComponent < Blacklight::Icons::IconComponent
self.svg = <<~SVG
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7V9z"/>
</svg>
SVG
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<% if group.searches.count > 1 %>
<ul class="browse-group-categories-controls p-0 pt-2 pt-md-0 ml-md-auto ms-md-auto mb-0 d-flex justify-content-center align-items-end">
<li class="prev px-1 overflow-hidden">
<%= blacklight_icon 'arrow-alt-circle-left' %>
<%= blacklight_icon 'arrow_alt_circle_left' %>
</li>
<li class="next px-1 overflow-hidden">
<%= blacklight_icon 'arrow-alt-circle-right' %>
<%= blacklight_icon 'arrow_alt_circle_right' %>
</li>
</ul>
<% end %>
Expand Down

0 comments on commit 528b302

Please sign in to comment.