feat(corp/tvixbolt): add an ad in the footer
As previously mentioned on IRC, this is why tvixbolt is under //corp. The majority of people in our community probably block ads anyways, but might as well ... The ad account is linked to the TVL legal entity. The ad is configured not to use any personalised data. In testing it's showing me lamps and shoes. This is the same kind of ad as on my grammar page, predlozhnik.ru Change-Id: I172881ed5d5ceb1fdeb2298b8f822d0c2a6518a8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6558 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
4c91102a7c
commit
e726df8dc5
2 changed files with 25 additions and 0 deletions
|
@ -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>Tvixbolt</title>
|
||||
|
||||
<!-- Yandex.RTB -->
|
||||
<script>window.yaContextCb=window.yaContextCb||[]</script>
|
||||
<script src="https://yandex.ru/ads/system/context.js" async></script>
|
||||
</head>
|
||||
</html>
|
||||
|
|
|
@ -36,6 +36,26 @@ fn tvixbolt_overview() -> Html {
|
|||
}
|
||||
}
|
||||
|
||||
/// This renders an ad in the Tvixbolt footer. Most people that end up
|
||||
/// on Tvixbolt will probably block this anyways, but might as well.
|
||||
fn ad() -> Html {
|
||||
let ad_code = r#"
|
||||
window.yaContextCb.push(()=>{
|
||||
Ya.Context.AdvManager.render({
|
||||
renderTo: 'yandex_rtb_R-A-1943274-1',
|
||||
blockId: 'R-A-1943274-1'
|
||||
})
|
||||
})
|
||||
"#;
|
||||
|
||||
html! {
|
||||
<div id="ad">
|
||||
<div id="yandex_rtb_R-A-1943274-1"></div>
|
||||
<script>{ad_code}</script>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
fn footer_link(location: &'static str, name: &str) -> Html {
|
||||
html! {
|
||||
<>
|
||||
|
@ -57,6 +77,7 @@ fn footer() -> Html {
|
|||
{"© ООО ТВЛ"}
|
||||
</p>
|
||||
<p class="lod">{"ಠ_ಠ"}</p>
|
||||
{ad()}
|
||||
</footer>
|
||||
</>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue