phanpy/src/pages/welcome.jsx

205 lines
6 KiB
React
Raw Normal View History

2022-12-10 12:14:48 +03:00
import './welcome.css';
2024-08-13 10:26:23 +03:00
import { t, Trans } from '@lingui/macro';
2023-04-24 17:58:14 +03:00
import boostsCarouselUrl from '../assets/features/boosts-carousel.jpg';
import groupedNotificationsUrl from '../assets/features/grouped-notifications.jpg';
import multiColumnUrl from '../assets/features/multi-column.jpg';
import multiHashtagTimelineUrl from '../assets/features/multi-hashtag-timeline.jpg';
import nestedCommentsThreadUrl from '../assets/features/nested-comments-thread.jpg';
2023-06-10 14:20:32 +03:00
import logoText from '../assets/logo-text.svg';
2022-12-10 12:38:20 +03:00
import logo from '../assets/logo.svg';
2023-10-03 10:07:47 +03:00
2024-08-13 10:26:23 +03:00
import LangSelector from '../components/lang-selector';
import Link from '../components/link';
2023-02-06 14:55:04 +03:00
import states from '../utils/states';
2022-12-10 12:14:48 +03:00
import useTitle from '../utils/useTitle';
2023-12-25 14:25:48 +03:00
const {
PHANPY_DEFAULT_INSTANCE: DEFAULT_INSTANCE,
PHANPY_WEBSITE: WEBSITE,
PHANPY_PRIVACY_POLICY_URL: PRIVACY_POLICY_URL,
PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL: DEFAULT_INSTANCE_REGISTRATION_URL,
} = import.meta.env;
const appSite = WEBSITE
? WEBSITE.replace(/https?:\/\//g, '').replace(/\/$/, '')
: null;
const appVersion = __BUILD_TIME__
? `${__BUILD_TIME__.slice(0, 10).replace(/-/g, '.')}${
__COMMIT_HASH__ ? `.${__COMMIT_HASH__}` : ''
}`
: null;
2022-12-16 08:27:04 +03:00
function Welcome() {
useTitle(null, ['/', '/welcome']);
2022-12-10 12:14:48 +03:00
return (
2022-12-19 19:16:45 +03:00
<main id="welcome">
2023-06-10 14:20:32 +03:00
<div class="hero-container">
2023-12-10 14:16:34 +03:00
<div class="hero-content">
<h1>
<img
src={logo}
alt=""
width="160"
height="160"
style={{
aspectRatio: '1/1',
marginBlockEnd: -16,
}}
/>
<img src={logoText} alt="Phanpy" width="200" />
</h1>
2024-08-13 10:26:23 +03:00
<p class="desc">
<Trans>A minimalistic opinionated Mastodon web client.</Trans>
</p>
2023-12-10 14:16:34 +03:00
<p>
2023-12-25 14:25:48 +03:00
<Link
to={
DEFAULT_INSTANCE
? `/login?instance=${DEFAULT_INSTANCE}&submit=1`
: '/login'
}
class="button"
>
2024-08-13 10:26:23 +03:00
{DEFAULT_INSTANCE ? t`Log in` : t`Log in with Mastodon`}
2023-12-10 14:16:34 +03:00
</Link>
</p>
2023-12-25 14:25:48 +03:00
{DEFAULT_INSTANCE && DEFAULT_INSTANCE_REGISTRATION_URL && (
<p>
<a href={DEFAULT_INSTANCE_REGISTRATION_URL} class="button plain5">
2024-08-13 10:26:23 +03:00
<Trans>Sign up</Trans>
2023-12-25 14:25:48 +03:00
</a>
</p>
)}
{!DEFAULT_INSTANCE && (
<p class="insignificant">
<small>
2024-08-13 10:26:23 +03:00
<Trans>
Connect your existing Mastodon/Fediverse account.
<br />
Your credentials are not stored on this server.
</Trans>
2023-12-25 14:25:48 +03:00
</small>
</p>
)}
</div>
{(appSite || appVersion) && (
<p class="app-site-version">
2023-12-10 14:16:34 +03:00
<small>
2023-12-25 14:25:48 +03:00
{appSite} {appVersion}
2023-12-10 14:16:34 +03:00
</small>
</p>
2023-12-25 14:25:48 +03:00
)}
2023-06-10 14:20:32 +03:00
<p>
2024-08-13 10:26:23 +03:00
<Trans>
<a href="https://github.com/cheeaun/phanpy" target="_blank">
Built
</a>{' '}
by{' '}
<a
href="https://mastodon.social/@cheeaun"
target="_blank"
onClick={(e) => {
e.preventDefault();
states.showAccount = 'cheeaun@mastodon.social';
}}
>
@cheeaun
</a>
.{' '}
<a href={PRIVACY_POLICY_URL} target="_blank">
Privacy Policy
</a>
.
</Trans>
2023-06-10 14:20:32 +03:00
</p>
<div>
<LangSelector />
</div>
2023-06-10 14:20:32 +03:00
</div>
<div id="why-container">
2023-04-24 17:58:14 +03:00
<div class="sections">
<section>
<img
src={boostsCarouselUrl}
2024-08-13 10:26:23 +03:00
alt={t`Screenshot of Boosts Carousel`}
2023-04-24 17:58:14 +03:00
loading="lazy"
/>
2024-08-13 10:26:23 +03:00
<h4>
<Trans>Boosts Carousel</Trans>
</h4>
2023-06-10 14:20:32 +03:00
<p>
2024-08-13 10:26:23 +03:00
<Trans>
Visually separate original posts and re-shared posts (boosted
posts).
</Trans>
2023-06-10 14:20:32 +03:00
</p>
2023-04-24 17:58:14 +03:00
</section>
<section>
<img
src={nestedCommentsThreadUrl}
2024-08-13 10:26:23 +03:00
alt={t`Screenshot of nested comments thread`}
2023-04-24 17:58:14 +03:00
loading="lazy"
/>
2024-08-13 10:26:23 +03:00
<h4>
<Trans>Nested comments thread</Trans>
</h4>
<p>
<Trans>
Effortlessly follow conversations. Semi-collapsible replies.
</Trans>
</p>
2023-04-24 17:58:14 +03:00
</section>
<section>
<img
src={groupedNotificationsUrl}
2024-08-13 10:26:23 +03:00
alt={t`Screenshot of grouped notifications`}
2023-04-24 17:58:14 +03:00
loading="lazy"
/>
2024-08-13 10:26:23 +03:00
<h4>
<Trans>Grouped notifications</Trans>
</h4>
2023-04-24 17:58:14 +03:00
<p>
2024-08-13 10:26:23 +03:00
<Trans>
Similar notifications are grouped and collapsed to reduce
clutter.
</Trans>
2023-04-24 17:58:14 +03:00
</p>
2023-06-10 14:20:32 +03:00
</section>
<section>
2023-04-24 17:58:14 +03:00
<img
src={multiColumnUrl}
2024-08-13 10:26:23 +03:00
alt={t`Screenshot of multi-column UI`}
2023-04-24 17:58:14 +03:00
loading="lazy"
/>
2024-08-13 10:26:23 +03:00
<h4>
<Trans>Single or multi-column</Trans>
</h4>
2023-06-10 14:20:32 +03:00
<p>
2024-08-13 10:26:23 +03:00
<Trans>
By default, single column for zen-mode seekers. Configurable
multi-column for power users.
</Trans>
2023-06-10 14:20:32 +03:00
</p>
2023-04-24 17:58:14 +03:00
</section>
<section>
<img
src={multiHashtagTimelineUrl}
2024-08-13 10:26:23 +03:00
alt={t`Screenshot of multi-hashtag timeline with a form to add more hashtags`}
2023-04-24 17:58:14 +03:00
loading="lazy"
/>
2024-08-13 10:26:23 +03:00
<h4>
<Trans>Multi-hashtag timeline</Trans>
</h4>
<p>
<Trans>Up to 5 hashtags combined into a single timeline.</Trans>
</p>
2023-04-24 17:58:14 +03:00
</section>
</div>
2023-06-10 14:20:32 +03:00
</div>
2022-12-10 12:14:48 +03:00
</main>
);
2022-12-16 08:27:04 +03:00
}
export default Welcome;