Skip to content

Commit

Permalink
Merge pull request #47 from IEEE-RVCE/pre-commit
Browse files Browse the repository at this point in the history
[feat] Added pre commit for formatting and build
  • Loading branch information
SundarakrishnanN authored Jan 30, 2024
2 parents 7c63c5f + 509c452 commit fc186e0
Show file tree
Hide file tree
Showing 25 changed files with 1,426 additions and 1,366 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
run: yarn install --frozen-lockfile

- name: Build
run: NODE_ENV=production yarn build
run: NODE_ENV=production yarn build
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn format && yarn build
38 changes: 38 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Build artifacts
.next/
.turbo/
_next/
__tmp__/
dist/
node_modules/
target/
compiled/

lerna.json
test-timings.json
pnpm-lock.yaml

packages/next/src/bundles/webpack/packages/*.runtime.js
packages/next/src/bundles/webpack/packages/lazy-compilation-*.js

.github/actions/next-stats-action/.work

packages/next-swc/crates/**/tests/**/output*
packages/next-swc/crates/core/tests/loader/issue-32553/input.js
packages/next-swc/native/**/*

packages/next-codemod/transforms/__testfixtures__/**
packages/next-codemod/transforms/__tests__/**
packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts

packages/next-env/**/*.d.ts

test/**/out/**
test/development/basic/hmr/components/parse-error.js

bench/nested-deps/pages/**/*
bench/nested-deps/components/**/*

