pushg
All checks were successful
CI/CD Pipeline / test (push) Successful in 1m37s

This commit is contained in:
philipp 2024-02-17 10:15:15 +01:00
parent 998ebd481e
commit 62a2cac78e
3 changed files with 11 additions and 8 deletions

View File

@ -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");
} }

View 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
View File

@ -0,0 +1,3 @@
h2,h3,h4,h5,h6 {
display: inline;
}