Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(website): basic page for article (poverty statistics) #650

Merged
merged 8 commits into from
Nov 27, 2023

Conversation

ssandino
Copy link
Member

No description provided.

Copy link

vercel bot commented Nov 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
public ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 1:47pm

@ssandino
Copy link
Member Author

@mkue can you remind me how we do the links within the translations?

Copy link

github-actions bot commented Nov 26, 2023

Visit the preview URL for this PR (updated for commit 8b452da):

https://si-admin-staging--pr650-sandino-basic-articl-lmlf64cl.web.app

(expires Mon, 04 Dec 2023 11:33:08 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: b7b0969384059dce6ea8fad1ee1d1737e54e6676

@DarkMenacer
Copy link
Contributor

DarkMenacer commented Nov 27, 2023

@mkue can you remind me how we do the links within the translations?

This might help:

Website
Screenshot 2023-11-27 at 15 21 06

JSON data

[
{ 
    "text": "A review of more than 200 studies (" 
},
{
    "text": "Overseas Development Institute 2016",
    "href": "https://drive.google.com/file/d/18SN24gxbdUxLnx1m35T5I5NqXWh5Fj7q/view?usp=sharing"
},
...
]

(website)/evidence/section-card.tsx:

<span key={key}>
	{fragment.href ? (
	<Link href={fragment.href}>
	     <Typography as="span" color="primary">
			{fragment.text}
	     </Typography>
	</Link>
	) : (
	<Typography as="span">{fragment.text}</Typography>
	)}
</span>

where a fragment is the building block for a paragraph, that is, a paragraph is made of an array of fragments.

One look at website/src/(website)/evidence/section-card.tsx might clear most of the doubts.

Copy link

github-actions bot commented Nov 27, 2023

PR Preview Action v1.4.4
🚀 Deployed preview to https://socialincome-san.github.io/public/pr-preview/pr-650/
on branch gh-pages at 2023-11-27 13:44 UTC

@ssandino
Copy link
Member Author

@DarkMenacer thanks for the hint – this makes totally sense. Especially for paragraphs with various links. I'll looking forward to use these array of fragments.

The page "poverty statistic" is more or less a unlinked landing page for some google search ads around the key word of poverty (we are part of the google non-profit program and get to freely spend 10k ads credit every month). For now the goal was to make sure the links from the running ads work after the switch to the new setup. Fast solution was: I used the typography element dangerouslySetInnerHTML which did the trick for the single link.

Looking ahead, we intend to relocate these ad-supportive landing pages to a more user-friendly blog tool, simplifying interaction for non-coders.

…atistics' into sandino/basic-article-poverty-statistics
@mkue mkue changed the title Basic page for article (poverty statistics) feature(website): basic page for article (poverty statistics) Nov 27, 2023
@mkue mkue merged commit 14325d3 into main Nov 27, 2023
@mkue mkue deleted the sandino/basic-article-poverty-statistics branch November 27, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants