<. use chrono::{TimeZone, Utc}; .> <. let dt = Utc.timestamp_millis(data.created_at); .> <. let date = dt.format("%b %e, %Y").to_string(); .>

<.= data.title .>

<.= data.creator.name .> <.= data.creator.name .> on <.= &date .> · <.= data.reading_time.floor() as usize .> min read

<. let paragraphs = data.content.body_model.paragraphs; .> <. for (pindex, p) in paragraphs.iter().enumerate() {.> <. if pindex == 0 && p.type_ == "H3" {.> <. continue; .> <.}.> <. if p.type_ == "IMG" {.> <. include!("./img.html"); .> <.} else if p.type_ == "P" {.> <. include!("./p.html"); .> <.} else if p.type_ == "H2" {.>

<.= p.text .>

<.} else if p.type_ == "H3" {.>

<.= p.text .>

<.} else if p.type_ == "H4" {.>

<.= p.text .>

<.} else if p.type_ == "H5" {.>
<.= p.text .>
<.} else if p.type_ == "H6" {.>
<.= p.text .>
<.} else if p.type_ == "IFRAME" {.> <. let src = &p.iframe.as_ref().unwrap().media_resource.as_ref().unwrap().href; .> <. if src.contains("gist.github.com"){.> Click here to open gist on GitHub <.} else {.> <.}.> <.}.> <.}.>