File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,21 @@ def logo_as_symbol(version = :icon)
1212 end
1313
1414 def _logo_as_symbol_wordmark
15- image_path = page_color_scheme == 'light' ? 'images/logo_wordmark_lightbg.png' : 'images/logo_wordmark.png'
16- image_tag ( frontend_asset_path ( image_path ) , class : 'logo logo--wordmark' , height : '24px' )
15+ light_logo = frontend_asset_path ( 'images/logo_wordmark_lightbg.png' )
16+ dark_logo = frontend_asset_path ( 'images/logo_wordmark.png' )
17+
18+ case page_color_scheme
19+ when 'light'
20+ image_tag ( light_logo , class : 'logo logo--wordmark' , height : '24px' )
21+ when 'dark'
22+ image_tag ( dark_logo , class : 'logo logo--wordmark' , height : '24px' )
23+ else
24+ content_tag ( :picture ) do
25+ tag . source ( srcset : light_logo , media : '(prefers-color-scheme: light)' ) +
26+ tag . source ( srcset : dark_logo , media : '(prefers-color-scheme: dark)' ) +
27+ image_tag ( dark_logo , class : 'logo logo--wordmark' , height : '24px' )
28+ end
29+ end
1730 end
1831
1932 def _logo_as_symbol_icon
You can’t perform that action at this time.
0 commit comments