mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-04 14:10:10 -05:00
separate repository grid styles/logic from the card component
This commit is contained in:
@@ -7,7 +7,7 @@ import { MailIcon, LockIcon } from "../components/icons";
|
||||
export default function Contact() {
|
||||
return (
|
||||
<Layout>
|
||||
<Container title="✉️ Contact Me">
|
||||
<Container title="Contact Me">
|
||||
<PageTitle
|
||||
title={
|
||||
<>
|
||||
|
||||
@@ -3,16 +3,13 @@ import { buildFeed } from "../lib/build-feed";
|
||||
import type { GetServerSideProps } from "next";
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
if (context && context.res) {
|
||||
const { res } = context;
|
||||
const notes = getAllNotes(["title", "date", "image", "slug", "description"]);
|
||||
const feed = buildFeed(notes);
|
||||
|
||||
const notes = getAllNotes(["title", "date", "image", "slug", "description"]);
|
||||
|
||||
const feed = buildFeed(notes);
|
||||
res.setHeader("content-type", "application/atom+xml");
|
||||
res.write(feed.atom1());
|
||||
res.end();
|
||||
}
|
||||
const { res } = context;
|
||||
res.setHeader("content-type", "application/atom+xml");
|
||||
res.write(feed.atom1());
|
||||
res.end();
|
||||
|
||||
return {
|
||||
props: {},
|
||||
|
||||
@@ -3,16 +3,13 @@ import { buildFeed } from "../lib/build-feed";
|
||||
import type { GetServerSideProps } from "next";
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
if (context && context.res) {
|
||||
const { res } = context;
|
||||
const notes = getAllNotes(["title", "date", "image", "slug", "description"]);
|
||||
const feed = buildFeed(notes);
|
||||
|
||||
const notes = getAllNotes(["title", "date", "image", "slug", "description"]);
|
||||
|
||||
const feed = buildFeed(notes);
|
||||
res.setHeader("content-type", "application/rss+xml");
|
||||
res.write(feed.rss2());
|
||||
res.end();
|
||||
}
|
||||
const { res } = context;
|
||||
res.setHeader("content-type", "application/rss+xml");
|
||||
res.write(feed.rss2());
|
||||
res.end();
|
||||
|
||||
return {
|
||||
props: {},
|
||||
|
||||
@@ -2,14 +2,14 @@ import { graphql } from "@octokit/graphql";
|
||||
import Layout from "../components/Layout";
|
||||
import Container from "../components/Container";
|
||||
import PageTitle from "../components/page/PageTitle";
|
||||
import RepositoryGrid from "../components/projects/RepositoryGrid";
|
||||
import RepoCard from "../components/projects/RepoCard";
|
||||
import { ProjectsIcon } from "../components/icons";
|
||||
import type { GetStaticProps } from "next";
|
||||
|
||||
export default function Projects({ repos }) {
|
||||
return (
|
||||
<Layout>
|
||||
<Container title="👨💻 Projects">
|
||||
<Container title="Projects">
|
||||
<PageTitle
|
||||
title={
|
||||
<>
|
||||
@@ -17,7 +17,42 @@ export default function Projects({ repos }) {
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<RepositoryGrid repos={repos} />
|
||||
|
||||
<div>
|
||||
{repos.map((repo) => (
|
||||
<div key={repo.name} className="repo_card">
|
||||
<RepoCard {...repo} />
|
||||
</div>
|
||||
))}
|
||||
|
||||
<style jsx>{`
|
||||
div {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div .repo_card {
|
||||
flex-grow: 1;
|
||||
margin: 0.5em;
|
||||
width: 400px;
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/jakejarvis?tab=repositories" target="_blank" rel="noopener noreferrer">
|
||||
View more on GitHub...
|
||||
</a>
|
||||
<style jsx>{`
|
||||
p {
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
`}</style>
|
||||
</p>
|
||||
</Container>
|
||||
</Layout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user