Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
refactor: add a helper function to add a P with static text
Lars Wirzenius committed 1 year ago
commit c808b03cabce626beed1b7ce6abf5560a58f5127
parent 404a8dcd979b8652d54d7ab3bb99439fe5d018e4
1 file changed +5 -2
modified src/pages.rs
@@ -135,8 +135,7 @@ impl PageData {
        );

        Self::h1(&mut doc, "Repositories");
-

-
        doc.push_to_body(Element::new(Tag::P).with_text("Latest CI run for each repository."));
+
        Self::p_text(&mut doc, "Latest CI run for each repository.");

        let mut list = Element::new(Tag::Ul).with_class("repolist");
        for (alias, rid) in self.repos() {
@@ -259,6 +258,10 @@ impl PageData {
        page.push_to_body(Element::new(Tag::H2).with_text(text));
    }

+
    fn p_text(page: &mut HtmlPage, text: &str) {
+
        page.push_to_body(Element::new(Tag::P).with_text(text));
+
    }
+

    fn whence_as_html(whence: &Whence) -> Element {
        match whence {
            Whence::Branch {