This commit is contained in:
parent
998ebd481e
commit
62a2cac78e
@ -92,7 +92,9 @@ fn main() {
|
|||||||
let content = get_content(&path);
|
let content = get_content(&path);
|
||||||
|
|
||||||
let template = fs::read_to_string("templates/index.html").unwrap();
|
let template = fs::read_to_string("templates/index.html").unwrap();
|
||||||
let site = template.replace("{{content}}", &content);
|
let site = template
|
||||||
|
.replace("{{content}}", &content)
|
||||||
|
.replace("{{title}}", &law_name);
|
||||||
|
|
||||||
fs::write(&format!("output/{law_name}.html"), &site).expect("Unable to write file");
|
fs::write(&format!("output/{law_name}.html"), &site).expect("Unable to write file");
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<style>
|
<link rel="stylesheet" href="style.css" />
|
||||||
h2,h3,h4,h5,h6 {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>ABGB</h1>
|
<div class="container">
|
||||||
|
<h1>{{title}}</h1>
|
||||||
{{content}}
|
{{content}}
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
3
templates/style.css
Normal file
3
templates/style.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
h2,h3,h4,h5,h6 {
|
||||||
|
display: inline;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user