Skip to content

Commit 9dfe788

Browse files
committed
Footer branding and placeholder about
1 parent c545b47 commit 9dfe788

9 files changed

Lines changed: 276 additions & 11 deletions

app/lib/footer.tsx

Lines changed: 82 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,89 @@
11
import Image from "next/image";
2+
import Link from "next/link";
23

34
export function Footer() {
5+
const navigation = {
6+
main: [{ name: "About", href: "/about" }],
7+
social: [
8+
{
9+
name: "Twitter",
10+
href: "#",
11+
icon: (props) => (
12+
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
13+
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />
14+
</svg>
15+
),
16+
},
17+
{
18+
name: "GitHub",
19+
href: "#",
20+
icon: (props) => (
21+
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
22+
<path
23+
fillRule="evenodd"
24+
d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
25+
clipRule="evenodd"
26+
/>
27+
</svg>
28+
),
29+
},
30+
],
31+
};
32+
433
return (
5-
<footer>
6-
<a
7-
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
8-
target="_blank"
9-
rel="noopener noreferrer"
10-
>
11-
Powered by{" "}
12-
<span>
13-
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
14-
</span>
15-
</a>
34+
<footer className="bg-white">
35+
<div className="max-w-7xl mx-auto py-12 px-4 overflow-hidden sm:px-6 lg:px-8">
36+
<nav
37+
className="-mx-5 -my-2 flex flex-wrap justify-center"
38+
aria-label="Footer"
39+
>
40+
{navigation.main.map((item) => (
41+
<div key={item.name} className="px-5 py-2">
42+
<Link href={item.href}>
43+
<a className="text-base text-gray-500 hover:text-gray-900">
44+
{item.name}
45+
</a>
46+
</Link>
47+
</div>
48+
))}
49+
</nav>
50+
<div className="bg-white">
51+
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
52+
<div className="grid grid-cols-2 gap-8 md:grid-cols-2 lg:grid-cols-2">
53+
<div className="col-span-1 flex justify-center md:col-span-2 lg:col-span-1">
54+
<a href="https://www.supabase.com">
55+
<img
56+
className="h-12"
57+
src="/supabase-logo-wordmark--light.svg"
58+
alt="Supabase"
59+
/>
60+
</a>
61+
</div>
62+
<div className="col-span-1 flex justify-center md:col-span-2 lg:col-span-1">
63+
<a href="https://www.the-guild.dev">
64+
<img
65+
className="h-12"
66+
src="/the-guild-full-dark.svg"
67+
alt="The Guild"
68+
/>
69+
</a>
70+
</div>
71+
</div>
72+
</div>
73+
</div>
74+
<div className="mt-8 flex justify-center space-x-6">
75+
{navigation.social.map((item) => (
76+
<a
77+
key={item.name}
78+
href={item.href}
79+
className="text-gray-400 hover:text-gray-500"
80+
>
81+
<span className="sr-only">{item.name}</span>
82+
<item.icon className="h-6 w-6" aria-hidden="true" />
83+
</a>
84+
))}
85+
</div>
86+
</div>
1687
</footer>
1788
);
1889
}

