This commit is contained in:
BOHUNG 2020-03-26 19:03:15 +08:00
parent 9ee92f9e90
commit 87799a5027
1 changed files with 0 additions and 6 deletions

View File

@ -37,12 +37,6 @@ all_template.each do |folder|
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?
File.open(folder+'assets/stylesheets/template/base/_unity.scss', 'a') do |file|
file.puts "@charset \"utf-8\";\n\n@import \"variables\";\n\n// Title\n.unity-title {\n margin: 0.5em 0;\n line-height: 1.5;\n font-family: $main-font;\n font-size: $font-h1;\n\n .layout-footer & {\n margin-bottom: 10px;\n border-bottom: none;\n\n span {\n display: inline;\n margin-bottom: 0;\n border-bottom: none;\n }\n }\n}\n\n.status {\n font-family: $main-font;\n font-size: 0.75rem;\n}\n\n.status-top {\n background-color: $theme-color-second;\n}\n\n.status-hot {\n background-color: $theme-color-third;\n}\n\n.status-source {\n background-color: $theme-color-main;\n\n a {\n color: $theme-white;\n }\n}\n"
end
end
filename = folder+'home/header.html.erb'
texts = File.read(filename)
texts_html = Nokogiri::HTML.parse(texts)