's'
This commit is contained in:
@@ -85,6 +85,7 @@ export default memo(function SiteMenu({
|
||||
{
|
||||
titleKey: "other",
|
||||
items: [
|
||||
{ labelKey: "digitalNomadGuide", href: "https://digital.hackrobot.cn/", icon: "📖" },
|
||||
{ labelKey: "remoteJobs", href: "#", icon: "💼" },
|
||||
{ labelKey: "coworking", href: "#", icon: "🏢" },
|
||||
],
|
||||
@@ -134,17 +135,42 @@ export default memo(function SiteMenu({
|
||||
{t(section.titleKey)}
|
||||
</h3>
|
||||
<ul className="space-y-1">
|
||||
{section.items.map((item) => (
|
||||
{section.items.map((item) => {
|
||||
const isExternal = item.href.startsWith("http");
|
||||
const linkClass = `flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-colors ${
|
||||
item.href !== "#" && !isExternal && (pathname === item.href || (item.href !== "/" && pathname.startsWith(item.href)))
|
||||
? "bg-[#ff4d4f]/10 text-[#ff4d4f]"
|
||||
: "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"
|
||||
}`;
|
||||
return (
|
||||
<li key={item.labelKey}>
|
||||
<Link
|
||||
href={item.href}
|
||||
onClick={onClose}
|
||||
className={`flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-colors ${
|
||||
item.href !== "#" && (pathname === item.href || (item.href !== "/" && pathname.startsWith(item.href)))
|
||||
? "bg-[#ff4d4f]/10 text-[#ff4d4f]"
|
||||
: "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"
|
||||
}`}
|
||||
>
|
||||
{isExternal ? (
|
||||
<a
|
||||
href={item.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={onClose}
|
||||
className={linkClass}
|
||||
>
|
||||
<span className="w-5 text-center">{item.icon}</span>
|
||||
<span className="flex-1">{t(item.labelKey)}</span>
|
||||
{item.new && (
|
||||
<span className="px-2 py-0.5 rounded-full bg-[#ff4d4f] text-white text-[10px] font-medium">
|
||||
NEW
|
||||
</span>
|
||||
)}
|
||||
{item.ad && (
|
||||
<span className="px-2 py-0.5 rounded bg-gray-200 dark:bg-gray-700 text-[10px] text-gray-500">
|
||||
Ad
|
||||
</span>
|
||||
)}
|
||||
</a>
|
||||
) : (
|
||||
<Link
|
||||
href={item.href}
|
||||
onClick={onClose}
|
||||
className={linkClass}
|
||||
>
|
||||
<span className="w-5 text-center">{item.icon}</span>
|
||||
<span className="flex-1">{t(item.labelKey)}</span>
|
||||
{item.new && (
|
||||
@@ -158,8 +184,10 @@ export default memo(function SiteMenu({
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -17,7 +17,7 @@ export const FOOTER_SECTIONS: FooterSection[] = [
|
||||
titleKey: "about",
|
||||
links: [
|
||||
{ href: "/about", labelKey: "aboutUs" },
|
||||
{ href: "/blog", labelKey: "blog" },
|
||||
{ href: "https://digital.hackrobot.cn/", labelKey: "digitalNomadGuide" },
|
||||
{ href: "/careers", labelKey: "careers" },
|
||||
{ href: "/press", labelKey: "press" },
|
||||
],
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
"terms": "TOS & Privacy",
|
||||
"changelog": "Changelog",
|
||||
"remoteJobs": "Remote Jobs",
|
||||
"coworking": "Coworking"
|
||||
"coworking": "Coworking",
|
||||
"digitalNomadGuide": "Digital Nomad Guide"
|
||||
},
|
||||
"nav": {
|
||||
"cities": "Cities",
|
||||
@@ -193,7 +194,7 @@
|
||||
"report": "Nomad Report",
|
||||
"faq": "FAQ",
|
||||
"aboutUs": "About Us",
|
||||
"blog": "Blog",
|
||||
"digitalNomadGuide": "Digital Nomad Guide",
|
||||
"careers": "Careers",
|
||||
"press": "Press",
|
||||
"support": "Support",
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
"terms": "条款与隐私",
|
||||
"changelog": "更新日志",
|
||||
"remoteJobs": "远程工作",
|
||||
"coworking": "共享办公"
|
||||
"coworking": "共享办公",
|
||||
"digitalNomadGuide": "数字游民指南"
|
||||
},
|
||||
"nav": {
|
||||
"cities": "城市",
|
||||
@@ -193,7 +194,7 @@
|
||||
"report": "Nomad 年报",
|
||||
"faq": "常见问题",
|
||||
"aboutUs": "关于我们",
|
||||
"blog": "博客",
|
||||
"digitalNomadGuide": "数字游民指南",
|
||||
"careers": "加入我们",
|
||||
"press": "媒体报道",
|
||||
"support": "支持",
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
allowedDevOrigins: [
|
||||
"localhost",
|
||||
"localhost:3000",
|
||||
"127.0.0.1",
|
||||
"127.0.0.1:3000",
|
||||
"172.27.128.1",
|
||||
"172.27.128.1:3000",
|
||||
"192.168.41.222",
|
||||
"192.168.41.222:3000",
|
||||
"http://localhost:3000",
|
||||
"http://127.0.0.1:3000",
|
||||
"http://172.27.128.1:3000",
|
||||
"http://192.168.41.222:3000",
|
||||
],
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"dev": "next dev -H 0.0.0.0",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint"
|
||||
|
||||
Reference in New Issue
Block a user