rustyphoenixlecture 1.7.1

This project aims to provide a simple a powerfull lecture compilation to generate html web sites
/***************************************
	Auteur : Pierre Aubert
	Mail : pierre.aubert@lapp.in2p3.fr
	Licence : CeCILL-C
****************************************/

use std::fs;
use std::path::PathBuf;

///Save the 404 html page in the given output directory
/// # Parameters
/// - `output_dir` : output directory
pub fn phoenix_html_404(output_dir: &PathBuf){
	let body: String = String::from(r#"<!DOCTYPE html>
<html lang="fr">
		<head>
			<meta charset="utf-8" />
			<title>404 not found</title>
			<link rel="stylesheet" href="book/dark.css" />
			<script type="text/javascript">
				function redirectionToIndex(){
					document.location.href="index.html";
				}
			</script>
		</head>
		<body onLoad="setTimeout('redirectionToIndex()', 1000)">
			<div>In 2 seconds you will be redirected on the main page... normally</div>
		</body>
</html>
"#);
	let page_404: PathBuf = output_dir.join(&PathBuf::from("404.html"));
	match fs::write(&page_404, body) {
		Ok(_) => {},
		Err(err) => panic!("phoenix_html_404 : cannot write file {:?}\n\tError {}", page_404, err)
	};
}