feat(predlozhnik): monetize

might as well! if it manages to pay for a beer over the lifetime of
the site, it will have been worth it.

Change-Id: I31ba92ffd4d6e55687f5ee624c44d14d366d0e91
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5990
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2022-07-28 17:13:54 +03:00 committed by tazjin
parent ca608d3e9c
commit 0f1cc9b2bc
2 changed files with 22 additions and 4 deletions

View file

@ -7,5 +7,9 @@
href="https://unpkg.com/terminal.css@0.7.2/dist/terminal.min.css" />
<link data-trunk rel="inline" href="index.css">
<title>Предложник</title>
<!-- Yandex.RTB -->
<script>window.yaContextCb=window.yaContextCb||[]</script>
<script src="https://yandex.ru/ads/system/context.js" async></script>
</head>
</html>

View file

@ -248,10 +248,7 @@ impl Component for Модель {
.map(|п| покажи_падеж(link, self, &вв, *п))
.collect::<Html>();
let объяснение = вв
.объяснение
.map(|exp| exp)
.unwrap_or_else(|| html! {});
let объяснение = вв.объяснение.map(|exp| exp).unwrap_or_else(|| html! {});
let footer = html! {
<footer>
@ -264,6 +261,22 @@ impl Component for Модель {
</footer>
};
let код_рекламы = r#"
window.yaContextCb.push(()=>{
Ya.Context.AdvManager.render({
renderTo: 'yandex_rtb_R-A-1773485-1',
blockId: 'R-A-1773485-1'
})
})
"#;
let реклама = html! {
<div id="ad">
<div id="yandex_rtb_R-A-1773485-1"></div>
<script>{код_рекламы}</script>
</div>
};
html! {
<>
<div id="header">
@ -284,6 +297,7 @@ impl Component for Модель {
{объяснение}
{footer}
{реклама}
</>
}
}