add part function
All checks were successful
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2024-02-20 13:03:06 +01:00
parent 4766c00c9b
commit 4a6c986a66
8 changed files with 102 additions and 110 deletions

View File

@@ -2,6 +2,8 @@ use std::fs;
use risp::law::{Content, Heading, HeadingContent, Law, Section};
use crate::part::Parts;
fn print_content(content: Content) -> String {
let mut ret = String::new();
@@ -114,6 +116,8 @@ pub(crate) fn create_law_files() -> String {
.replace("{{content}}", &content)
.replace("{{title}}", &lawname);
let site = Parts::new().perform(site);
li_of_files.push_str(&format!(
"<li><a href='./{law_name}' title='{law_name}' class='contrast'>{lawname}</a></li>"
));