This commit is contained in:
parent
998ebd481e
commit
62a2cac78e
@ -92,7 +92,9 @@ fn main() {
|
||||
let content = get_content(&path);
|
||||
|
||||
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");
|
||||
}
|
||||
|
@ -1,13 +1,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
h2,h3,h4,h5,h6 {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>ABGB</h1>
|
||||
{{content}}
|
||||
<div class="container">
|
||||
<h1>{{title}}</h1>
|
||||
{{content}}
|
||||
</div>
|
||||
</body>
|
||||
</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