Add force update index 1 and 3 frontend template.

This commit is contained in:
BoHung Chiu 2021-10-20 11:28:18 +08:00
parent 75b24a6cd0
commit 2dcfaabb66
3 changed files with 7 additions and 3 deletions

View File

@ -93,8 +93,9 @@ all_template.each do |folder|
end
flags << flag
end
force_update_files = ["archive_index1.html.erb","archive_index3.html.erb"]
puts "updating archive index page"
if flags.select{|flag| flag }.count != 0
puts "updating archive index page"
flags.each_with_index do |flag,i|
if flag
Bundler.with_clean_env{%x[cp -f #{app_path}/modules/archive/#{check_files[i]} #{folder}modules/archive/#{check_files[i]}]}
@ -107,6 +108,9 @@ all_template.each do |folder|
end
File.open(info_json_file,"w+"){|f| f.write(info_json)}
end
force_update_files.each do |update_file|
Bundler.with_clean_env{%x[cp -f #{app_path}/modules/archive/#{update_file} #{folder}modules/archive/#{update_file}]}
end
Bundler.with_clean_env{%x[cp -rn #{app_path}/modules/archive/thumbs/* #{folder}modules/archive/thumbs/.]}
rescue
puts "There has some error when updating archive index page."

View File

@ -1,5 +1,5 @@
<div class="i-archive index-archive-1">
<h3 class="i-archive__page-title">{{page-title}}</h3>
<h3 class="i-archive-title">{{page-title}}</h3>
<ul class="i-archive__list list-unstyled" data-list="categories" data-level="0">
<li class="i-archive__item">
<h4 class="i-archive__category-title">{{category-title}}</h4>

View File

@ -1,5 +1,5 @@
<div class="i-archive index-archive-3">
<h3 class="i-archive__page-title">{{page-title}}</h3>
<h3 class="i-archive-title">{{page-title}}</h3>
<ul class="i-archive__list list-unstyled" data-list="categories" data-level="0">
<li class="i-archive__item">
<h4 class="i-archive__category-title">{{category-title}}</h4>