Skip to content

Commit

Permalink
✨ Whats-new pages fixes (#2199)
Browse files Browse the repository at this point in the history
* rm broken links

* see more on GitHub text change

* add see more on newsletters

* fix command click footer

* add glass effect to whats-new boxes

* remove legacyBehaviour

* add text hover on Link
  • Loading branch information
joshbermanssw authored Sep 17, 2024
1 parent 31a8181 commit 210eb89
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 26 deletions.
12 changes: 5 additions & 7 deletions components/ui/DynamicLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ interface DynamicLinkProps extends ExtraProps {

export const DynamicLink = ({ children, href, ...props }: DynamicLinkProps) => {
return (
// Because {children} contains <a> tags we need to wrap it in a div to pass className attributes in. If we inserted into the <Link> it doesnt get passed in.
<div className="cursor-pointer">
{/* Work around for using legacyBehavior so that anchors in HTML in MDX files do not cause legacy errors */}
<Link href={href} {...props} legacyBehavior>
{children}
</Link>
</div>
<Link href={href} {...props} className="cursor-pointer">
{children}
</Link>
);
};


1 change: 0 additions & 1 deletion content/whats-new-tinacloud/2024.9.11.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ dateReleased: 2024-09-05T14:00:00.000Z
* Fix bug where URL glob patterns were allowed but unable to be added by @brookjeynes-ssw in [https://github.com/tinacms/tinacloud/pull/2253](https://github.com/tinacms/tinacloud/pull/2253)
* Add error messages when a URL is invalid by @brookjeynes-ssw in [https://github.com/tinacms/tinacloud/pull/2252](https://github.com/tinacms/tinacloud/pull/2252)

**Full Changelog**: [https://github.com/tinacms/tinacloud/compare/2024.9.10...2024.9.11](https://github.com/tinacms/tinacloud/compare/2024.9.10...2024.9.11)
1 change: 0 additions & 1 deletion content/whats-new-tinacloud/2024.9.9.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ dateReleased: 2024-09-04T14:00:00.000Z

* chore(deps): bump glob-parent from 5.1.1 to 5.1.2 by @dependabot in [https://github.com/tinacms/tinacloud/pull/2065](https://github.com/tinacms/tinacloud/pull/2065)

**Full Changelog**: [https://github.com/tinacms/tinacloud/compare/2024.9.8...2024.9.9](https://github.com/tinacms/tinacloud/compare/2024.9.8...2024.9.9)
12 changes: 11 additions & 1 deletion pages/whats-new/tinacloud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Layout } from 'components/layout'
import client from 'tina/__generated__/client'
import { TinaMarkdown } from 'tinacms/dist/rich-text'
import { whatsNewMDComponents } from 'components/styles/WhatsNewMDComponents'
import Link from 'next/link'
import { FaGithub, FaNewspaper } from 'react-icons/fa'

export const getStaticProps = async () => {
const { data: connectionData } =
Expand Down Expand Up @@ -35,7 +37,7 @@ const Tinacloud = ({ items }) => {
items.map((item) => (
<div
key={item.id}
className="mb-6 p-10 shadow-xl rounded-lg transform transition-transform duration-300 hover:scale-105"
className="mb-6 p-10 shadow-xl rounded-lg transform transition-transform duration-300 hover:scale-105 bg-gradient-to-br from-white/25 via-white/50 to-white/75"
>
<h2 className="text-2xl bg-gradient-to-br from-blue-700 to-blue-1000 bg-clip-text text-transparent text-blue-700 font-semibold">
Version {item.versionNumber}
Expand All @@ -51,6 +53,14 @@ const Tinacloud = ({ items }) => {
))
)}
</div>
<div className="font-tuner text-lg text-center text-blue-700">
<Link
href="https://us20.campaign-archive.com/home/?u=1fea337bee20e7270d025ea8a&id=c1062536a1"
className="flex items-center justify-center hover:text-blue-800"
>
See Newsletters <FaNewspaper className='ml-2' />
</Link>
</div>
</div>
</Layout>
)
Expand Down
41 changes: 25 additions & 16 deletions pages/whats-new/tinacms.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import { Layout } from 'components/layout'
import client from 'tina/__generated__/client'
import { TinaMarkdown } from 'tinacms/dist/rich-text'
import Link from 'next/link'
import { whatsNewMDComponents } from 'components/styles/WhatsNewMDComponents'
import { Layout } from 'components/layout';
import client from 'tina/__generated__/client';
import { TinaMarkdown } from 'tinacms/dist/rich-text';
import Link from 'next/link';
import { whatsNewMDComponents } from 'components/styles/WhatsNewMDComponents';
import { FaGithub, FaNewspaper } from 'react-icons/fa';

export const getStaticProps = async () => {
const { data: connectionData } =
await client.queries.WhatsNewTinaCMSConnection({
last: 10,
sort: 'dateReleased',
})
});

const items =
connectionData?.WhatsNewTinaCMSConnection?.edges.map((edge) => edge.node) ||
[]
[];
return {
props: {
items,
},
}
}
};
};

const Tinacms = ({ items }) => {
return (
Expand All @@ -32,7 +33,7 @@ const Tinacms = ({ items }) => {
{items.map((item) => (
<div
key={item.id}
className="mb-6 p-10 shadow-xl rounded-lg transform transition-transform duration-300 hover:scale-105"
className="mb-6 p-10 shadow-xl rounded-lg transform transition-transform duration-300 hover:scale-105 bg-gradient-to-br from-white/25 via-white/50 to-white/75"
>
<h2 className="text-2xl bg-gradient-to-br from-blue-700 to-blue-1000 bg-clip-text text-transparent text-blue-700 font-semibold">
Version {item.versionNumber}
Expand All @@ -48,14 +49,22 @@ const Tinacms = ({ items }) => {
))}
</div>
<div className="font-tuner text-lg text-center text-blue-700">
<Link href="https://github.com/tinacms/tinacms/blob/main/packages/tinacms/CHANGELOG.md">
{' '}
See More{' '}
<Link
href="https://github.com/tinacms/tinacms/blob/main/packages/tinacms/CHANGELOG.md"
className="flex items-center justify-center hover:text-blue-800"
>
See more on GitHub <FaGithub className="ml-2" />
</Link>
<Link
href="https://us20.campaign-archive.com/home/?u=1fea337bee20e7270d025ea8a&id=c1062536a1"
className="flex items-center justify-center hover:text-blue-800"
>
See Newsletters <FaNewspaper className='ml-2' />
</Link>
</div>
</div>
</Layout>
)
}
);
};

export default Tinacms
export default Tinacms;

0 comments on commit 210eb89

Please sign in to comment.