Skip to content

Commit

Permalink
Merge pull request #94 from timlrx/update/next-13
Browse files Browse the repository at this point in the history
Update package dependencies
  • Loading branch information
timlrx authored Feb 6, 2023
2 parents 3f7ba83 + 3082a5f commit fb149c6
Show file tree
Hide file tree
Showing 6 changed files with 1,108 additions and 436 deletions.
46 changes: 46 additions & 0 deletions starter-blog/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import siteMetadata from '@/data/siteMetadata'
import headerNavLinks from '@/data/headerNavLinks'
import Logo from '@/data/logo.svg'
import Link from './Link'
import MobileNav from './MobileNav'
import ThemeSwitch from './ThemeSwitch'

const Header = () => {
return (
<header className="flex items-center justify-between py-10">
<div>
<Link href="/" aria-label={siteMetadata.headerTitle}>
<div className="flex items-center justify-between">
<div className="mr-3">
<Logo />
</div>
{typeof siteMetadata.headerTitle === 'string' ? (
<div className="hidden h-6 text-2xl font-semibold sm:block">
{siteMetadata.headerTitle}
</div>
) : (
siteMetadata.headerTitle
)}
</div>
</Link>
</div>
<div className="flex items-center text-base leading-5">
<div className="hidden sm:block">
{headerNavLinks.map((link) => (
<Link
key={link.title}
href={link.href}
className="p-1 font-medium text-gray-900 dark:text-gray-100 sm:p-4"
>
{link.title}
</Link>
))}
</div>
<ThemeSwitch />
<MobileNav />
</div>
</header>
)
}

export default Header
41 changes: 2 additions & 39 deletions starter-blog/components/LayoutWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { Inter } from '@next/font/google'
import siteMetadata from '@/data/siteMetadata'
import headerNavLinks from '@/data/headerNavLinks'
import Logo from '@/data/logo.svg'
import Link from './Link'
import SectionContainer from './SectionContainer'
import Footer from './Footer'
import MobileNav from './MobileNav'
import ThemeSwitch from './ThemeSwitch'
import { ReactNode } from 'react'
import Header from './Header'

interface Props {
children: ReactNode
Expand All @@ -21,39 +16,7 @@ const LayoutWrapper = ({ children }: Props) => {
return (
<SectionContainer>
<div className={`${inter.className} flex h-screen flex-col justify-between font-sans`}>
<header className="flex items-center justify-between py-10">
<div>
<Link href="/" aria-label={siteMetadata.headerTitle}>
<div className="flex items-center justify-between">
<div className="mr-3">
<Logo />
</div>
{typeof siteMetadata.headerTitle === 'string' ? (
<div className="hidden h-6 text-2xl font-semibold sm:block">
{siteMetadata.headerTitle}
</div>
) : (
siteMetadata.headerTitle
)}
</div>
</Link>
</div>
<div className="flex items-center text-base leading-5">
<div className="hidden sm:block">
{headerNavLinks.map((link) => (
<Link
key={link.title}
href={link.href}
className="p-1 font-medium text-gray-900 dark:text-gray-100 sm:p-4"
>
{link.title}
</Link>
))}
</div>
<ThemeSwitch />
<MobileNav />
</div>
</header>
<Header />
<main className="mb-auto">{children}</main>
<Footer />
</div>
Expand Down
22 changes: 11 additions & 11 deletions starter-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
"lint": "next lint --fix --dir pages --dir components --dir lib --dir layouts --dir scripts"
},
"dependencies": {
"@next/bundle-analyzer": "13.0.2",
"@next/font": "13.0.2",
"@next/bundle-analyzer": "13.1.6",
"@next/font": "13.1.6",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.7",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.13",
"contentlayer": "0.2.8",
"esbuild": "0.14.38",
"contentlayer": "0.3.0",
"esbuild": "0.17.5",
"github-slugger": "^1.4.0",
"gray-matter": "^4.0.2",
"image-size": "1.0.0",
"mdx-bundler": "^9.0.0",
"next": "13.0.2",
"next-contentlayer": "0.2.8",
"next": "13.1.6",
"next-contentlayer": "0.3.0",
"next-themes": "^0.2.0",
"pliny": "0.0.9",
"postcss": "^8.4.16",
"react": "18.2.0",
"react-dom": "18.2.0",
"reading-time": "1.5.0",
"rehype-autolink-headings": "^6.1.0",
"rehype-citation": "^0.4.0",
"rehype-citation": "^0.5.0",
"rehype-katex": "^6.0.2",
"rehype-preset-minify": "6.0.0",
"rehype-prism-plus": "^1.5.0",
Expand All @@ -49,9 +49,9 @@
"@typescript-eslint/parser": "^5.36.2",
"cross-env": "^7.0.3",
"dedent": "^0.7.0",
"esbuild-register": "3.3.3",
"esbuild-register": "3.4.2",
"eslint": "^8.23.0",
"eslint-config-next": "13.0.2",
"eslint-config-next": "13.1.6",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"file-loader": "^6.0.0",
Expand All @@ -60,7 +60,7 @@
"js-yaml": "4.1.0",
"lint-staged": "^13.0.0",
"prettier": "^2.7.0",
"prettier-plugin-tailwindcss": "^0.1.13",
"prettier-plugin-tailwindcss": "^0.2.2",
"typescript": "^4.8.3"
},
"lint-staged": {
Expand Down
1 change: 1 addition & 0 deletions starter-blog/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
content: [
'../node_modules/pliny/**/*.{js,ts,tsx}',
'./node_modules/pliny/**/*.{js,ts,tsx}',
'./app/**/*.{js,ts,jsx,tsx}',
'./pages/**/*.{js,ts,tsx}',
'./components/**/*.{js,ts,tsx}',
'./layouts/**/*.{js,ts,tsx}',
Expand Down
10 changes: 8 additions & 2 deletions starter-blog/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@
"@/lib/*": ["lib/*"],
"@/css/*": ["css/*"],
"contentlayer/generated": ["./.contentlayer/generated"]
}
},
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"**/*.js",
"**/*.ts",
"**/*.tsx",
".contentlayer/generated",
".contentlayer/generated/**/*.json"
".contentlayer/generated/**/*.json",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}
Loading

0 comments on commit fb149c6

Please sign in to comment.