Move user theme to the end of the body --> turbolinks has turbo links again

This commit is contained in:
Georg Gadinger 2020-05-09 02:07:58 +02:00
parent d82b7006e8
commit 65f152b762
3 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ module ThemeHelper
body += "}"
content_tag(:style, body, data: { "turbolinks-track": false })
content_tag(:style, body)
end
def get_active_theme

View File

@ -12,13 +12,12 @@
%title= yield(:title)
= javascript_include_tag 'i18n', 'data-turbolinks-track' => true
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= render_theme
= javascript_include_tag 'application', 'data-turbolinks-track' => true
- if user_signed_in?
- if current_user.mod?
= javascript_include_tag 'moderation', 'data-turbolinks-track' => true
= csrf_meta_tags
%body#version1
%body
- if user_signed_in?
= render 'navigation/main'
- else
@ -38,3 +37,4 @@
= `git rev-parse --short HEAD`.strip
%p.text-danger Debug params:
= debug params
= render_theme

View File

@ -18,7 +18,7 @@ describe ThemeHelper, :type => :helper do
end
it "returns a theme" do
expect(helper.render_theme).to include('<style data-turbolinks-track="false">:root {')
expect(helper.render_theme).to include('<style>:root {')
end
it "contains correct theme background colors" do