Skip to content

Commit

Permalink
new icon, more improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
bradystroud committed Apr 14, 2024
1 parent 97767db commit 5d4a423
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 27 deletions.
4 changes: 4 additions & 0 deletions components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const Layout = ({ data = layoutData, children }) => {
property="og:image"
content="https://assets.tina.io/c68a0182-b88f-4a74-8514-0cbe71f98577/nice-parm.jpg"
/>
<link
rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🍴</text></svg>"
/>
</Head>
<div>
<Header data={data?.header} />
Expand Down
1 change: 1 addition & 0 deletions components/posts/reviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const Reviews = ({ data }) => {
key={post._sys.filename}
href={`/reviews/` + post._sys.filename}
passHref
legacyBehavior
>
<a
key={post.id}
Expand Down
7 changes: 6 additions & 1 deletion components/util/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ export const Actions = ({ parentField = "", className = "", actions }) => {
}
if (action.type === "link" || action.type === "linkExternal") {
element = (
<Link key={index} href={action.link ? action.link : "/"} passHref>
<Link
key={index}
href={action.link ? action.link : "/"}
passHref
legacyBehavior
>
<a
data-tinafield={`${parentField}.${index}`}
className={`group inline-flex items-center font-semibold text-lg transition duration-150 ease-out`}
Expand Down
3 changes: 1 addition & 2 deletions content/authors/brady.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
name: Brady Stroud
avatar: >-
https://instagram.fcdg3-1.fna.fbcdn.net/v/t51.2885-19/414190101_1502753243841322_7015112107600143067_n.jpg?stp=dst-jpg_s320x320&_nc_ht=instagram.fcdg3-1.fna.fbcdn.net&_nc_cat=110&_nc_ohc=nGbadof_if4Ab5K64K2&edm=AOQ1c0wBAAAA&ccb=7-5&oh=00_AfBeghJJ-kRNDF5Gg-nPpt5JggIuFgQX797hdZLLWrD7cQ&oe=6621FF45&_nc_sid=8b3546
avatar: /uploads/65E00928-4556-40A3-817F-885C03A3ACBC_1_105_c.jpeg
---

36 changes: 20 additions & 16 deletions pages/[filename].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTina } from "tinacms/dist/react";
import { Layout } from "../components/layout";
import { client } from "../tina/__generated__/client";
import { InferGetStaticPropsType } from "next";
import Link from "next/link";

export default function HomePage(
props: InferGetStaticPropsType<typeof getStaticProps>
Expand All @@ -12,28 +13,31 @@ export default function HomePage(
variables: props.variables,
data: props.data,
});
const bestParmi = props.topParmi.node;
return (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
<Layout data={data.global as any}>
<Blocks {...data.page} />
<section className="m-auto">
<div className="badge">
<svg width="300" height="50" className="best">
{" "}
<path
id="curve"
d="M100,25 A140,85 0 0 1 290,120"
fill="transparent"
/>
<text fill="white" style={{ fontSize: "20px" }}>
<textPath href="#curve">BEST PARMI</textPath>
</text>
</svg>
<div className="flex flex-col items-center pt-4">
<div className="score">{props.topParmi.node.score}</div>
<div className="text-xl">{props.topParmi.node.restaurant.name}</div>
<Link href={bestParmi.id.split(".")[0]}>
<div className="badge">
<svg width="300" height="50" className="best">
{" "}
<path
id="curve"
d="M100,25 A140,85 0 0 1 290,120"
fill="transparent"
/>
<text fill="white" style={{ fontSize: "20px" }}>
<textPath href="#curve">BEST PARMI</textPath>
</text>
</svg>
<div className="flex flex-col items-center pt-4">
<div className="score">{bestParmi.score}</div>
<div className="text-xl">{bestParmi.restaurant.name}</div>
</div>
</div>
</div>
</Link>
</section>
</Layout>
);
Expand Down
Binary file added public/brady.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/favicon.ico
Binary file not shown.
6 changes: 0 additions & 6 deletions public/tina.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/uploads/brady.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
color: white;
font-size: 16px;
padding: 1rem;
margin-bottom: 3rem;
}

/* Yellow middle ring */
Expand Down
2 changes: 1 addition & 1 deletion tina/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const config = defineConfig({
required: true,
},
{
type: "string",
type: "image",
label: "Avatar",
name: "avatar",
},
Expand Down
2 changes: 1 addition & 1 deletion tina/tina-lock.json

Large diffs are not rendered by default.

0 comments on commit 5d4a423

Please sign in to comment.