my cheat html headers
1 Example header:
<head> <title> private date from vm1</title> <style type="text/css"> .centermee { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } .date { color: #ff0000; font-size: 48px; } .season { /* OK, a bit contrived... */ color: #0000a0; } body { font-weight:bold; font-size: 36px; text-align: center; font-style:italic; margin-bottom: 105px; color: #1c8; background-color: #161626 } </style> </head>
2 Generating a web page of a directory listing
If you want to present all the *.html files in a directory to a web page, You can either: Write a server-side script page like PHP, JSP, ASP.net etc to generate this HTML dynamically
Here are some actual solutions:
2.1 Using tree
tree -H '.' -L 1 --noreport --charset utf-8 -P "*.html" -o index.html
2.2 Using php script
Place this in your directory and set where you want it to search on the $path. The first if statement will hide your php file and .htaccess and the error log. It will then display the output with a link. This is very simple code and easy to edit.
<?php echo "Here are our files"; $path = "."; $dh = opendir($path); $i=1; while (($file = readdir($dh)) !== false) { if($file != "." && $file != ".." && $file != "index.php" && $file != ".htaccess" && $file != "error_log" && $file != "cgi-bin") { echo "<a href='$path/$file'>$file</a><br /><br />"; $i++; } } closedir($dh); ?>