Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom loader for now #112

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"eslint.format.enable": true,
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
Expand Down
41 changes: 5 additions & 36 deletions components/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,15 @@ const Logo = ({
<>
{forceLight ? (
<div className={`${className} flex dark:hidden`}>
<Image
src={logoDark}
priority
width={width}
height={height}
layout="fixed"
alt=""
/>
<Image src={logoDark} priority width={width} height={height} alt="" />
</div>
) : (
<>
<div className={`${className} flex dark:hidden`}>
<Image
src={logo}
width={width}
height={height}
layout="fixed"
alt=""
/>
<Image src={logo} width={width} height={height} alt="" />
</div>
<div className={`${className} hidden dark:flex`}>
<Image
src={logoDark}
width={width}
height={height}
layout="fixed"
alt=""
/>
<Image src={logoDark} width={width} height={height} alt="" />
</div>
</>
)}
Expand All @@ -55,22 +36,10 @@ const Logo = ({
const LogoSquare: React.FC<{ size: number }> = ({ size }) => (
<>
<div className="flex dark:hidden">
<Image
src={logosquare}
width={size}
height={size}
layout="fixed"
alt=""
/>
<Image src={logosquare} width={size} height={size} alt="" />
</div>
<div className="hidden dark:flex">
<Image
src={logosquareDark}
width={size}
height={size}
layout="fixed"
alt=""
/>
<Image src={logosquareDark} width={size} height={size} alt="" />
</div>
</>
)
Expand Down
10 changes: 9 additions & 1 deletion components/MDXComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
}

const RoundedImage = (props: ImageProps) => {
return <Image {...props} />
return (
<Image

Check warning on line 23 in components/MDXComponents.tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

Image elements must have an alt prop, either with meaningful text, or an empty string for decorative images
{...props}
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
)
}

const MDXComponents = {
Expand Down
4 changes: 4 additions & 0 deletions components/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const Profile: React.FC<{
width={size}
height={size}
alt=""
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
)

Expand Down
4 changes: 4 additions & 0 deletions components/sections/MenuComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ const MenuComp = () => {
width={1400}
height={800}
alt=""
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</motion.div>
</Parallax>
Expand Down
8 changes: 8 additions & 0 deletions components/sections/Partners.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ const Partners = () => {
alt={partner.name}
width={partner.imgWidth}
height={partner.imgHeight}
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
{partner.darkImg && (
<div
Expand All @@ -42,6 +46,10 @@ const Partners = () => {
alt={partner.name}
width={partner.imgWidth}
height={partner.imgHeight}
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</div>
)}
Expand Down
10 changes: 8 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ module.exports = withContentlayer()({
reactStrictMode: true,

images: {
loader: process.env.NODE_ENV == 'production' ? 'custom' : 'default',
loaderFile: 'image-loader.js',
domains: [
'avatars.githubusercontent.com',
'fosshost.org',
'owo.whats-th.is',
'images.unsplash.com',
'yuri.might-be-super.fun',
'chito.ge',
],
formats: ['image/avif', 'image/webp'],
},
swcMinify: true,
Expand Down
8 changes: 8 additions & 0 deletions pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GetStaticProps, NextPage } from 'next'
import Link from 'next/link'

Check warning on line 2 in pages/404.tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

'Link' is defined but never used
import Image from 'next/image'
import Blahaj from 'public/images/blahaj.jpg'
import text404 from 'public/images/404text.png'
Expand Down Expand Up @@ -39,6 +39,10 @@
width={207}
height={45}
className="mx-auto"
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</div>

Expand All @@ -63,6 +67,10 @@
src={Blahaj}
alt=""
className=" my-2 mx-auto max-h-[26rem] w-auto rounded-xl border"
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>

<div className="mx-auto mt-8 mb-8 flex flex-wrap justify-center gap-4">
Expand Down
30 changes: 26 additions & 4 deletions pages/about.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable prettier/prettier */
import type { NextPage, GetStaticProps } from 'next'
import Image from 'next/image'
import Image from "next/image"
import Link from 'next/link'
import ReactMarkdown from 'react-markdown'

Expand All @@ -11,8 +11,8 @@

import { createClient } from '@vercel/kv'
import donationImage from 'public/images/donations.png'
import VignettePadding from 'public/images/logo-bg.svg'

Check warning on line 14 in pages/about.tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

'VignettePadding' is defined but never used
import teamMembers from 'data/members.json'

Check warning on line 15 in pages/about.tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

'teamMembers' is defined but never used
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { useTranslation } from 'next-i18next'
import { Dialog, Transition } from '@headlessui/react'
Expand All @@ -34,7 +34,7 @@
balance: number
}

const splitAt = (xs: string, index: number) => [

Check warning on line 37 in pages/about.tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

'splitAt' is assigned a value but never used
xs.slice(0, index),
xs.slice(index),
]
Expand Down Expand Up @@ -107,7 +107,17 @@
</Fadein>
</div>
<Fadein className="mt-32 text-center ">
<Image src={repoIcon} alt="" quality={100} width={72} height={72} className="inline-block" />
<Image
src={repoIcon}
alt=""
quality={100}
width={72}
height={72}
className="inline-block"
style={{
maxWidth: `100%`,
height: `auto`
}} />

<h2 className="mt-8 text-2xl font-bold lg:text-3xl">
{t(`section1-title`)}
Expand All @@ -127,7 +137,10 @@
className="rounded-full"
src={user.profile}
alt=""
/>
style={{
maxWidth: `100%`,
height: `auto`
}} />
</div>

</Link>)
Expand All @@ -143,7 +156,16 @@
</p>
</Fadein>
<div className="container mt-12 text-center">
<Image src={donationImage} className="inline-block" width={400} height={400} alt="" />
<Image
src={donationImage}
className="inline-block"
width={400}
height={400}
alt=""
style={{
maxWidth: `100%`,
height: `auto`
}} />
<h1 className="text-3xl font-bold"> {t(`section3-title`)}</h1>
<p className="mx-auto mt-2 mb-2 max-w-[34em]">{t(`section3-p`)}</p>
<button
Expand Down
12 changes: 10 additions & 2 deletions pages/blog/[slug].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pages/posts/[slug].js

import Head from 'next/head'

Check warning on line 3 in pages/blog/[slug].tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

'Head' is defined but never used
import Link from 'next/link'
import { format, parseISO } from 'date-fns'
import { allPosts, Post } from 'contentlayer/generated'
Expand All @@ -8,7 +8,7 @@
import { Footer, Nav, SEO } from 'components'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'

import circles from 'public/images/blog-banner.png'

Check warning on line 11 in pages/blog/[slug].tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

'circles' is defined but never used
import components from 'components/MDXComponents'
import { getMDXComponent } from 'mdx-bundler/client'

Expand Down Expand Up @@ -63,6 +63,10 @@
className="rounded-md object-cover object-center "
alt=""
priority
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</a>

Expand All @@ -73,6 +77,10 @@
height={40}
alt=""
className="rounded-full"
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
<div className="pl-3">
<span className="font-semibold">{post.author}</span>
Expand Down Expand Up @@ -120,8 +128,8 @@
</Link>
</div>
{/* <div className="relative left-0 h-80 w-80 lg:top-24 2xl:absolute">
<Image src={circles} layout="fill" priority alt="" />
</div> */}
<Image src={circles} layout="fill" priority alt="" />
</div> */}
<Footer />
</>
)
Expand Down
8 changes: 8 additions & 0 deletions pages/blog/category/[category].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
quality={100}
className="rounded-md object-cover object-center transition duration-300 hover:scale-105"
alt=""
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</Link>
<div className="w-full py-4 ">
Expand All @@ -78,7 +82,7 @@
<p className="mt-4">{post.summary}</p>
</Link>
<div className="mt-4 flex items-center">
<Link

Check warning on line 85 in pages/blog/category/[category].tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

passHref is missing. See https://nextjs.org/docs/messages/link-passhref
href={members.filter((item) => item.name == post.author)[0].url}
>
<Image
Expand All @@ -87,6 +91,10 @@
height={40}
alt=""
className="rounded-full"
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</Link>
<div className="pl-2 text-sm">
Expand Down
16 changes: 16 additions & 0 deletions pages/blog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ function PostCard(post: Post) {
quality={100}
className="rounded-md object-cover object-center transition duration-300 hover:scale-105"
alt=""
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</Link>
<div className="w-full py-4 ">
Expand All @@ -67,6 +71,10 @@ function PostCard(post: Post) {
height={40}
alt=""
className="rounded-full"
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</Link>
<div className="pl-2 text-sm">
Expand Down Expand Up @@ -157,6 +165,10 @@ const Blog: NextPage<{ posts: Post[] }> = ({ posts }) => {
className="rounded-md object-cover object-center transition duration-300 hover:scale-105"
alt=""
priority
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</Link>
<div className="py-4 md:px-8 md:py-8 lg:w-[32rem]">
Expand Down Expand Up @@ -194,6 +206,10 @@ const Blog: NextPage<{ posts: Post[] }> = ({ posts }) => {
height={40}
alt=""
className="rounded-full"
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</Link>
<div className="pl-2 text-sm">
Expand Down
11 changes: 10 additions & 1 deletion pages/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,16 @@ const Home: NextPage<cache> = () => {
<div className="flex h-96 w-[16rem] flex-col justify-between rounded-2xl border p-8 px-10 text-center shadow dark:border-neutral-700">
<div>
<div className="item-center mx-auto flex h-24 w-24 items-center justify-center rounded-full border bg-pinkRed dark:border-none dark:border-neutral-700">
<Image src={envelope} width={48} height={48} alt="" />
<Image
src={envelope}
width={48}
height={48}
alt=""
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</div>
<h3 className=" mt-4 text-xl font-bold">{t(`anything-else`)}</h3>
<p className="mx-auto mt-2 max-w-[18rem] text-center text-sm">
Expand Down
12 changes: 10 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ const Home: NextPage<cache> = ({ contributors }) => {
width={1280}
height={720}
quality={90}
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</div>
</div>
Expand All @@ -124,8 +128,8 @@ const Home: NextPage<cache> = ({ contributors }) => {
{t(`extensions-in-development`)}
</p>
{/* <Link href="/extensions" passHref>
<a className="button"> {t(`explore-extensions-button`)}</a>
</Link> */}
<a className="button"> {t(`explore-extensions-button`)}</a>
</Link> */}
</div>
<div className=" mt-8" title="Coming soon....">
<Marquee speed={50} gradientWidth={0}>
Expand Down Expand Up @@ -163,6 +167,10 @@ const Home: NextPage<cache> = ({ contributors }) => {
height={64}
className="rounded-full"
alt=""
style={{
maxWidth: `100%`,
height: `auto`,
}}
/>
</div>
))}
Expand Down
Loading