Add spacing to before/after hidden data part.

And extract the generation to separate function.
1 files changed, 8 insertions(+), 4 deletions(-)

M index.php
M index.php +8 -4
@@ 61,6 61,10 @@ 
     }
     return sprintf($return_format, $size, $return_unit);
   }
+
+  function hidden_data($data) {
+	return "<i> " . $data . " </i>";
+  }
   // END UTILITY
 
   function tree_link() {

          
@@ 96,9 100,9 @@ 
 
     if ($is_dir) {
       $file_suffix = "/";
-      $list_file_prefix = "<i>0</i>";
+      $list_file_prefix = hidden_data(0);
     } else {
-      $list_file_prefix = "<i>1</i>";
+      $list_file_prefix = hidden_data(1);
     }
 
     foreach($files as $file) {

          
@@ 108,8 112,8 @@ 
       $file_rows .= "<td>". $list_file_prefix . link_to($file . $file_suffix, $file . $file_suffix)."</td>";
 
       $file_rows .= "<td>";
-      if ($is_dir) { $file_rows .= "<i>0</i>[dir]"; }
-      else { $file_rows .= "<i>" . $file_stat["size"] . "</i>" . human_size($file_stat['size']); }
+      if ($is_dir) { $file_rows .= hidden_data(0) . "[dir]"; }
+      else { $file_rows .= hidden_data($file_stat["size"]) . human_size($file_stat['size']); }
       $file_rows .= "</td>";
 
       $file_rows .= "<td>".h(strftime("%Y-%m-%d %H:%M %Z", $file_stat['mtime']))."</td>";