Class: Blacklight::Icons::CollectionComponent

Inherits:
IconComponent
  • Object
show all
Defined in:
app/components/blacklight/icons/collection_component.rb

Instance Method Summary collapse

Instance Method Details

#svgObject



8
9
10
11
12
13
14
15
# File 'app/components/blacklight/icons/collection_component.rb', line 8

def svg
  <<~SVG
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
    	<title>#{title}</title>
    	<path fill="#6c757d" d="M32 448c0 17.7 14.3 32 32 32h384c17.7 0 32-14.3 32-32V160H32v288zm160-212c0-6.6 5.4-12 12-12h104c6.6 0 12 5.4 12 12v8c0 6.6-5.4 12-12 12H204c-6.6 0-12-5.4-12-12v-8zM480 32H32C14.3 32 0 46.3 0 64v48c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16V64c0-17.7-14.3-32-32-32z"/>
    </svg>
  SVG
end

#titleObject



17
18
19
20
# File 'app/components/blacklight/icons/collection_component.rb', line 17

def title
  key = "blacklight.icon.#{name}"
  t(key)
end