phanpy/src/pages/welcome.jsx

170 lines
5.1 KiB
React
Raw Normal View History

2022-12-10 12:14:48 +03:00
import './welcome.css';
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
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>
<p class="desc">A minimalistic opinionated Mastodon web client.</p>
<p>
2023-12-25 14:25:48 +03:00
<Link
to={
DEFAULT_INSTANCE
? `/login?instance=${DEFAULT_INSTANCE}&submit=1`
: '/login'
}
class="button"
>
{DEFAULT_INSTANCE ? 'Log in' : '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">
Sign up
</a>
</p>
)}
{!DEFAULT_INSTANCE && (
<p class="insignificant">
<small>
Connect your existing Mastodon/Fediverse account.
<br />
Your credentials are not stored on this server.
</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>
2023-12-10 14:16:34 +03:00
<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>
.{' '}
2023-12-25 14:25:48 +03:00
<a href={PRIVACY_POLICY_URL} target="_blank">
2023-12-10 14:16:34 +03:00
Privacy Policy
</a>
.
2023-06-10 14:20:32 +03:00
</p>
</div>
<div id="why-container">
2023-04-24 17:58:14 +03:00
<div class="sections">
<section>
<img
src={boostsCarouselUrl}
alt="Screenshot of Boosts Carousel"
loading="lazy"
/>
2023-06-10 14:20:32 +03:00
<h4>Boosts Carousel</h4>
<p>
Visually separate original posts and re-shared posts (boosted
posts).
</p>
2023-04-24 17:58:14 +03:00
</section>
<section>
<img
src={nestedCommentsThreadUrl}
alt="Screenshot of nested comments thread"
loading="lazy"
/>
2023-06-10 14:20:32 +03:00
<h4>Nested comments thread</h4>
<p>Effortlessly follow conversations. Semi-collapsible replies.</p>
2023-04-24 17:58:14 +03:00
</section>
<section>
<img
src={groupedNotificationsUrl}
alt="Screenshot of grouped notifications"
loading="lazy"
/>
2023-06-10 14:20:32 +03:00
<h4>Grouped notifications</h4>
2023-04-24 17:58:14 +03:00
<p>
2023-06-10 14:20:32 +03:00
Similar notifications are grouped and collapsed to reduce clutter.
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}
alt="Screenshot of multi-column UI"
loading="lazy"
/>
2023-06-10 14:20:32 +03:00
<h4>Single or multi-column</h4>
<p>
By default, single column for zen-mode seekers. Configurable
multi-column for power users.
</p>
2023-04-24 17:58:14 +03:00
</section>
<section>
<img
src={multiHashtagTimelineUrl}
alt="Screenshot of multi-hashtag timeline with a form to add more hashtags"
loading="lazy"
/>
2023-06-10 14:20:32 +03:00
<h4>Multi-hashtag timeline</h4>
<p>Up to 5 hashtags combined into a single timeline.</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;