hide download/view/chat buttons if the demo is delete/there is no chat

This commit is contained in:
Robin Appelman 2024-11-30 00:29:12 +01:00
commit 89eb98529b

View file

@ -101,8 +101,11 @@ impl Page for DemoPage {
span.time { (self.demo.duration()) }
}
p.demo-download {
@if !self.demo.url.is_empty() {
a.button.button-primary href = (self.demo.url) download = (self.demo.name) rel = "nofollow" { "Download" }
a.button href = (self.demo.viewer_url()) rel = "nofollow" { "View" }
}
@if !self.demo.chat.is_empty() {
details.chat {
summary.button.button-tertiary { "Toggle Chat" }
div {
@ -118,6 +121,7 @@ impl Page for DemoPage {
}
}
}
}
link rel="stylesheet" type="text/css" href=(style_url);
}
}