Skip to content

Commit 5abac7c

Browse files
committed
added target blank to navbar
1 parent e99308d commit 5abac7c

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

src/components/Navbar.jsx

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const GlobeIcon = () => (
2929
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1} stroke="currentColor" className='w-10 h-10 stroke-gray-100'>
3030
<path strokeLinecap="round" strokeLinejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" />
3131
</svg>
32-
3332
)
3433

3534
export default function Navbar() {
@@ -56,12 +55,16 @@ export default function Navbar() {
5655
document.title = t('app_title')
5756
}, [currentLanguage, t])
5857

59-
const navigation = [
58+
const navigationBlank = [
6059
{ name: 'Github', href: 'https://github.com/Jertt', current: false },
61-
{ name: 'Instagram', href: '/', current: false },
60+
{ name: 'Instagram', href: 'https://www.instagram.com/jeartt.th/', current: false },
6261
{ name: t('Projects'), href: 'https://jertt.dev', current: false },
6362
{ name: t('Portfolio'), href: 'https://jertt.dev', current: false },
6463
]
64+
// const navigation = [
65+
// { name: t('Projects'), href: 'https://jertt.dev', current: false },
66+
// { name: t('Portfolio'), href: 'https://jertt.dev', current: false },
67+
// ]
6568

6669
return (
6770
<Disclosure as="nav" className="bg-gray-800">
@@ -95,10 +98,11 @@ export default function Navbar() {
9598
</div>
9699
<div className="hidden sm:block sm:ml-6">
97100
<div className="flex space-x-4">
98-
{navigation.map((item) => (
101+
{navigationBlank.map((item) => (
99102
<a
100103
key={item.name}
101104
href={item.href}
105+
target="_blank" rel="noreferrer noopener"
102106
className={classNames(
103107
item.current ? 'bg-gray-900 text-white' : 'text-gray-300 hover:bg-gray-700 hover:text-white',
104108
'px-3 py-2 rounded-md text-sm font-medium'
@@ -108,6 +112,19 @@ export default function Navbar() {
108112
{item.name}
109113
</a>
110114
))}
115+
{/* {navigation.map((item) => (
116+
<a
117+
key={item.name}
118+
href={item.href}
119+
className={classNames(
120+
item.current ? 'bg-gray-900 text-white' : 'text-gray-300 hover:bg-gray-700 hover:text-white',
121+
'px-3 py-2 rounded-md text-sm font-medium'
122+
)}
123+
aria-current={item.current ? 'page' : undefined}
124+
>
125+
{item.name}
126+
</a>
127+
))} */}
111128
</div>
112129
</div>
113130
</div>
@@ -164,7 +181,7 @@ export default function Navbar() {
164181

165182
<Disclosure.Panel className="sm:hidden">
166183
<div className="px-2 pt-2 pb-3 space-y-1">
167-
{navigation.map((item) => (
184+
{navigationBlank.map((item) => (
168185
<Disclosure.Button
169186
key={item.name}
170187
as="a"

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import React, { Suspense } from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
44
// imports needed for i18next
5+
import App from './App'
56
import i18n from "i18next";
67
import { initReactI18next } from "react-i18next";
78
import LanguageDetector from 'i18next-browser-languagedetector';
89
import HttpApi from 'i18next-http-backend'
9-
import App from './App'
1010
import "/node_modules/flag-icons/css/flag-icons.min.css";
1111
// import "../../node_modules/flag-icons/css/flag-icons.min.css"
1212

0 commit comments

Comments
 (0)