27 lines
1.8 KiB
JavaScript
27 lines
1.8 KiB
JavaScript
/**
|
|
* 기본 네비게이션 항목 반환
|
|
* @returns {Array<Object>} 기본 네비게이션 항목
|
|
*/
|
|
export const getDefaultNavigationItems = () => [
|
|
{ id: 'default-primary-home', label: 'Home pages', url: '/', location: 'primary', sortOrder: 10, isVisible: true },
|
|
{ id: 'default-primary-tags', label: 'Tags', url: '/tags', location: 'primary', sortOrder: 20, isVisible: true },
|
|
{ id: 'default-primary-authors', label: 'Authors', url: '/pages/about', location: 'primary', sortOrder: 30, isVisible: true },
|
|
{ id: 'default-primary-style', label: 'Style', url: '/post/hello-sori-studio', location: 'primary', sortOrder: 40, isVisible: true },
|
|
{ id: 'default-primary-post-types', label: 'Post types', url: '/post/custom-writing-tool', location: 'primary', sortOrder: 50, isVisible: true },
|
|
{ id: 'default-primary-members', label: 'Members', url: '/pages/contact', location: 'primary', sortOrder: 60, isVisible: true },
|
|
{ id: 'default-primary-landing', label: 'Landing pages', url: '/pages/projects', location: 'primary', sortOrder: 70, isVisible: true },
|
|
{ id: 'default-footer-portal', label: 'Portal', url: '/pages/links', location: 'footer', sortOrder: 10, isVisible: true },
|
|
{ id: 'default-footer-docs', label: 'Docs', url: '/pages/about', location: 'footer', sortOrder: 20, isVisible: true },
|
|
{ id: 'default-footer-projects', label: 'Projects', url: '/pages/projects', location: 'footer', sortOrder: 30, isVisible: true }
|
|
]
|
|
|
|
/**
|
|
* 네비게이션 항목을 위치별로 묶기
|
|
* @param {Array<Object>} items - 네비게이션 항목 목록
|
|
* @returns {{primary: Array<Object>, footer: Array<Object>}} 위치별 네비게이션 항목
|
|
*/
|
|
export const groupNavigationItems = (items) => ({
|
|
primary: items.filter((item) => item.location === 'primary'),
|
|
footer: items.filter((item) => item.location === 'footer')
|
|
})
|