Skip to content

Commit 07959bc

Browse files
committed
Publish 2025-10-31
1 parent d8fac5c commit 07959bc

File tree

21 files changed

+202
-0
lines changed

21 files changed

+202
-0
lines changed

elements/jump-top-short.js

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
// @ts-check
2+
3+
import {country, isHCountry} from './locales.js';
4+
import {
5+
createHTMLElement as html,
6+
$,
7+
} from './utils.js';
8+
import {clicker} from './stats.js';
9+
10+
const jumpURL = 'https://apps.apple.com/us/app/money-jump-13th-ave-madness/id6744975454';
11+
const jumpTryURL = 'https://darkreader.ltd/moneyjump/try/';
12+
13+
const htmlText = `
14+
<section class="container">
15+
<i class="jump-icon"></i>
16+
<section class="content">
17+
<div class="label">Celebrate <span class="dark-reader">Halloween</span> with us</div>
18+
<div class="description">
19+
Try the funny game that we made!
20+
</div>
21+
<div class="links">
22+
<a class="badge-link" href="${jumpURL}" target="_blank" rel="noopener" data-s="jump-top-badge">
23+
<img src="/images/app-store-badge.svg">
24+
</a>
25+
<a class="text-link" href="${jumpTryURL}" target="_blank" rel="noopener" data-s="jump-try-text">
26+
Play in browser
27+
</a>
28+
</div>
29+
</section>
30+
</section>`;
31+
32+
const cssText = `
33+
.container {
34+
align-items: center;
35+
display: flex;
36+
flex-direction: row;
37+
gap: 1rem;
38+
justify-content: center;
39+
padding-top: 0;
40+
}
41+
:host {
42+
container-type: inline-size;
43+
width: 100%;
44+
}
45+
.jump-icon {
46+
background-image: url(/images/icons/icon-jump-256.png);
47+
background-position: center;
48+
background-repeat: no-repeat;
49+
background-size: cover;
50+
display: inline-block;
51+
height: 8rem;
52+
margin-top: 0.5rem;
53+
width: 8rem;
54+
}
55+
.content {
56+
color: var(--color-text);
57+
display: flex;
58+
flex-direction: column;
59+
gap: 0.5rem;
60+
}
61+
.label {
62+
color: var(--color-highlight);
63+
font-size: 1.35rem;
64+
font-weight: bold;
65+
line-height: 1;
66+
-webkit-text-stroke: 0.0625rem;
67+
}
68+
.description {
69+
font-size: 1.1rem;
70+
font-weight: bold;
71+
}
72+
.links {
73+
align-items: center;
74+
display: flex;
75+
flex-direction: row;
76+
gap: 0.75rem;
77+
}
78+
.badge-link {
79+
display: inline-block;
80+
}
81+
.badge-link img {
82+
display: inline-block;
83+
width: 10rem;
84+
}
85+
.text-link {
86+
color: var(--color-text);
87+
transition: color 250ms;
88+
}
89+
.text-link:hover {
90+
color: white;
91+
}
92+
@container (width >= 28rem) {
93+
}
94+
`;
95+
96+
class JumpTopShortElement extends HTMLElement {
97+
constructor() {
98+
super();
99+
const shadowRoot = this.attachShadow({mode: 'open'});
100+
101+
const style = html('style', {}, cssText);
102+
shadowRoot.append(style);
103+
style.insertAdjacentHTML('afterend', htmlText);
104+
105+
if (this.hasAttribute('side')) {
106+
shadowRoot.querySelectorAll('[data-s]').forEach((node) => {
107+
const s = node.getAttribute('data-s') ?? '';
108+
node.setAttribute('data-s', s.replace('-top-', '-side-'));
109+
});
110+
}
111+
112+
$(shadowRoot).find('[data-s]').each((node) => clicker(node, node.getAttribute('data-s') ?? ''));
113+
}
114+
}
115+
116+
customElements.define('darkreader-jump-top-short', JumpTopShortElement);

help/be/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

help/cs/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

help/de/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

help/en/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

help/es/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

help/fr/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

help/it/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

help/ja/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

help/mobile/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<darkreader-safari-top-short></darkreader-safari-top-short>
4747
<script type="module" src="/elements/safari-top-short.js"></script>
4848
</div>
49+
<div class="v2-secondary-banner v2-banner-jump">
50+
<darkreader-jump-top-short></darkreader-jump-top-short>
51+
<script type="module" src="/elements/jump-top-short.js"></script>
52+
</div>
4953
</div>
5054
</div>
5155
<header class="page-grid-header">

0 commit comments

Comments
 (0)