Skip to content

Commit

Permalink
feature/whatsapp and readjust structure folder (#11)
Browse files Browse the repository at this point in the history
* refactor: remove unused components

* refactor: remove favicon ico useless

* refactor: change go public robot txt false setting

* refactor: update favicon ico

* feat: default seo configuration

* feat: whatsapp chat at footer
  • Loading branch information
roby2409 committed Apr 1, 2024
1 parent 3892a93 commit b26abde
Show file tree
Hide file tree
Showing 31 changed files with 165 additions and 158 deletions.
31 changes: 31 additions & 0 deletions next-seo.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { DefaultSeoProps } from "next-seo";

const config: DefaultSeoProps = {
description: 'Software Developer and Frontend Enthusiast that deliver user-centric interfaces for web and mobile applications that exceed client expectations',
defaultTitle: 'Roby Setiawan (Software Developer and Frontend Enthusiast)',
canonical: 'https://robysetiawan.vercel.app',
additionalLinkTags: [
{
rel: 'icon',
href: 'https://robysetiawan.vercel.app/favicon.ico'
}
],
openGraph: {
type: 'website',
locale: 'en_US',
url: 'https://robysetiawan.vercel.app',
title: 'Roby Setiawan (Software Developer and Frontend Enthusiast)',
siteName: 'Roby Setiawan (Software Developer and Frontend Enthusiast)',
description: 'Software Developer and Frontend Enthusiast that deliver user-centric interfaces for web and mobile applications that exceed client expectations',
images: [
{
url: 'https://robysetiawan.vercel.app/static/home-image-preview.jpg',
alt: 'Islem Maboud Portfolio',
type: 'image/jpg',
secureUrl: 'https://robysetiawan.vercel.app/static/home-image-preview.jpg'
}
]
}
}

export default config;
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/favicons/mstile-150x150.png"/>
<TileColor>#ffffff</TileColor>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
Binary file removed public/favicons/android-chrome-192x192.png
Binary file not shown.
Binary file removed public/favicons/android-chrome-384x384.png
Binary file not shown.
Binary file removed public/favicons/apple-touch-icon.png
Binary file not shown.
Binary file removed public/favicons/favicon-16x16.png
Binary file not shown.
Binary file removed public/favicons/favicon-32x32.png
Binary file not shown.
Binary file removed public/favicons/favicon.ico
Binary file not shown.
Binary file removed public/favicons/mstile-150x150.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/favicons/safari-pinned-tab.svg

This file was deleted.

Binary file removed public/images/favicon.ico
Binary file not shown.
Binary file added public/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# As soon as you are ready to go public, change the `Disallow: /` to `Allow: /`
User-agent: *
Disallow: /
Allow: /
44 changes: 44 additions & 0 deletions public/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions public/favicons/site.webmanifest → public/site.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"short_name": "",
"icons": [
{
"src": "/favicons/android-chrome-192x192.png",
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-384x384.png",
"sizes": "384x384",
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
Expand Down
Binary file added public/static/home-image-preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
126 changes: 74 additions & 52 deletions src/components/modules/sections/FooterSection.tsx
Original file line number Diff line number Diff line change
@@ -1,60 +1,82 @@
import Link from 'next/link';
import React from 'react';
import { FaRegCopyright } from 'react-icons/fa6';
import { FaRegCopyright, FaWhatsapp } from 'react-icons/fa6';

export default function FooterSection() {
const handleClick = async () => {
// Check if WhatApp installed, if yes open whatsapp else open whatsapp web
const teks =
'&text=Halo+Roby%2C%0ASaya+ingin+diskusi+untuk+tahu+lebih+lanjut+tentang+tentang+anda&type=phone_number&app_absent=0';
if (navigator.userAgent.includes('WhatsApp')) {
// WhatsApp is installed
window.open(`whatsapp://send?phone=6281273067776${teks}`);
} else {
// WhatsApp is not installed, open WhatsApp Web
window.open(`https://web.whatsapp.com/send?phone=6281273067776${teks}`, '_blank');
}
};

return (
<footer className="border-color flex w-full flex-col items-center justify-between border-t py-10 text-sm sm:flex-row dark:text-gray-100">
<div className="mb-6 flex gap-3 sm:mb-0">
<Link
href="/"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/me
</Link>
<Link
href="/about"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/about
</Link>
<Link
href="/projects"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/projects
</Link>
<Link
href="/stories"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/stories
</Link>
<Link
href="/blog"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/blog
</Link>
<Link
href="/uses"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/uses
</Link>
</div>
<div className="flex items-center space-x-1">
<FaRegCopyright />
<span className="text-gray-600 dark:text-gray-300">
{new Date().getFullYear()} by Roby Setiawan
</span>
<>
<div
className="fixed bottom-10 right-4 w-min cursor-pointer
rounded-full bg-green-600 p-2 md:right-8"
onClick={handleClick}
>
<FaWhatsapp color="white" className="h-7 w-7 md:h-10 md:w-10" />
</div>
</footer>
<footer className="border-color flex w-full flex-col items-center justify-between border-t py-10 text-sm sm:flex-row dark:text-gray-100">
<div className="mb-6 flex gap-3 sm:mb-0">
<Link
href="/"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/me
</Link>
<Link
href="/about"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/about
</Link>
<Link
href="/projects"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/projects
</Link>
<Link
href="/stories"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/stories
</Link>
<Link
href="/blog"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/blog
</Link>
<Link
href="/uses"
className="no-underline underline-offset-2 transition-colors hover:text-gray-800 hover:underline dark:hover:text-gray-100"
rel="noopener noreferrer"
>
/uses
</Link>
</div>
<div className="flex items-center space-x-1">
<FaRegCopyright />
<span className="text-gray-600 dark:text-gray-300">
{new Date().getFullYear()} by Roby Setiawan
</span>
</div>
</footer>
</>
);
}
28 changes: 0 additions & 28 deletions src/components/modules/templates/footer/footer.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/modules/templates/footer/index.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/components/modules/templates/header/header.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/modules/templates/header/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/components/modules/templates/layout/index.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/components/modules/templates/layout/layout.tsx

This file was deleted.

3 changes: 3 additions & 0 deletions src/pages/_app.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Router } from 'next/router';
import NProgress from 'nprogress';
import '@src/styles/globals.css';
import { ThemeProvider } from '@src/context/ThemeContext';
import config from 'next-seo.config';
import { DefaultSeo } from 'next-seo';

Router.events.on('routeChangeStart', () => NProgress.start());
Router.events.on('routeChangeComplete', () => NProgress.done());
Expand All @@ -13,6 +15,7 @@ function MyApp({ Component, pageProps }: AppProps) {
return (
<ThemeProvider>
<main>
<DefaultSeo {...config} />
<Component {...pageProps} />
<SpeedInsights />
</main>
Expand Down
14 changes: 7 additions & 7 deletions src/pages/_document.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ export default function Document() {
return (
<Html lang="en">
<Head>
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png" />
<link rel="manifest" href="/favicons/site.webmanifest" />
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#5bbad5" />
<link rel="shortcut icon" href="/favicons/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-config" content="/favicons/browserconfig.xml" />
<meta name="msapplication-config" content="/browserconfig.xml" />
<meta name="theme-color" content="#ffffff" />
<meta name="google-site-verification" content={googleSiteVerification} />
</Head>
Expand Down

0 comments on commit b26abde

Please sign in to comment.