Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
feat: move status.json report front page to the end
Lars Wirzenius committed 1 year ago
commit 54029ae3e7e630065c805a8385cfd498b1da0497
parent 7a11bedc001353d784199515ddfa19dda7632671
1 file changed +16 -12
modified src/pages.rs
@@ -149,18 +149,6 @@ impl PageData {
                .with_text(")"),
        );

-
        let status = StatusData::from(self).as_json()?;
-
        doc.push_to_body(
-
            Element::new(Tag::P).with_child(
-
                Element::new(Tag::A)
-
                    .with_attribute("href", STATUS_JSON)
-
                    .with_text(STATUS_JSON),
-
            ),
-
        );
-
        doc.push_to_body(
-
            Element::new(Tag::Blockquote).with_child(Element::new(Tag::Pre).with_text(&status)),
-
        );
-

        doc.push_to_body(Element::new(Tag::H2).with_text("Repositories"));

        doc.push_to_body(Element::new(Tag::P).with_text("Latest CI run for each repository."));
@@ -253,6 +241,22 @@ impl PageData {
        }
        doc.push_to_body(list);

+
        doc.push_to_body(Element::new(Tag::H2).with_text("Recent status"));
+
        let status = StatusData::from(self).as_json()?;
+
        doc.push_to_body(
+
            Element::new(Tag::P)
+
                .with_text("See also as a separate file ")
+
                .with_child(
+
                    Element::new(Tag::A)
+
                        .with_attribute("href", STATUS_JSON)
+
                        .with_child(Element::new(Tag::Code).with_text(STATUS_JSON)),
+
                )
+
                .with_text(": "),
+
        );
+
        doc.push_to_body(
+
            Element::new(Tag::Blockquote).with_child(Element::new(Tag::Pre).with_text(&status)),
+
        );
+

        Ok(doc)
    }