try
This commit is contained in:
		
							parent
							
								
									75bcbe8159
								
							
						
					
					
						commit
						b11a247303
					
				| 
						 | 
				
			
			@ -40,13 +40,13 @@ all_template.each do |folder|
 | 
			
		|||
        filename = folder+'home/header.html.erb'
 | 
			
		||||
        texts = File.read(filename)
 | 
			
		||||
        texts_html = Nokogiri::HTML.parse(texts)
 | 
			
		||||
        puts texts
 | 
			
		||||
        if texts_html.css('.navbar-brand').length == 1
 | 
			
		||||
          new_texts = texts.gsub(texts_html.css('.navbar-brand').to_s.gsub("%7B",'{').gsub('%7D','}'),change_text)
 | 
			
		||||
          File.open(filename,'w') do |f|
 | 
			
		||||
            f.write new_texts
 | 
			
		||||
          end
 | 
			
		||||
        elsif texts_html.css('.site-title >a').length == 1 && texts_html.css('.navbar-brand').length == 0
 | 
			
		||||
          puts texts
 | 
			
		||||
          new_texts = texts.gsub(texts_html.css('.site-title >a').to_s.gsub("%7B",'{').gsub('%7D','}'),change_text)
 | 
			
		||||
          File.open(filename,'w') do |f|
 | 
			
		||||
            f.write new_texts
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue