pub output_value: Option<u64>,
pub parent: Option<InscriptionId>,
pub previous: Option<InscriptionId>,
pub rune: Option<Rune>,
pub sat: Option<Sat>,
pub satpoint: SatPoint,
pub timestamp: i64,
}
impl PageContent for InscriptionHtml {
fn title(&self) -> String {
format!("Inscription {}", self.inscription_number)
}
fn preview_image_url(&self) -> Option<Trusted<String>> {
Some(Trusted(format!("/content/{}", self.inscription_id)))
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn without_sat_nav_links_or_output() {
assert_regex_match!(
InscriptionHtml {
genesis_fee: 1,
inscription: inscription("text/plain;charset=utf-8", "HELLOWORLD"),
inscription_id: inscription_id(1),
inscription_number: 1,
satpoint: satpoint(1, 0),
..Default::default()
},
"
<h1>Inscription 1</h1>
<div class=inscription>
<div>❮</div>
<iframe .* src=/preview/1{64}i1></iframe>
<div>❯</div>
</div>