-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from upayanmazumder/PWA
Pwa
- Loading branch information
Showing
18 changed files
with
11,843 additions
and
9,662 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "Upayan", | ||
"short_name": "Upayan", | ||
"description": "Upayan's portfolio site", | ||
"start_url": "/", | ||
"display": "standalone", | ||
"background_color": "#ffffff", | ||
"theme_color": "#4f80b6", | ||
"icons": [ | ||
{ | ||
"src": "/icons/icon-16x16.png", | ||
"sizes": "16x16", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-32x32.png", | ||
"sizes": "32x32", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-64x64.png", | ||
"sizes": "64x64", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-128x128.png", | ||
"sizes": "128x128", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-256x256.png", | ||
"sizes": "256x256", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
self.addEventListener('install', (event) => { | ||
console.log('Service Worker installing.'); | ||
}); | ||
|
||
self.addEventListener('activate', (event) => { | ||
console.log('Service Worker activating.'); | ||
}); | ||
|
||
self.addEventListener('fetch', (event) => { | ||
console.log('Fetching:', event.request.url); | ||
event.respondWith(fetch(event.request)); | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"use client" | ||
|
||
import { Analytics } from "@vercel/analytics/react" | ||
import React from "react"; | ||
import Header from "../components/header/header"; | ||
import Navbar from "../components/navbar/navbar"; | ||
import Footer from "../components/footer/footer"; | ||
import "./globals.css"; | ||
|
||
const geistSans = localFont({ | ||
src: "./fonts/GeistVF.woff", | ||
variable: "--font-geist-sans", | ||
weight: "100 900", | ||
}); | ||
const geistMono = localFont({ | ||
src: "./fonts/GeistMonoVF.woff", | ||
variable: "--font-geist-mono", | ||
weight: "100 900", | ||
}); | ||
|
||
import localFont from "next/font/local"; | ||
|
||
|
||
export default function RootLayoutClient({ children }) { | ||
|
||
return ( | ||
<html lang="en"> | ||
<head> | ||
<link rel="manifest" href="/manifest.json" /> | ||
</head> | ||
<body className={`${geistSans.variable} ${geistMono.variable}`}> | ||
<Header /> | ||
<Navbar /> | ||
{children} | ||
<Analytics /> | ||
<Footer /> | ||
</body> | ||
</html> | ||
); | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
import React, { useState } from 'react'; | ||
import styles from './projects.module.css'; | ||
import projects from '../../shared/projects.json'; | ||
|
||
const ProjectsDisplay = () => { | ||
return ( | ||
<section className={styles.container}> | ||
<header> | ||
<h3 className={styles.heading}>My Projects</h3> | ||
</header> | ||
<div className={styles.projectsWrapper}> | ||
{projects.map((project, index) => ( | ||
<ProjectCard key={index} project={project} /> | ||
))} | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
const ProjectCard = ({ project }) => { | ||
const [showLinks, setShowLinks] = useState(false); | ||
const [showPackages, setShowPackages] = useState(false); | ||
|
||
return ( | ||
<article className={styles.projectCard}> | ||
{/* Project Icon */} | ||
{project.icon && ( | ||
<figure className={styles.iconWrapper}> | ||
<img | ||
src={project.icon} | ||
alt={`${project.name} icon`} | ||
className={styles.icon} | ||
/> | ||
</figure> | ||
)} | ||
|
||
{/* Project Name */} | ||
<h2 className={styles.projectName}>{project.name}</h2> | ||
|
||
{/* Project Description */} | ||
{project.description && ( | ||
<p className={styles.description}>{project.description}</p> | ||
)} | ||
|
||
{/* Links Section */} | ||
<div className={styles.linksSection}> | ||
<button | ||
onClick={() => setShowLinks(!showLinks)} | ||
className={styles.dropdownButton} | ||
> | ||
{showLinks ? 'Hide Links' : 'Show Links'} | ||
</button> | ||
|
||
{showLinks && ( | ||
<div className={styles.linksWrapper}> | ||
{project.github && ( | ||
<p> | ||
<a | ||
href={project.github} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className={styles.link} | ||
> | ||
GitHub Repository | ||
</a> | ||
</p> | ||
)} | ||
{project.deploymentUrl && ( | ||
<p> | ||
<a | ||
href={project.deploymentUrl} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className={styles.link} | ||
> | ||
Deployed Application | ||
</a> | ||
</p> | ||
)} | ||
{project.apiUrl && ( | ||
<p> | ||
<a | ||
href={project.apiUrl} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className={styles.link} | ||
> | ||
API Documentation | ||
</a> | ||
</p> | ||
)} | ||
</div> | ||
)} | ||
</div> | ||
|
||
{/* Package Links */} | ||
{project.packageLinks && project.packageLinks.length > 0 && ( | ||
<div className={styles.packagesSection}> | ||
<button | ||
onClick={() => setShowPackages(!showPackages)} | ||
className={styles.dropdownButton} | ||
> | ||
{showPackages ? 'Hide Packages' : 'Show Packages'} | ||
</button> | ||
|
||
{showPackages && ( | ||
<section> | ||
<ul className={styles.packageList}> | ||
{project.packageLinks.map((link, idx) => ( | ||
<li key={idx}> | ||
<a | ||
href={link} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className={styles.link} | ||
> | ||
{link} | ||
</a> | ||
</li> | ||
))} | ||
</ul> | ||
</section> | ||
)} | ||
</div> | ||
)} | ||
</article> | ||
); | ||
}; | ||
|
||
export default ProjectsDisplay; |
Oops, something went wrong.