[examples/538][xs] - change banner position + text + change README (#877)

* [examples/538][xs] - change banner position + text + change README

* [examples/538] - change banner background

* [examples/538][m] - changes after ola comments

* [example/538] - fix typo
This commit is contained in:
Luccas Mateus 2023-05-15 12:37:19 -03:00 committed by GitHub
parent 1af24ef57e
commit 1fc2499c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 21 deletions

View File

@ -1,4 +1,10 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
This is a replica of the awesome data.fivethirtyeight.com using PortalJS.
You might be asking why we did that, there are three main reasons:
- The website has a great UI, with multiple datasets being displayed elegantly and with simplicity.
- PortalJS allows us to add more functionality to it e.g dataset previews and search functionality.
- The project follows our same principles of open sourcing and free data, with every dataset being publicly available on Github.
## Getting Started

View File

@ -9,10 +9,36 @@ export default function Document() {
type="image/x-icon"
href="https://projects.fivethirtyeight.com/shared/favicon.ico"
/>
<meta property="og:image" content="https://portaljs-fivethirtyeight.vercel.app/share_image.png" />
<meta property="twitter:image" content="https://portaljs-fivethirtyeight.vercel.app/share_image.png" />
<meta
property="og:image"
content="https://portaljs-fivethirtyeight.vercel.app/share_image.png"
/>
<meta
property="twitter:image"
content="https://portaljs-fivethirtyeight.vercel.app/share_image.png"
/>
</Head>
<body>
<div className="px-2 max-w-5xl mx-auto pb-2">
<div className="mt-2 px-2 bg-[#3c3c3c] text-white">
<div className="p-2 text-center">
This is a replica to the awesome{' '}
<a
className="hover:underline font-bold"
href="https://data.fivethirtyeight.com"
>
data.fivethirtyeight.com
</a>{' '}
website.{' '}
<a
className="hover:underline font-bold"
href="https://github.com/datopian/portaljs/tree/main/examples/fivethirtyeight"
>
Read more here
</a>{' '}
</div>
</div>
</div>
<header className="max-w-5xl mx-auto mt-8 w-full">
<div className="border-b-2 pb-2.5 mx-2 border-zinc-800 flex justify-between">
<h1 className="flex gap-x-1 items-end">
@ -23,18 +49,16 @@ export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yA4LjUxIDEwLjgxVjQzaC04VjIxYzAtMy4xMy0xLjA3LTQuNDQtNC00LjQ0cy00IDIuMjYtNCA1LjM5eiIvPjwvc3ZnPg=="
/>{' '}
<span className="-mb-0.5 text-[#3c3c3c]">
tribute by PortalJS
</span>
<span className="-mb-0.5 text-[#3c3c3c]">replica</span>
</h1>
<div className='md:flex items-center gap-x-3 text-[#3c3c3c] -mb-1 hidden'>
<div className="md:flex items-center gap-x-3 text-[#3c3c3c] -mb-1 hidden">
<a
className="hover:opacity-75 transition"
href="https://portaljs.org"
>
Built with 🌀PortalJS
</a>
<hr className='h-[80%] border border-[#3c3c3c] opacity-75 my-2'></hr>
<hr className="h-[80%] border border-[#3c3c3c] opacity-75 my-2"></hr>
<a
className="hover:opacity-75 transition"
href="https://github.com/datopian/portaljs/tree/main/examples/fivethirtyeight"

View File

@ -143,19 +143,6 @@ export default function Home({ datasets }: { datasets: Dataset[] }) {
return (
<>
<NextSeo title="FiveThirtyEight tribute by PortalJS" />
<div className="max-w-5xl mx-auto mt-2 px-2 text-[#3c3c3c]">
<div className="border border-zinc-600 p-4 text-left">
This page is a tribute to the{' '}
<a className='hover:underline font-bold' href="https://data.fivethirtyeight.com">
data.fivethirtyeight.com
</a>{' '}
website made by the amazing 538 team. All content is credited to the original creators, intended for
educational purposes only. Visit their{' '}
<a className='hover:underline font-bold' href="https://fivethirtyeight.com/">website</a> for in-depth analyses
on politics, sports, culture, and more. No copyright infringement
intended.
</div>
</div>
<main
className={`flex min-h-screen flex-col items-center max-w-5xl mx-auto pt-20 px-2.5 ${inter.className}`}
>