fix error
This commit is contained in:
parent
c30650d35d
commit
12308ea6f8
|
@ -32,12 +32,11 @@ f.write(@file_text)
|
||||||
f.close
|
f.close
|
||||||
puts "finish change patchfile in #{ENV['PWD']}/app/views/shared"
|
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>'
|
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>
|
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>'
|
||||||
<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|
|
all_template.each do |folder|
|
||||||
if !folder.include?('mobile')
|
if !folder.include?('mobile')
|
||||||
begin
|
begin
|
||||||
|
puts "changing header.html.erb in #{folder}/home/header.html.erb"
|
||||||
if folder.split('/')[-1] != 'mobile'
|
if folder.split('/')[-1] != 'mobile'
|
||||||
unity_text = File.read(folder+'home/header.html.erb') rescue ''
|
unity_text = File.read(folder+'home/header.html.erb') rescue ''
|
||||||
if unity_text.split(/\n/).join.strip.empty?
|
if unity_text.split(/\n/).join.strip.empty?
|
||||||
|
@ -55,7 +54,7 @@ all_template.each do |folder|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue => e
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue