Add "secondary" theme to links and remove Nostr/bridge cards

merge-requests/3337/head
danidfra 2025-02-27 20:15:08 -03:00
rodzic bba853893d
commit 49181b1d7c
4 zmienionych plików z 10 dodań i 64 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 70 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 11 KiB

Wyświetl plik

@ -3,8 +3,6 @@ import rocketIcon from '@tabler/icons/outline/rocket.svg';
import { useState } from 'react';
import { defineMessages, useIntl } from 'react-intl';
import bridgeImg from 'soapbox/assets/images/bridge-image.png';
import nostrImg from 'soapbox/assets/images/nostr-image.png';
import HStack from 'soapbox/components/ui/hstack.tsx';
import IconButton from 'soapbox/components/ui/icon-button.tsx';
import Stack from 'soapbox/components/ui/stack.tsx';
@ -13,11 +11,9 @@ import Text from 'soapbox/components/ui/text.tsx';
const messages = defineMessages({
welcomeTitle: { id: 'column.explorer.welcome_card.title', defaultMessage: 'Welcome to Explorer' },
welcomeText: { id: 'column.explorer.welcome_card.text', defaultMessage: 'Explore the world of <span>decentralized social media</span>, dive into <span>Nostr</span> or cross the bridge to other networks, and connect with a global community. All in one place.' },
nostrTitle: { id: 'column.explorer.nostr_card.title', defaultMessage: 'Nostr' },
nostrText: { id: 'column.explorer.nostr_card.text', defaultMessage: 'Wondering about Nostr? <a>Click here</a>' },
bridgeTitle: { id: 'column.explorer.bridge_card.title', defaultMessage: 'Bridge' },
bridgeText: { id: 'column.explorer.bridge_card.text', defaultMessage: 'Curious about Bridges? <a>Click here</a>' },
welcomeText: { id: 'column.explorer.welcome_card.text', defaultMessage: 'Explore the world of decentralized social media, dive into {nostrLink} or cross {bridgeLink} to other networks, and connect with a global community. All in one place.' },
nostrTitle: { id: 'column.explorer.nostr', defaultMessage: 'Nostr' },
bridgeTitle: { id: 'column.explorer.bridge', defaultMessage: 'Bridges' },
});
const ExplorerCards = () => {
@ -27,7 +23,7 @@ const ExplorerCards = () => {
<Stack className='mx-4 mt-4' space={2}>
<Stack
space={4}
className={`rounded-xl bg-gradient-to-r from-primary-400 to-primary-700 ${isOpen ? 'mt-0 px-5 pb-8 pt-4' : 'p-4'}`}
className={`rounded-xl bg-gradient-to-r from-primary-500 to-primary-700 ${isOpen ? 'mt-0 px-5 pb-8 pt-4' : 'p-4'}`}
>
<HStack justifyContent='between' className='text-white'>
<HStack space={2}>
@ -48,59 +44,11 @@ const ExplorerCards = () => {
<Text className={`text-white ${isOpen ? 'max-h-96 opacity-100' : 'hidden max-h-0 opacity-0'}`}>
{intl.formatMessage(messages.welcomeText, {
span: (node) => <span className='text-black'>{node}</span>,
nostrLink: <a className='text-secondary-400 underline' href='https://soapbox.pub/blog/nostr101/'>{intl.formatMessage(messages.nostrTitle)}</a>,
bridgeLink: <a className='text-secondary-400 underline' href='https://soapbox.pub/blog/mostr-fediverse-nostr-bridge/'>{intl.formatMessage(messages.bridgeTitle)}</a>,
})}
</Text>
</Stack>
<HStack className={`${isOpen ? 'max-h-96 opacity-100' : 'hidden max-h-0 opacity-0'}`} space={2}>
{/* Nostr */}
<Stack
space={4}
className='w-1/2 rounded-xl bg-gradient-to-r from-primary-400 to-primary-600 px-5 pb-6 pt-4'
justifyContent='center'
>
<HStack alignItems='center' justifyContent='between'>
{/* Title */}
<Stack space={2}>
<p className='text-xl font-bold text-white'>
{intl.formatMessage(messages.nostrTitle)}
</p>
<Text className='text-white'>
{intl.formatMessage(messages.nostrText, {
a: (node) => <a className='text-black underline' target='_blank' href='https://soapbox.pub/blog/nostr101/'>{node}</a>,
})}
</Text>
</Stack>
<div className='flex min-h-20 min-w-20 items-center justify-center rounded-full bg-white p-1 sm:size-16'>
<img className='size-16' src={nostrImg} alt='' />
</div>
</HStack>
</Stack>
{/* Bridge */}
<Stack
space={4}
className='w-1/2 rounded-xl bg-gradient-to-r from-primary-600 to-primary-700 px-5 pb-6 pt-4'
>
<HStack alignItems='center' className='sm:min-w-48'>
{/* Title */}
<Stack space={2}>
<p className='text-xl font-bold text-white'> {intl.formatMessage(messages.bridgeTitle)} </p>
<Text className='text-white'>
{intl.formatMessage(messages.bridgeText, {
a: (node) => <a className='text-black underline' target='_blank' href='https://soapbox.pub/blog/mostr-fediverse-nostr-bridge/'>{node}</a>,
})}
</Text>
</Stack>
<div className='flex min-h-20 min-w-20 items-center justify-center rounded-full bg-white p-1 sm:size-16'>
<img className='size-16' src={bridgeImg} alt='' />
</div>
</HStack>
</Stack>
</HStack>
</Stack>
);
};

Wyświetl plik

@ -369,8 +369,7 @@
"column.event_participants": "Event participants",
"column.events": "Events",
"column.explorer": "Explorer",
"column.explorer.bridge_card.text": "Curious about Bridges? <a>Click here</a>",
"column.explorer.bridge_card.title": "Bridge",
"column.explorer.bridge": "Bridges",
"column.explorer.filters": "Filters:",
"column.explorer.filters.add_filter": "Add Filter",
"column.explorer.filters.bluesky": "Bluesky",
@ -381,15 +380,14 @@
"column.explorer.filters.filter_by_words": "Filter by this/these words",
"column.explorer.filters.include": "Include",
"column.explorer.filters.language": "Language:",
"column.explorer.filters.no_replies": "No Replies:",
"column.explorer.filters.nostr": "Nostr",
"column.explorer.filters.platforms": "Platforms:",
"column.explorer.filters.show_replies": "Show replies:",
"column.explorer.filters.show_text_posts": "Just text posts:",
"column.explorer.filters.show_video_posts": "Just posts with video:",
"column.explorer.nostr_card.text": "Wondering about Nostr? <a>Click here</a>",
"column.explorer.nostr_card.title": "Nostr",
"column.explorer.nostr": "Nostr",
"column.explorer.popular_accounts": "Popular Accounts",
"column.explorer.welcome_card.text": "Explore the world of <span>decentralized social media</span>, dive into <span>Nostr</span> or cross the bridge to other networks, and connect with a global community. All in one place.",
"column.explorer.welcome_card.text": "Explore the world of decentralized social media, dive into {nostrLink} or cross {bridgeLink} to other networks, and connect with a global community. All in one place.",
"column.explorer.welcome_card.title": "Welcome to Explorer",
"column.export_data": "Export data",
"column.familiar_followers": "People you know following {name}",