fix error

This commit is contained in:
BOHUNG 2020-03-26 18:35:22 +08:00
parent c30650d35d
commit 12308ea6f8
1 changed files with 3 additions and 4 deletions

View File

@ -32,12 +32,11 @@ f.write(@file_text)
f.close
puts "finish change patchfile in #{ENV['PWD']}/app/views/shared"
check_text = '<a title="homepage" class="navbar-brand" href="/"><img class="site-logo" src="{{logo_url}}" alt="Site Logo"> {{site_name}}</a>'
change_text = '<a title="{{site_title_1}}" class="navbar-brand" href="{{home_link_1}}"><img class="site-logo" src="{{logo_url_1}}" alt="Site Logo"></a>
<script>$(document).ready(function(){var url =$(\'.site-logo\').eq(0).attr(\'src\');if(url == "/assets/default-site-logo.png"){$(\'.navbar-brand\').eq(0).remove();};if($(\'.navbar-brand\').length == 2){$(\'.site-logo\').css(\'height\',\'auto\')};$(\'.site-logo\').eq(0).css(\'margin-right\',0);$(\'.navbar-brand\').css(\'padding-right\',0)})</script>
<a title="{{site_title}}" class="navbar-brand" href="{{home_link}}"><img class="site-logo" src="{{logo_url}}" alt="Site Logo"> {{site_name}}</a>'
change_text = '<a title="{{site_title_1}}" class="navbar-brand" href="{{home_link_1}}"><img class="site-logo" src="{{logo_url_1}}" alt="Site Logo"></a><script>$(document).ready(function(){var url =$(\'.site-logo\').eq(0).attr(\'src\');if(url == "/assets/default-site-logo.png"){$(\'.navbar-brand\').eq(0).remove();};if($(\'.navbar-brand\').length == 2){$(\'.site-logo\').css(\'height\',\'auto\')};$(\'.site-logo\').eq(0).css(\'margin-right\',0);$(\'.navbar-brand\').css(\'padding-right\',0)})</script><a title="{{site_title}}" class="navbar-brand" href="{{home_link}}"><img class="site-logo" src="{{logo_url}}" alt="Site Logo"> {{site_name}}</a>'
all_template.each do |folder|
if !folder.include?('mobile')
begin
puts "changing header.html.erb in #{folder}/home/header.html.erb"
if folder.split('/')[-1] != 'mobile'
unity_text = File.read(folder+'home/header.html.erb') rescue ''
if unity_text.split(/\n/).join.strip.empty?
@ -55,7 +54,7 @@ all_template.each do |folder|
end
end
rescue => e
puts "#{e.inspect}\nnot found #{folder}assets/stylesheets/template/base/_variables.scss"
puts "#{e.inspect}\nnot found #{folder}home/header.html.erb"
end
end
end