Skip to content

Commit

Permalink
porting old jekyll homepage to nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdavis committed May 2, 2024
1 parent 0bbefd0 commit c6b1712
Show file tree
Hide file tree
Showing 15 changed files with 1,535 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/homepage2/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ['custom', 'next'],
rules: {
'@next/next/no-html-link-for-pages': 'off',
},
};
38 changes: 38 additions & 0 deletions apps/homepage2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
8 changes: 8 additions & 0 deletions apps/homepage2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# registry

## 1.0.1

### Patch Changes

- Updated dependencies [b20e0e3]
- @jsonresume/theme-stackoverflow@2.1.1
6 changes: 6 additions & 0 deletions apps/homepage2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This is the homepage rewritten from jekyll into nextjs

- finish it
- make an integrations page
- fix all the weird white space around links and stuff
- fix the head to make it like jekyll
20 changes: 20 additions & 0 deletions apps/homepage2/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
reactStrictMode: true,
transpilePackages: ['ui'],
async rewrites() {
return [];
},
compiler: {
styledComponents: true,
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'in.getclicky.com',
port: '',
pathname: '/*',
},
],
},
};
60 changes: 60 additions & 0 deletions apps/homepage2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "homepage2",
"version": "1.0.1",
"private": true,
"scripts": {
"dev": "next dev --port 3002",
"build": "prisma generate && next build",
"start": "next start",
"lint": "next lint --max-warnings=0",
"postinstall": "prisma generate --data-proxy",
"db:generate": "prisma generate",
"test:e2e": "playwright test"
},
"dependencies": {
"@faker-js/faker": "^8.0.2",
"@jsonresume/theme-papirus": "workspace:*",
"@jsonresume/theme-stackoverflow": "workspace:*",
"@pinecone-database/pinecone": "^0.1.6",
"@prisma/client": "^4.15.0",
"@supabase/supabase-js": "^2.39.6",
"async": "^3.2.4",
"axios": "^1.3.6",
"chatgpt": "^5.2.4",
"dotenv-cli": "^7.2.1",
"eventsource-parser": "^1.0.0",
"express": "^4.18.2",
"faker": "^6.6.6",
"gravatar": "^1.8.2",
"handlebars": "^4.7.8",
"json-to-pretty-yaml": "^1.2.2",
"jsonschema": "^1.4.1",
"lodash": "^4.17.21",
"next": "^13.4.4",
"node-html-markdown": "^1.3.0",
"object-hash": "^3.0.0",
"openai": "^3.2.1",
"pg": "^8.11.0",
"pinecone-client": "^1.1.0",
"prisma": "^4.15.0",
"qr-image": "^3.2.0",
"react": "^18.2.0",
"react-autocomplete": "^1.8.1",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.7",
"resume-schema": "^1.0.0",
"styled-components": "^6",
"ui": "workspace:*",
"uuid": "^9.0.0"
},
"devDependencies": {
"@playwright/test": "^1.40.0",
"@types/node": "^20.10.0",
"caniuse-lite": "^1.0.30001566",
"eslint": "^8.55.0",
"eslint-config-custom": "workspace:*",
"eslint-config-next": "^14.0.3",
"playwright": "^1.40.0",
"typescript": "^5.3.2"
}
}
6 changes: 6 additions & 0 deletions apps/homepage2/pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import './styles.css';

// This default export is required in a new `pages/_app.js` file.
export default function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />;
}
139 changes: 139 additions & 0 deletions apps/homepage2/pages/_document.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
// pages/_document.tsx file
import Document, { Html, Head, Main, NextScript } from 'next/document';
import { ServerStyleSheet } from 'styled-components';
export default class MyDocument extends Document {
render() {
return (
<Html>
<Head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />

<link rel="dns-prefetch" href="//fonts.googleapis.com" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com" />
<link rel="dns-prefetch" href="//static.getclicky.com" />

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="{{site.description}}" />

<title>asdasd</title>

<link rel="shortcut icon" href="/favicon.png" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Ubuntu:400,500,700"
defer
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Lato:300,500,700"
defer
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"
integrity="sha256-AIodEDkC8V/bHBkfyxzolUMw57jeQ9CauwhVW6YJ9CA="
crossorigin="anonymous"
defer
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w="
crossorigin="anonymous"
defer
/>

<script
src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"
integrity="sha256-3Jy/GbSLrg0o9y5Z5n1uw0qxZECH7C6OQpVBgNFYa0g="
crossorigin="anonymous"
defer
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"
integrity="sha256-g6iAfvZp+nDQ2TdTR/VVKJf3bGro4ub5fvWSWVRi2NE="
crossorigin="anonymous"
defer
></script>
</Head>
<body>
<div id="main">
<div id="viewport">
<aside id="sidebar">
<a href="/">Home</a>
<a href="/getting-started/">Getting Started</a>
<a href="/schema/">Schema</a>
<a href="/themes/">Themes</a>
<a href="/projects/">Projects</a>
<a href="/team/">Team</a>
<a href="/blog/">Blog</a>
</aside>
<div class="inner">
<nav id="nav">
<a href="#" class="lt">
<img src="/img/hamburger.png" />
</a>
<div class="container">
<div class="row">
<div class="col-sm-12">
<a href="/">JSON Resume</a>
<div class="float-right hidden-xs">
<a href="/getting-started/">Getting Started</a>
<a href="/schema/">Schema</a>
<a href="/themes/">Themes</a>
<a href="/projects/">Projects</a>
<a href="/team/">Team</a>
<a href="/blog/">Blog</a>
</div>
</div>
</div>
</div>
</nav>
<Main />

<footer id="footer" class="container">
<div class="row">
<div class="col-sm-12">
<p>JSON Resume is open source</p>
<p>
<a href="//github.com/jsonresume">View on GitHub</a>
</p>
</div>
</div>
</footer>
</div>
</div>
</div>

<NextScript />
</body>
</Html>
);
}
static async getInitialProps(ctx) {
const sheet = new ServerStyleSheet();
const originalRenderPage = ctx.renderPage;
try {
ctx.renderPage = () =>
originalRenderPage({
enhanceApp: (App) => (props) =>
sheet.collectStyles(<App {...props} />), //gets the styles from all the components inside <App>
});
const initialProps = await Document.getInitialProps(ctx);
return {
...initialProps,
styles: (
<>
{initialProps.styles}
{sheet.getStyleElement()}
</>
),
};
} finally {
sheet.seal();
}
}
}
Loading

0 comments on commit c6b1712

Please sign in to comment.