app/pages/about.tsx

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
import React from "react";
2+
import type { NextPage } from "next";
3+
import Head from "next/head";
4+
import { useQuery } from "urql";
5+
import { gql } from "../gql";
6+
import { Container } from "../lib/container";
7+
import { FeedItem } from "../lib/feed-item";
8+
import { MainSection } from "../lib/main-section";
9+
import { noopUUID } from "../lib/noop-uuid";
10+
11+
const About: NextPage = () => {
12+
return (
13+
<Container>
14+
<Head>
15+
<title>supanews | About</title>
16+
<meta name="description" content="What is hot?" />
17+
<link rel="icon" href="/favicon.ico" />
18+
</Head>
19+
20+
<MainSection>
21+
<section className="text-gray-600 body-font overflow-hidden w-full">
22+
<div className="container px-3 py-24 mx-auto">
23+
<div className="-my-8">
24+
<h1 className="text-2xl py-6">Supabase PG GraphQL Example App</h1>
25+
26+
<p>
27+
A basic HackerNews-like clone where posts can be submitted with
28+
url links and then up and down voted.
29+
</p>
30+
31+
<h2 className="text-xl pt-4">Showcase</h2>
32+
33+
<h3 className="text-lg py-6"> Backend pg_graphql / supabase</h3>
34+
<ul>
35+
<li>CRUD (Query + Mutation Operations)</li>
36+
<li>Cursor Based Pagination</li>
37+
<li>Authorization / RLS</li>
38+
</ul>
39+
<h3 className="text-lg py-6">Frontend</h3>
40+
<ul>
41+
<li>
42+
[Next.js](https://nextjs.org) <li></li>React Framework
43+
</li>
44+
<li>
45+
[TypeScript](https://www.typescriptlang.org) TypeScript is a
46+
strongly typed programming language that builds on JavaScript,
47+
giving you better tooling at any scale.
48+
</li>
49+
<li>
50+
[graphql-code-generator](https://www.graphql-code-generator.com){" "}
51+
<li></li>Generate code from your GraphQL schema and operations
52+
with a simple CLI
53+
</li>
54+
<li>
55+
[gql-tag-operations-preset](https://www.graphql-code-generator.com/plugins/gql-tag-operations-preset){" "}
56+
<li></li>This code gen preset generates typings for your
57+
inline gql function usages, without having to manually specify
58+
import statements for the documents
59+
</li>
60+
<li>
61+
[urql](https://formidable.com/open-source/urql/) <li></li>A
62+
highly customizable and versatile GraphQL client
63+
</li>
64+
<li>
65+
[Gravatar](https://en.gravatar.com) <li></li>Default avatar
66+
profile images from Gravatar
67+
</li>
68+
</ul>
69+
<h3 className="text-lg py-6">Backend</h3>
70+
<ul>
71+
<li>
72+
[Supabase](https://supabase.com) <li></li>Create a backend in
73+
less than 2 minutes. Start your project with a Postgres
74+
Database, Authentication, instant APIs, Realtime subscriptions
75+
and Storage.
76+
</li>
77+
<li>
78+
[pg_graphql](https://supabase.com/blog/2021/12/03/pg-graphql){" "}
79+
<li></li>A native [PostgreSQL
80+
extension](https://supabase.github.io/pg_graphql/) adding
81+
[GraphQL support](https://graphql.org). The extension keeps
82+
schema generation, query parsing, and resolvers all neatly
83+
contained on your database server requiring no external
84+
services.
85+
</li>
86+
<li>
87+
[Postgres
88+
Triggers](https://supabase.com/blog/2021/07/30/supabase-functions-updates)
89+
and [Postgres
90+
Functions](https://supabase.com/docs/guides/database/functions){" "}
91+
<li></li>When votes are in, use triggers to invoke a Postgres
92+
function that calculates a post score to rank the feed
93+
</li>
94+
<li>
95+
[Postgres Enumerated
96+
Types](https://www.postgresql.org/docs/14/datatype-enum.html){" "}
97+
<li></li>Enums help defined the direction of a vote: UP or
98+
DOWN.
99+
</li>
100+
</ul>
101+
<h3 className="text-lg py-6">Functionality</h3>
102+
<ul>
103+
<li>Registration</li>
104+
<li>Get a ranked feed of posts</li>
105+
<li>Create Post</li>
106+
<li>Delete Post</li>
107+
<li>Create Comment</li>
108+
<li>Delete Comment</li>
109+
<li>Upvote/Downvote Post</li>
110+
<li>View Profile (Account)</li>
111+
<li>View Profile (Public)</li>
112+
<li>Pagination (Posts, Comments)</li>
113+
</ul>
114+
</div>
115+
</div>
116+
</section>
117+
</MainSection>
118+
</Container>
119+
);
120+
};
121+
122+
export default About;

app/public/supabase-logo-icon.png

47.5 KB
Loading

app/public/supabase-logo-icon.svg

Lines changed: 15 additions & 0 deletions
Loading
78.1 KB
Loading
Lines changed: 23 additions & 0 deletions
Loading
81.3 KB
Loading

0 commit comments

Comments
 (0)