**/convex/_generated/**
**/.tina/__generated__/**
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"singleQuote": true,
"semi": false
}
76 changes: 38 additions & 38 deletions components/Gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,44 @@ import {
Image,
Container,
AspectRatio,
} from "@mantine/core";
} from '@mantine/core'

const imgLinks = [
"https://i.imgur.com/pOMnurc.png",
"https://i.imgur.com/NDp81Y1.png",
"https://i.imgur.com/6EfIKBa.png",
"https://i.ibb.co/h7qyQs8/IMG-20221223-162526-comp.jpg",
"https://i.ibb.co/t8rqP2L/IMG-20221223-154910-comp.jpg",
"https://i.ibb.co/NjZWtvf/IMG-20221222-103051-comp.jpg",
"https://i.ibb.co/6YbHtyt/20221221-121446-comp.jpg",
"https://i.ibb.co/bmKKrSL/IMG-20221223-WA0018.jpg",
"https://github.com/naveenbteli/gallery/blob/master/Album/P2570137.JPEG?raw=true",
"https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4489.JPG",
"https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4491.JPG",
"https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4510.JPG",
"https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4553.JPG",
"https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4585.JPG",
"https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4460.JPG",
"https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4628.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/P2570098.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/P2570105.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/P2570114.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4657.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4674.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4697.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4699.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4731.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/P2570039.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/P2570041.JPG?raw=true",
"https://github.com/naveenbteli/gallery/blob/master/Album/P2570066.JPG?raw=true",
];
'https://i.imgur.com/pOMnurc.png',
'https://i.imgur.com/NDp81Y1.png',
'https://i.imgur.com/6EfIKBa.png',
'https://i.ibb.co/h7qyQs8/IMG-20221223-162526-comp.jpg',
'https://i.ibb.co/t8rqP2L/IMG-20221223-154910-comp.jpg',
'https://i.ibb.co/NjZWtvf/IMG-20221222-103051-comp.jpg',
'https://i.ibb.co/6YbHtyt/20221221-121446-comp.jpg',
'https://i.ibb.co/bmKKrSL/IMG-20221223-WA0018.jpg',
'https://github.com/naveenbteli/gallery/blob/master/Album/P2570137.JPEG?raw=true',
'https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4489.JPG',
'https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4491.JPG',
'https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4510.JPG',
'https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4553.JPG',
'https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4585.JPG',
'https://raw.githubusercontent.com/naveenbteli/gallery/master/Album/3J2A4460.JPG',
'https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4628.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/P2570098.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/P2570105.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/P2570114.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4657.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4674.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4697.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4699.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/3J2A4731.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/P2570039.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/P2570041.JPG?raw=true',
'https://github.com/naveenbteli/gallery/blob/master/Album/P2570066.JPG?raw=true',
]

const useStyles = createStyles((theme) => ({
card: {
transition: "transform 150ms ease, box-shadow 150ms ease",
transition: 'transform 150ms ease, box-shadow 150ms ease',

"&:hover": {
transform: "scale(1.01)",
'&:hover': {
transform: 'scale(1.01)',
boxShadow: theme.shadows.md,
},
},
Expand All @@ -51,26 +51,26 @@ const useStyles = createStyles((theme) => ({
fontFamily: `Greycliff CF, ${theme.fontFamily}`,
fontWeight: 600,
},
}));
}))

function Gallery() {
const { classes } = useStyles();
const { classes } = useStyles()

const cards = imgLinks.map((link) => (
<Card key={link} p="md" radius="md" className={classes.card}>
<AspectRatio ratio={1920 / 1080}>
<Image src={link} />
</AspectRatio>
</Card>
));
))

return (
<Container py="xl">
<SimpleGrid cols={3} breakpoints={[{ maxWidth: "sm", cols: 1 }]}>
<SimpleGrid cols={3} breakpoints={[{ maxWidth: 'sm', cols: 1 }]}>
{cards}
</SimpleGrid>
</Container>
);
)
}

export default Gallery;
export default Gallery
46 changes: 25 additions & 21 deletions components/HeaderImages.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React from "react";
import React from 'react'

const HeaderImages = () => {

const images = [
{
src: "RVCE NEW-HEADER.png",
alt: "rvce_logo",
href: "https://www.rvce.edu.in/",
src: 'RVCE NEW-HEADER.png',
alt: 'rvce_logo',
href: 'https://www.rvce.edu.in/',
show: true,
padding: "p-2"
padding: 'p-2',
},
// {
// src: "logo_IEEE_Main.png",
Expand All @@ -25,35 +24,40 @@ const HeaderImages = () => {
// padding: "pt-6"
// },
{
src: "logo_rvce_ieee.png",
alt: "rvce_ieee_logo",
href: "https://ieee-rvce.org/",
src: 'logo_rvce_ieee.png',
alt: 'rvce_ieee_logo',
href: 'https://ieee-rvce.org/',
show: true,
padding: "pt-6"
padding: 'pt-6',
},
];
]
return (
<div>
<div className="center p-auto mt-0 m-14 hidden flex-col md:block ">
<div className="flex items-center overflow-x-scroll gap-8 mt-6 scrollbar-hide justify-evenly bg-white bg-opacity-30 rounded-3xl mx-20 backdrop-blur-sm ">
<div className="center p-auto m-14 mt-0 hidden flex-col md:block ">
<div className="mx-20 mt-6 flex items-center justify-evenly gap-8 overflow-x-scroll rounded-3xl bg-white bg-opacity-30 backdrop-blur-sm scrollbar-hide ">
{images.map((image) => {
if (image.show) {
return (
<div className="inline-block my-6 ">
<div className={` mx-0 max-w-xs overflow-hidden ${image.padding} transition-shadow duration-300 ease-in-out hover:shadow-xl `}>
<div className="my-6 inline-block ">
<div
className={` mx-0 max-w-xs overflow-hidden ${image.padding} transition-shadow duration-300 ease-in-out hover:shadow-xl `}
>
<a href={image.href} target="_blank" rel="noreferrer">
<img className="h-fit w-fit object-cover " src={image.src} alt={image.alt} />
<img
className="h-fit w-fit object-cover "
src={image.src}
alt={image.alt}
/>
</a>
</div>
</div>
);
)
} else return
})}
</div>
</div>
</div>
)
}

);
};

export default HeaderImages;
export default HeaderImages
Loading

0 comments on commit fc186e0

Please sign in to comment.