Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mastodon
GitHub Repository: mastodon/joinmastodon
Path: blob/main/pages/apps.tsx
1006 views
1
import { sortBy as _sortBy } from "lodash"
2
3
import downloadOnGooglePlay from "../public/badges/google-play.svg"
4
import downloadOnAppStore from "../public/badges/app-store.svg"
5
6
import { FormattedMessage, useIntl } from "react-intl"
7
import Head from "next/head"
8
import Image from "next/legacy/image"
9
import AppHero from "../components/AppHero"
10
import { withDefaultStaticProps } from "../utils/defaultStaticProps"
11
import footer_festival from "../public/illustrations/footer_festival.png"
12
import AppsGrid from "../components/AppsGrid"
13
import TwoUpFeature from "../components/TwoUpFeature"
14
import { apps as appsList } from "../data/apps"
15
import Hero from "../components/Hero"
16
import appsHeroDesktop from "../public/illustrations/apps_hero_desktop.png"
17
import appsHeroMobile from "../public/illustrations/apps_hero_mobile.png"
18
import ios_android_apps from "../public/illustrations/ios_android_apps.png"
19
import Layout from "../components/Layout"
20
21
import ProgressiveWebIcon from "../public/icons/progressive-web.svg?inline"
22
import ApiGearIcon from "../public/icons/api-gear.svg?inline"
23
24
const AppsPage = () => {
25
const intl = useIntl()
26
return (
27
<Layout>
28
<Hero desktopImage={appsHeroDesktop} mobileImage={appsHeroMobile}>
29
<div className="app-intro">
30
<div className="container">
31
<div className="app-intro__hero">
32
<div className="app-intro__hero__unit">
33
<h1 className="h1 mb-5">
34
<FormattedMessage id="apps.title" defaultMessage="Apps" />
35
</h1>
36
37
<p className="sh1">
38
<FormattedMessage
39
id="apps.lead"
40
defaultMessage="The best way to get started with Mastodon is through our official iOS and Android apps, but many third-party apps are also available below."
41
/>
42
</p>
43
</div>
44
</div>
45
</div>
46
</div>
47
</Hero>
48
49
<div className="grid justify-center gap-x-gutter gap-y-16 pt-10 pb-8 text-center md:grid-cols-12 md:text-start">
50
<div className="md:col-span-6 lg:col-span-5 xl:col-span-4 xl:col-start-2">
51
<h2 className="h4 text-center mb-4">
52
<FormattedMessage
53
id="ios_and_android.download"
54
defaultMessage="Official apps"
55
/>
56
</h2>
57
58
<div className="grid grid-cols-2 justify-center gap-gutter md:justify-start">
59
<a href="https://apps.apple.com/us/app/mastodon-for-iphone/id1571998974">
60
<Image
61
src={downloadOnAppStore}
62
alt="Download on the App Store"
63
layout="responsive"
64
/>
65
</a>
66
<a href="https://play.google.com/store/apps/details?id=org.joinmastodon.android">
67
<Image
68
src={downloadOnGooglePlay}
69
alt="Get it on Google Play"
70
layout="responsive"
71
/>
72
</a>
73
</div>
74
</div>
75
<div className="md:col-span-6 md:-mt-16 lg:col-span-5 lg:col-start-7 lg:-mt-32 xl:-mt-80">
76
<div className="mx-auto max-w-xs md:max-w-none">
77
<Image
78
src={ios_android_apps}
79
alt="Screenshots of Mastodon on iOS and Android, showing an artist's profile, reblogging, and a poll"
80
/>
81
</div>
82
</div>
83
</div>
84
85
<TwoUpFeature
86
features={[
87
{
88
Icon: ProgressiveWebIcon,
89
title: (
90
<FormattedMessage
91
id="browse_apps.progressive_web_app"
92
defaultMessage="Progressive web app"
93
/>
94
),
95
copy: (
96
<FormattedMessage
97
id="browse_apps.you_can_use_it_from_desktop"
98
defaultMessage="You can always use Mastodon from the browser on your desktop or phone! It can be added to your home screen and some browsers even support push notifications, just like a native app!"
99
/>
100
),
101
cta: (
102
<FormattedMessage
103
id="browse_apps.pwa_feature.cta"
104
defaultMessage="Join a server"
105
/>
106
),
107
cta_link: "/servers",
108
},
109
{
110
Icon: ApiGearIcon,
111
title: (
112
<FormattedMessage
113
id="browse_apps.open_api"
114
defaultMessage="Open API"
115
/>
116
),
117
copy: (
118
<FormattedMessage
119
id="browse_apps.make_your_own"
120
defaultMessage="Mastodon is open-source and has an elegant, well-documented API that is available to everyone. Make your own app, or use one of the many third-party apps made by other developers!"
121
/>
122
),
123
cta: (
124
<FormattedMessage
125
id="browse_apps.api_docs"
126
defaultMessage="API documentation"
127
/>
128
),
129
cta_link: "https://docs.joinmastodon.org/client/intro/",
130
},
131
]}
132
/>
133
<AppsGrid apps={appsList} />
134
<AppHero
135
backgroundImage={footer_festival}
136
backgroundImagePosition="left center"
137
/>
138
<Head>
139
<title>
140
{`${intl.formatMessage({
141
id: "browse_apps.page_title",
142
defaultMessage: "Get an app for Mastodon",
143
})} - Mastodon`}
144
</title>
145
<meta
146
property="og:title"
147
content={intl.formatMessage({
148
id: "browse_apps.page_title",
149
defaultMessage: "Get an app for Mastodon",
150
})}
151
/>
152
<meta
153
name="description"
154
content={intl.formatMessage({
155
id: "browse_apps.page_description",
156
defaultMessage:
157
"Browse official and third-party apps for the decentralized social network Mastodon",
158
})}
159
/>
160
<meta
161
property="og:description"
162
content={intl.formatMessage({
163
id: "browse_apps.page_description",
164
defaultMessage:
165
"Browse official and third-party apps for the decentralized social network Mastodon",
166
})}
167
/>
168
</Head>
169
</Layout>
170
)
171
}
172
173
export const getStaticProps = withDefaultStaticProps()
174
175
export default AppsPage
176
177