tangled
alpha
login
or
join now
margin.at
/
margin
90
fork
atom
Margin is an open annotation layer for the internet. Powered by the AT Protocol.
margin.at
extension
web
atproto
comments
90
fork
atom
overview
issues
4
pulls
1
pipelines
add iOS shortcut to landing page
scanash.com
1 month ago
1671dabc
00e0d2a6
+81
-63
1 changed file
expand all
collapse all
unified
split
web
src
pages
Landing.jsx
+81
-63
web/src/pages/Landing.jsx
···
11
Shield,
12
Zap,
13
} from "lucide-react";
14
-
import { SiFirefox, SiGooglechrome, SiBluesky } from "react-icons/si";
15
import { FaEdge } from "react-icons/fa";
16
import logo from "../assets/logo.svg";
17
···
19
typeof navigator !== "undefined" && /Firefox/i.test(navigator.userAgent);
20
const isEdge =
21
typeof navigator !== "undefined" && /Edg/i.test(navigator.userAgent);
0
0
0
0
0
0
0
0
22
23
function getExtensionInfo() {
0
0
0
0
0
0
0
0
24
if (isFirefox) {
25
return {
26
url: "https://addons.mozilla.org/en-US/firefox/addon/margin/",
···
451
rel="noreferrer"
452
className="btn btn-primary btn-lg"
453
>
454
-
<ext.Icon size={18} />
455
-
Install for {ext.label}
456
</a>
457
{user ? (
458
<Link to="/home" className="btn btn-secondary btn-lg">
···
466
</Link>
467
)}
468
</div>
469
-
<p className="landing-browsers">
470
-
Also available for{" "}
471
-
{isFirefox ? (
472
-
<>
473
-
<a
474
-
href="https://microsoftedge.microsoft.com/addons/detail/margin/nfjnmllpdgcdnhmmggjihjbidmeadddn"
475
-
target="_blank"
476
-
rel="noreferrer"
477
-
>
478
-
Edge
479
-
</a>{" "}
480
-
and{" "}
481
-
<a
482
-
href="https://chromewebstore.google.com/detail/margin/cgpmbiiagnehkikhcbnhiagfomajncpa/"
483
-
target="_blank"
484
-
rel="noreferrer"
485
-
>
486
-
Chrome
487
-
</a>
488
-
</>
489
-
) : isEdge ? (
490
-
<>
491
-
<a
492
-
href="https://addons.mozilla.org/en-US/firefox/addon/margin/"
493
-
target="_blank"
494
-
rel="noreferrer"
495
-
>
496
-
Firefox
497
-
</a>{" "}
498
-
and{" "}
499
-
<a
500
-
href="https://chromewebstore.google.com/detail/margin/cgpmbiiagnehkikhcbnhiagfomajncpa/"
501
-
target="_blank"
502
-
rel="noreferrer"
503
-
>
504
-
Chrome
505
-
</a>
506
-
</>
507
-
) : (
508
-
<>
509
-
<a
510
-
href="https://addons.mozilla.org/en-US/firefox/addon/margin/"
511
-
target="_blank"
512
-
rel="noreferrer"
513
-
>
514
-
Firefox
515
-
</a>{" "}
516
-
and{" "}
517
-
<a
518
-
href="https://microsoftedge.microsoft.com/addons/detail/margin/nfjnmllpdgcdnhmmggjihjbidmeadddn"
519
-
target="_blank"
520
-
rel="noreferrer"
521
-
>
522
-
Edge
523
-
</a>
524
-
</>
525
-
)}
526
-
</p>
0
0
527
</div>
528
</section>
529
···
675
rel="noreferrer"
676
className="btn btn-primary btn-lg"
677
>
678
-
<ext.Icon size={18} />
679
-
Get the Extension
680
</a>
681
</div>
682
</section>
···
11
Shield,
12
Zap,
13
} from "lucide-react";
14
+
import { SiFirefox, SiGooglechrome, SiBluesky, SiApple } from "react-icons/si";
15
import { FaEdge } from "react-icons/fa";
16
import logo from "../assets/logo.svg";
17
···
19
typeof navigator !== "undefined" && /Firefox/i.test(navigator.userAgent);
20
const isEdge =
21
typeof navigator !== "undefined" && /Edg/i.test(navigator.userAgent);
22
+
const isIOS =
23
+
typeof navigator !== "undefined" &&
24
+
/iPad|iPhone|iPod/.test(navigator.userAgent);
25
+
const isSafari =
26
+
typeof navigator !== "undefined" &&
27
+
/Safari/.test(navigator.userAgent) &&
28
+
!/Chrome/.test(navigator.userAgent);
29
+
const isIOSSafari = isIOS && isSafari;
30
31
function getExtensionInfo() {
32
+
if (isIOSSafari) {
33
+
return {
34
+
url: "https://www.icloud.com/shortcuts/21c87edf29b046db892c9e57dac6d1fd",
35
+
Icon: SiApple,
36
+
label: "iOS",
37
+
isShortcut: true,
38
+
};
39
+
}
40
if (isFirefox) {
41
return {
42
url: "https://addons.mozilla.org/en-US/firefox/addon/margin/",
···
467
rel="noreferrer"
468
className="btn btn-primary btn-lg"
469
>
470
+
{ext.Icon && <ext.Icon size={18} />}
471
+
{ext.isShortcut ? "Get iOS Shortcut" : `Install for ${ext.label}`}
472
</a>
473
{user ? (
474
<Link to="/home" className="btn btn-secondary btn-lg">
···
482
</Link>
483
)}
484
</div>
485
+
{!isIOSSafari && (
486
+
<p className="landing-browsers">
487
+
Also available for{" "}
488
+
{isFirefox ? (
489
+
<>
490
+
<a
491
+
href="https://microsoftedge.microsoft.com/addons/detail/margin/nfjnmllpdgcdnhmmggjihjbidmeadddn"
492
+
target="_blank"
493
+
rel="noreferrer"
494
+
>
495
+
Edge
496
+
</a>{" "}
497
+
and{" "}
498
+
<a
499
+
href="https://chromewebstore.google.com/detail/margin/cgpmbiiagnehkikhcbnhiagfomajncpa/"
500
+
target="_blank"
501
+
rel="noreferrer"
502
+
>
503
+
Chrome
504
+
</a>
505
+
</>
506
+
) : isEdge ? (
507
+
<>
508
+
<a
509
+
href="https://addons.mozilla.org/en-US/firefox/addon/margin/"
510
+
target="_blank"
511
+
rel="noreferrer"
512
+
>
513
+
Firefox
514
+
</a>{" "}
515
+
and{" "}
516
+
<a
517
+
href="https://chromewebstore.google.com/detail/margin/cgpmbiiagnehkikhcbnhiagfomajncpa/"
518
+
target="_blank"
519
+
rel="noreferrer"
520
+
>
521
+
Chrome
522
+
</a>
523
+
</>
524
+
) : (
525
+
<>
526
+
<a
527
+
href="https://addons.mozilla.org/en-US/firefox/addon/margin/"
528
+
target="_blank"
529
+
rel="noreferrer"
530
+
>
531
+
Firefox
532
+
</a>{" "}
533
+
and{" "}
534
+
<a
535
+
href="https://microsoftedge.microsoft.com/addons/detail/margin/nfjnmllpdgcdnhmmggjihjbidmeadddn"
536
+
target="_blank"
537
+
rel="noreferrer"
538
+
>
539
+
Edge
540
+
</a>
541
+
</>
542
+
)}
543
+
</p>
544
+
)}
545
</div>
546
</section>
547
···
693
rel="noreferrer"
694
className="btn btn-primary btn-lg"
695
>
696
+
{ext.Icon && <ext.Icon size={18} />}
697
+
{ext.isShortcut ? "Get iOS Shortcut" : "Get the Extension"}
698
</a>
699
</div>
700
</section>