Added homepage and moved old homepage to aboutme page
This commit is contained in:
@@ -1,28 +1,58 @@
|
||||
import { getPermalink, getAsset } from './utils/permalinks';
|
||||
import { getTranslation } from './i18n/translations';
|
||||
|
||||
export const headerData = {
|
||||
links: [
|
||||
{
|
||||
text: 'Home',
|
||||
href: getPermalink('/'),
|
||||
},
|
||||
{ text: 'About', href: getPermalink('/en/#about')},
|
||||
{ text: 'Resume', href: getPermalink('/en/#resume') },
|
||||
{ text: 'Certifications', href: getPermalink('/en/#Certifications') },
|
||||
{ text: 'Skills', href: getPermalink('/en/#skills') },
|
||||
{ text: 'Blog', href: getPermalink('/blog') },
|
||||
]
|
||||
export const getHeaderData = (lang = 'en') => {
|
||||
const t = getTranslation(lang);
|
||||
|
||||
// For hash links on the homepage, we need special handling
|
||||
const homeHashLink = (hash) => {
|
||||
// Create an absolute path to the homepage with the language prefix
|
||||
// and then append the hash
|
||||
return getPermalink('/', 'page', lang) + hash;
|
||||
};
|
||||
|
||||
return {
|
||||
links: [
|
||||
{
|
||||
text: t.navigation.home,
|
||||
href: getPermalink('/', 'page', lang),
|
||||
},
|
||||
{
|
||||
text: t.homepage?.services?.tagline || 'Services',
|
||||
href: homeHashLink('#services'),
|
||||
},
|
||||
{ text: t.homepage?.contact?.title || 'Contact', href: homeHashLink('#contact') },
|
||||
{
|
||||
text: t.metadata?.aboutUs || 'About Me',
|
||||
links: [
|
||||
{ text: t.navigation.about, href: getPermalink('/aboutme', 'page', lang), isHashLink: false },
|
||||
{ text: t.navigation.resume, href: getPermalink('/aboutme', 'page', lang) + '#resume', isHashLink: true },
|
||||
{ text: t.navigation.certifications, href: getPermalink('/aboutme', 'page', lang) + '#certifications', isHashLink: true },
|
||||
{ text: t.navigation.skills, href: getPermalink('/aboutme', 'page', lang) + '#skills', isHashLink: true },
|
||||
{ text: t.navigation.education, href: getPermalink('/aboutme', 'page', lang) + '#education', isHashLink: true },
|
||||
]
|
||||
},
|
||||
{ text: t.navigation.blog, href: getPermalink('/blog', 'page', lang) },
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
export const footerData = {
|
||||
// For backward compatibility
|
||||
export const headerData = getHeaderData();
|
||||
|
||||
secondaryLinks: [
|
||||
{ text: 'Terms', href: getPermalink('/terms') },
|
||||
{ text: 'Privacy Policy', href: getPermalink('/privacy') },
|
||||
],
|
||||
socialLinks: [
|
||||
{ ariaLabel: 'LinkedIn', icon: 'tabler:brand-linkedin', href: 'https://www.linkedin.com/in/rrpbergsma' },
|
||||
{ ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/rrpbergsma' },
|
||||
{ ariaLabel: 'RSS', icon: 'tabler:rss', href: getAsset('/rss.xml') },
|
||||
],
|
||||
export const getFooterData = (lang = 'en') => {
|
||||
return {
|
||||
secondaryLinks: [
|
||||
{ text: 'Terms', href: getPermalink('/terms', 'page', lang) },
|
||||
{ text: 'Privacy Policy', href: getPermalink('/privacy', 'page', lang) },
|
||||
],
|
||||
socialLinks: [
|
||||
{ ariaLabel: 'LinkedIn', icon: 'tabler:brand-linkedin', href: 'https://www.linkedin.com/in/rrpbergsma' },
|
||||
{ ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/rrpbergsma' },
|
||||
{ ariaLabel: 'RSS', icon: 'tabler:rss', href: getAsset('/rss.xml') },
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
// For backward compatibility
|
||||
export const footerData = getFooterData();
|
||||
|
Reference in New Issue
Block a user