Add Wrapstodon footer links (#37207)

This commit is contained in:
diondiondion
2025-12-11 18:06:26 +01:00
committed by GitHub
parent d730f6b0c5
commit c06eb371e6
4 changed files with 46 additions and 3 deletions

View File

@@ -13,12 +13,13 @@ $mobile-breakpoint: 540px;
} }
.footer { .footer {
text-align: center;
margin-top: 2rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.75rem;
align-items: center; align-items: center;
gap: 0.75rem;
margin-top: 2rem;
font-size: 16px;
text-align: center;
color: var(--color-text-secondary); color: var(--color-text-secondary);
} }
@@ -26,3 +27,19 @@ $mobile-breakpoint: 540px;
width: 2rem; width: 2rem;
opacity: 0.6; opacity: 0.6;
} }
.nav {
display: flex;
flex-wrap: wrap;
gap: 12px;
a:any-link {
color: inherit;
text-decoration: underline;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--color-text-primary);
}
}

View File

@@ -3,6 +3,7 @@ import type { FC } from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import { IconLogo } from '@/mastodon/components/logo'; import { IconLogo } from '@/mastodon/components/logo';
import { me } from '@/mastodon/initial_state';
import { AnnualReport } from './index'; import { AnnualReport } from './index';
import classes from './shared_page.module.scss'; import classes from './shared_page.module.scss';
@@ -18,6 +19,28 @@ export const WrapstodonSharedPage: FC = () => {
defaultMessage='Generated with {heart} by the Mastodon team' defaultMessage='Generated with {heart} by the Mastodon team'
values={{ heart: '♥' }} values={{ heart: '♥' }}
/> />
<nav className={classes.nav}>
<a href='/about'>
<FormattedMessage
id='footer.about_this_server'
defaultMessage='About'
/>
</a>
{!me && (
<a href='https://joinmastodon.org/servers'>
<FormattedMessage
id='annual_report.shared_page.sign_up'
defaultMessage='Sign up'
/>
</a>
)}
<a href='https://joinmastodon.org/sponsors'>
<FormattedMessage
id='annual_report.shared_page.donate'
defaultMessage='Donate'
/>
</a>
</nav>
</footer> </footer>
</main> </main>
); );

View File

@@ -117,7 +117,9 @@
"annual_report.announcement.action_view": "View my Wrapstodon", "annual_report.announcement.action_view": "View my Wrapstodon",
"annual_report.announcement.description": "Discover more about your engagement on Mastodon over the past year.", "annual_report.announcement.description": "Discover more about your engagement on Mastodon over the past year.",
"annual_report.announcement.title": "Wrapstodon {year} has arrived", "annual_report.announcement.title": "Wrapstodon {year} has arrived",
"annual_report.shared_page.donate": "Donate",
"annual_report.shared_page.footer": "Generated with {heart} by the Mastodon team", "annual_report.shared_page.footer": "Generated with {heart} by the Mastodon team",
"annual_report.shared_page.sign_up": "Sign up",
"annual_report.summary.archetype.booster.desc_public": "{name} stayed on the hunt for posts to boost, amplifying other creators with perfect aim.", "annual_report.summary.archetype.booster.desc_public": "{name} stayed on the hunt for posts to boost, amplifying other creators with perfect aim.",
"annual_report.summary.archetype.booster.desc_self": "You stayed on the hunt for posts to boost, amplifying other creators with perfect aim.", "annual_report.summary.archetype.booster.desc_self": "You stayed on the hunt for posts to boost, amplifying other creators with perfect aim.",
"annual_report.summary.archetype.booster.name": "The Archer", "annual_report.summary.archetype.booster.name": "The Archer",

View File

@@ -11,6 +11,7 @@
= render 'og_description', account: @account = render 'og_description', account: @account
= render 'og_image', report: @generated_annual_report = render 'og_image', report: @generated_annual_report
= render_initial_state
= vite_typescript_tag 'wrapstodon.tsx', crossorigin: 'anonymous' = vite_typescript_tag 'wrapstodon.tsx', crossorigin: 'anonymous'
- content_for :html_classes, 'theme-dark' - content_for :html_classes, 'theme-dark'