UX: Add login button icon to no_ember page (#7982)

This commit is contained in:
David Taylor
2019-08-08 10:44:04 +01:00
committed by GitHub
parent 32b4bdaccd
commit 7bd54eaceb
3 changed files with 19 additions and 1 deletions

View File

@@ -303,6 +303,19 @@ License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL
false
end
# For use in no_ember .html.erb layouts
def self.raw_svg(name)
get_set_cache("raw_svg_#{name}") do
symbol = search(name)
break "" unless symbol
symbol = Nokogiri::XML(symbol).children.first
symbol.name = "svg"
<<~HTML
<svg class="fa d-icon svg-icon svg-node" aria-hidden="true">#{symbol}</svg>
HTML
end.html_safe
end
def self.theme_sprite_variable_name
THEME_SPRITE_VAR_NAME
end