~cytrogen/masto-fe

ref: 86c9c5afa045b9e2cfa41c15db63ad97d58954c1 masto-fe/app/views/layouts/_theme.html.haml -rw-r--r-- 759 bytes
86c9c5af — Claire Merge commit '40ba6e119b7457161fd43b449875d0fb9d473c1a' into glitch-soc/merge-upstream 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
- if theme
  - if theme[:pack] != 'common' && theme[:common]
    = render partial: 'layouts/theme', object: theme[:common]
  - if theme[:pack]
    - pack_path = theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}"
    = javascript_pack_tag pack_path, crossorigin: 'anonymous'
    - if theme[:skin]
      - if !theme[:flavour] || theme[:skin] == 'default'
        = stylesheet_pack_tag pack_path, media: 'all', crossorigin: 'anonymous'
      - else
        = stylesheet_pack_tag "skins/#{theme[:flavour]}/#{theme[:skin]}/#{theme[:pack]}", media: 'all', crossorigin: 'anonymous'
    - theme[:preload]&.each do |link|
      %link{ href: asset_pack_path("#{link}.js"), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/