mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-08 08:44:27 +00:00
Introduce inline_svg
gem, minimal usage, prep for material design icons (#29612)
This commit is contained in:
parent
4e61bce4e9
commit
6c68c3c0ce
1
Gemfile
1
Gemfile
|
@ -59,6 +59,7 @@ gem 'http', '~> 5.1'
|
|||
gem 'http_accept_language', '~> 2.1'
|
||||
gem 'httplog', '~> 1.6.2'
|
||||
gem 'idn-ruby', require: 'idn'
|
||||
gem 'inline_svg'
|
||||
gem 'kaminari', '~> 1.2'
|
||||
gem 'link_header', '~> 0.0'
|
||||
gem 'mime-types', '~> 3.5.0', require: 'mime/types/columnar'
|
||||
|
|
|
@ -350,6 +350,9 @@ GEM
|
|||
rainbow (>= 2.2.2, < 4.0)
|
||||
terminal-table (>= 1.5.1)
|
||||
idn-ruby (0.1.5)
|
||||
inline_svg (1.9.0)
|
||||
activesupport (>= 3.0)
|
||||
nokogiri (>= 1.6)
|
||||
io-console (0.7.2)
|
||||
irb (1.12.0)
|
||||
rdoc
|
||||
|
@ -865,6 +868,7 @@ DEPENDENCIES
|
|||
httplog (~> 1.6.2)
|
||||
i18n-tasks (~> 1.0)
|
||||
idn-ruby
|
||||
inline_svg
|
||||
irb (~> 1.8)
|
||||
json-ld
|
||||
json-ld-preloaded (~> 3.2)
|
||||
|
|
|
@ -114,7 +114,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def check_icon
|
||||
content_tag(:svg, tag.path('fill-rule': 'evenodd', 'clip-rule': 'evenodd', d: 'M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z'), xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 20 20', fill: 'currentColor')
|
||||
inline_svg_tag 'check.svg'
|
||||
end
|
||||
|
||||
def visibility_icon(status)
|
||||
|
|
4
app/javascript/images/check.svg
Normal file
4
app/javascript/images/check.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z" />
|
||||
</svg>
|
After Width: | Height: | Size: 293 B |
3
config/initializers/propshaft.rb
Normal file
3
config/initializers/propshaft.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.config.assets.paths << Rails.root.join('app', 'javascript', 'images')
|
Loading…
Reference in a new issue