77} from './utils.js' ;
88import { clicker } from './stats.js' ;
99
10+ const edgeURL = 'https://www.microsoft.com/edge/emmx/darkreadercollaboration' ;
1011const safariURL = 'https://apps.apple.com/us/app/dark-reader-for-safari/id1438243180?platform=iphone' ;
1112// const isEdge = navigator.userAgent.includes('Edg');
1213const isMobile = navigator . userAgent . includes ( 'Mobile' ) ;
@@ -19,30 +20,50 @@ const htmlText = `
1920 <div class="notch"></div>
2021 <div class="top">
2122 <span class="darkreader">Dark Reader</span>
22- <span class="mobile">for iOS </span>
23+ <span class="mobile">Mobile </span>
2324 </div>
2425 <div class="text js-text">
2526 Take care of your eyes when browsing on your phone
2627 </div>
28+ <div class="qr">
29+ <img src="/images/qr-code.png">
30+ Scan & Install
31+ </div>
32+ </div>
33+ </div>
34+ <div class="links-block">
35+ <div class="android-wrapper">
36+ <strong class="android-new-text">NEW</strong><br>
37+ <i class="edge-icon"></i> <strong>Microsoft Edge</strong><br>
38+ supports browser<br>
39+ add-ons on <i class="android-icon"></i> <strong>Android</strong>
40+ <div class="badge-wrapper">
41+ <a class="badge-link" href="${ edgeURL } " target="_blank" rel="noopener" data-s="drand-top-short">
42+ <img src="/images/google-play-badge.svg">
43+ </a>
44+ </div>
45+ </div>
46+ <div class="ios-wrapper">
47+ <strong>Install for iPhone & iPad</strong>
2748 <div class="badge-wrapper">
2849 <a class="badge-link" href="${ safariURL } " target="_blank" rel="noopener" data-s="drios-top-short">
2950 <img src="/images/app-store-badge.svg">
3051 </a>
3152 </div>
3253 </div>
33- <div class="qr">
34- Scan & Install<br>
35- <img src="/images/qr-code.png">
36- </div>
3754 </div>
3855</section>` ;
3956
4057const cssText = `
4158:host {
4259 --bezel: 0.125rem;
4360 --color-bezel: var(--color-control, #316d7c);
61+ --phone-height: 18.5rem;
62+ --phone-width: 15rem;
4463}
4564.container {
65+ display: flex;
66+ flex-direction: row;
4667 position: relative;
4768}
4869.phone {
@@ -53,14 +74,15 @@ const cssText = `
5374 box-shadow: 0 0 1rem black;
5475 box-sizing: border-box;
5576 display: flex;
77+ flex: none;
5678 flex-direction: column;
57- height: 12.5rem ;
79+ height: var(--phone-height) ;
5880 justify-content: center;
59- margin-right: 1rem;
60- margin-top: 1rem;
81+ margin-right: 2rem;
6182 position: relative;
62- width: 16rem ;
83+ width: var(--phone-width) ;
6384}
85+ /*
6486.phone::after {
6587 background-image: linear-gradient(to top, var(--color-bg) 1rem, #141e2400);
6688 bottom: -1rem;
@@ -71,6 +93,7 @@ const cssText = `
7193 position: absolute;
7294 width: 18rem;
7395}
96+ */
7497.screen {
7598 align-items: center;
7699 background-image: linear-gradient(to bottom, var(--color-bg), black);
@@ -80,11 +103,11 @@ const cssText = `
80103 box-sizing: border-box;
81104 display: flex;
82105 flex-direction: column;
83- height: 12rem ;
106+ height: calc(var(--phone-height) - 0.5rem) ;
84107 justify-content: flex-start;
85108 margin: 0.5rem auto 0 auto;
86- padding: 2rem 1rem 0 1rem ;
87- width: 15rem ;
109+ padding: 2rem 0 0 0 ;
110+ width: calc(var(--phone-width) - 1rem) ;
88111}
89112.notch {
90113 background-color: black;
@@ -98,7 +121,7 @@ const cssText = `
98121 width: 4rem;
99122}
100123.top {
101- font-size: 1.2rem ;
124+ font-size: 1.1rem ;
102125}
103126.top .darkreader {
104127 color: var(--color-highlight);
@@ -109,8 +132,10 @@ const cssText = `
109132.top .mobile {
110133 color: white;
111134 font-weight: 400;
135+ text-transform: uppercase;
112136}
113137.text {
138+ color: var(--color-text);
114139 margin-top: 0.25rem;
115140 text-align: center;
116141}
@@ -121,8 +146,6 @@ const cssText = `
121146 border-radius: 0.675rem;
122147 box-shadow: 0 0 0 0.0625rem hsla(0, 0%, 100%, 0), 0 0 0 var(--color-text);
123148 display: inline-flex;
124- position: relative;
125- top: 1rem;
126149 transition: all 125ms;
127150 width: 11rem;
128151 z-index: 1;
@@ -135,24 +158,47 @@ const cssText = `
135158 box-shadow: 0 0 0 0.0625rem hsla(0, 0%, 100%, 1), 0 0 0.75rem var(--color-text);
136159}
137160.qr {
138- bottom: 0.5rem;
139- font-size: 1.2rem;
140- font-weight: 300;
141- right: -11rem;
161+ color: white;
162+ font-weight: bold;
142163 margin: 0;
143- position: absolute;
144164 text-align: center;
145165}
146166.qr img {
147167 border-radius: 5%;
148168 box-shadow: 0 0 1rem black;
149169 display: block;
150- height: 7rem ;
170+ height: 8rem ;
151171 margin: 0.5rem auto;
152- width: 7rem ;
172+ width: 8rem ;
153173}
154- .qr {
155- display: none;
174+ .links-block {
175+ color: var(--color-text);
176+ display: flex;
177+ flex-direction: column;
178+ gap: 0.5rem;
179+ }
180+ .edge-icon {
181+ background-image: url(/images/icon-edge-256x256.svg);
182+ background-position: center;
183+ background-repeat: no-repeat;
184+ background-size: contain;
185+ display: inline-block;
186+ height: 1rem;
187+ width: 1rem;
188+ }
189+ .android-icon {
190+ background-image: url(/images/icon-android-dark.svg);
191+ background-position: center;
192+ background-repeat: no-repeat;
193+ background-size: contain;
194+ display: inline-block;
195+ height: 1rem;
196+ width: 1rem;
197+ }
198+ .android-new-text {
199+ color: var(--color-highlight);
200+ font-size: 1.2rem;
201+ -webkit-text-stroke: 0.0625rem;
156202}
157203` ;
158204
0 commit comments