' + file.gsub(/_.*$/, '').to_i.to_s + '. ' + title + '
' + "\n" + '[' + $template_lang[locale]['published'] + ' ' + date + ']
' + "\n" + diff --git a/config/build/pos2htmls b/config/build/pos2htmls index 6efdebc..cce632c 100755 --- a/config/build/pos2htmls +++ b/config/build/pos2htmls @@ -98,39 +98,36 @@ Dir.glob(po_dir + '*/*.po').each do |po| # Cleans headers and footers and adds new headers and footers html_tmp = File.read(html_name).split(/\n/)[8..-3] - # Only if it has content - if html_tmp.length > 0 - html_tmp = html_tmp.unshift(File.read('../../../' + template_dir + 'header.html')) - html_tmp = html_tmp.unshift(File.read('../../../' + template_dir + 'head.html')) - if hash['file'] =~ /^\d+/ - html_tmp = html_tmp.push(' ') - end - html_tmp = html_tmp.push(File.read('../../../' + template_dir + 'footer.html')) - - # Some unnecessary cleaning - html_tmp = html_tmp.map{|l| l.gsub(/\s{8}/, ' ')} - html_tmp = html_tmp.join("\n").gsub(/\n\n/, "\n") - - # Replaces string according the file, the date and the location - html_tmp = html_tmp.gsub('@locale', hash['locale']) - html_tmp = html_tmp.gsub('@title', hash['title']) - html_tmp = html_tmp.gsub('@file', hash['file']) - html_tmp = html_tmp.gsub('@links', $template_lang[hash['locale']]['links']) - html_tmp = html_tmp.gsub('@about', $template_lang[hash['locale']]['about']) - html_tmp = html_tmp.gsub('@contact', $template_lang[hash['locale']]['contact']) - html_tmp = html_tmp.gsub('@fork', $template_lang[hash['locale']]['fork']) - html_tmp = html_tmp.gsub('@donate', $template_lang[hash['locale']]['donate']) - html_tmp = html_tmp.gsub('@copyfarleft', $template_lang[hash['locale']]['copyfarleft']) - html_tmp = html_tmp.gsub('@license', $template_lang[hash['locale']]['license']) - html_tmp = html_tmp.gsub('@published', $template_lang[hash['locale']]['published']) - html_tmp = html_tmp.gsub('@build', $template_lang[hash['locale']]['build']) - html_tmp = html_tmp.gsub('@date', Time.now.strftime('%Y/%m/%d, %H:%M')) - - # Save the data - file = File.open(html_name, 'w:utf-8') - file.puts html_tmp - file.close + html_tmp = html_tmp.unshift(File.read('../../../' + template_dir + 'header.html')) + html_tmp = html_tmp.unshift(File.read('../../../' + template_dir + 'head.html')) + if hash['file'] =~ /^\d+/ + html_tmp = html_tmp.push(' ') end + html_tmp = html_tmp.push(File.read('../../../' + template_dir + 'footer.html')) + + # Some unnecessary cleaning + html_tmp = html_tmp.map{|l| l.gsub(/\s{8}/, ' ')} + html_tmp = html_tmp.join("\n").gsub(/\n\n/, "\n") + + # Replaces string according the file, the date and the location + html_tmp = html_tmp.gsub('@locale', hash['locale']) + html_tmp = html_tmp.gsub('@title', hash['title']) + html_tmp = html_tmp.gsub('@file', hash['file']) + html_tmp = html_tmp.gsub('@links', $template_lang[hash['locale']]['links']) + html_tmp = html_tmp.gsub('@about', $template_lang[hash['locale']]['about']) + html_tmp = html_tmp.gsub('@contact', $template_lang[hash['locale']]['contact']) + html_tmp = html_tmp.gsub('@fork', $template_lang[hash['locale']]['fork']) + html_tmp = html_tmp.gsub('@donate', $template_lang[hash['locale']]['donate']) + html_tmp = html_tmp.gsub('@copyfarleft', $template_lang[hash['locale']]['copyfarleft']) + html_tmp = html_tmp.gsub('@license', $template_lang[hash['locale']]['license']) + html_tmp = html_tmp.gsub('@published', $template_lang[hash['locale']]['published']) + html_tmp = html_tmp.gsub('@build', $template_lang[hash['locale']]['build']) + html_tmp = html_tmp.gsub('@date', Time.now.strftime('%Y/%m/%d, %H:%M')) + + # Save the data + file = File.open(html_name, 'w:utf-8') + file.puts html_tmp + file.close Dir.chdir('../../..') end diff --git a/config/template/site/footer.html b/config/template/site/footer.html index c21f5fd..ec792a8 100644 --- a/config/template/site/footer.html +++ b/config/template/site/footer.html @@ -3,7 +3,7 @@@copyfarleft @license (LEAL).
@build @date.
- +