cleanup
This commit is contained in:
parent
4d1b735c8e
commit
37b0244517
@ -1,44 +0,0 @@
|
||||
import { translate } from '@/base/i18n.js'
|
||||
import { I18N_SOURCE_LANGUAGE } from './config.js'
|
||||
import config from "./config.json" with { "type": "json" }
|
||||
import pMap from 'p-map'
|
||||
|
||||
export const items = async (opts: { locale: string }) => {
|
||||
const _T = async (text: string) => await translate(text, I18N_SOURCE_LANGUAGE, opts.locale)
|
||||
return [
|
||||
{
|
||||
"href": `/${opts.locale}`,
|
||||
"title": _T("Home"),
|
||||
"ariaLabel": "Home",
|
||||
"class": "hover:text-orange-600"
|
||||
},
|
||||
{
|
||||
"href": `/${opts.locale}/resources/home`,
|
||||
"title": _T("Resources"),
|
||||
"ariaLabel": "Resources",
|
||||
"class": "hover:text-orange-600"
|
||||
}
|
||||
]
|
||||
}
|
||||
export const footer_left = async (locale: string) => {
|
||||
const _T = async (text: string) => await translate(text, I18N_SOURCE_LANGUAGE, locale)
|
||||
return await pMap(config.footer_left, async (item: any) => {
|
||||
return {
|
||||
"href": `${item.href}`,
|
||||
"title": await _T(item.text),
|
||||
"ariaLabel": item.text,
|
||||
"class": "hover:text-orange-600"
|
||||
}
|
||||
});
|
||||
}
|
||||
export const footer_right = async (locale: string) => {
|
||||
const _T = async (text: string) => await translate(text, I18N_SOURCE_LANGUAGE, locale)
|
||||
return await pMap(config.footer_right, async (item: any) => {
|
||||
return {
|
||||
"href": `/${item.href}`,
|
||||
"title": await _T(item.text),
|
||||
"ariaLabel": item.text,
|
||||
"class": "hover:text-orange-600"
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1,59 +0,0 @@
|
||||
{
|
||||
"main": [
|
||||
{
|
||||
"name": "Home",
|
||||
"url": "/"
|
||||
},
|
||||
{
|
||||
"name": "Products",
|
||||
"url": "/products"
|
||||
},
|
||||
{
|
||||
"name": "Pages",
|
||||
"url": "",
|
||||
"hasChildren": true,
|
||||
"children": [
|
||||
{
|
||||
"name": "About",
|
||||
"url": "/about"
|
||||
},
|
||||
{
|
||||
"name": "Contact",
|
||||
"url": "/contact"
|
||||
},
|
||||
{
|
||||
"name": "404 Page",
|
||||
"url": "/404"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Contact",
|
||||
"url": "/contact"
|
||||
}
|
||||
],
|
||||
"footer": [
|
||||
{
|
||||
"name": "About",
|
||||
"url": "/about"
|
||||
},
|
||||
{
|
||||
"name": "Products",
|
||||
"url": "/products"
|
||||
},
|
||||
{
|
||||
"name": "Contact",
|
||||
"url": "/contact"
|
||||
}
|
||||
],
|
||||
"footerCopyright": [
|
||||
{
|
||||
"name": "Privacy & Policy",
|
||||
"url": "/privacy-policy"
|
||||
},
|
||||
{
|
||||
"name": "Terms of Service",
|
||||
"url": "/terms-services"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
{
|
||||
"main": [
|
||||
{
|
||||
"name": "facebook",
|
||||
"icon": "FaFacebookF",
|
||||
"link": "https://www.facebook.com/themefisher"
|
||||
},
|
||||
{
|
||||
"name": "twitter",
|
||||
"icon": "FaXTwitter",
|
||||
"link": "https://x.com/themefisher"
|
||||
},
|
||||
{
|
||||
"name": "linkedin",
|
||||
"icon": "FaLinkedinIn",
|
||||
"link": "https://bd.linkedin.com/company/themefisher"
|
||||
},
|
||||
{
|
||||
"name": "github",
|
||||
"icon": "FaGithub",
|
||||
"link": "https://github.com/themefisher/astrofront"
|
||||
}
|
||||
]
|
||||
}
|
||||
17
packages/polymech/src/components/containers/Wrapper.astro
Normal file
17
packages/polymech/src/components/containers/Wrapper.astro
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
interface Props {
|
||||
variant?: "standard"; // Define any variants you need
|
||||
class?: string; // Optional prop for additional classes
|
||||
}
|
||||
const { variant = "standard", class: extraClass = "" } = Astro.props;
|
||||
// Map each variant to its specific classes
|
||||
const variantClasses = {
|
||||
standard: "max-w-4xl 2xl:max-w-4xl mx-auto w-full",
|
||||
};
|
||||
// Combine the classes for the specified variant with any extra classes
|
||||
const classes = `${variantClasses[variant]} ${extraClass}`.trim();
|
||||
---
|
||||
|
||||
<div class={classes}>
|
||||
<slot />
|
||||
</div>
|
||||
@ -1,6 +1,6 @@
|
||||
---
|
||||
import Wrapper from "@/components/containers/Wrapper.astro";
|
||||
import { footer_left, footer_right } from "@/app/navigation.js";
|
||||
import { footer_left, footer_right } from "../../app/navigation.js";
|
||||
import { ISO_LANGUAGE_LABELS } from "@polymech/i18n";
|
||||
import { LANGUAGES_PROD, I18N_SOURCE_LANGUAGE } from "config/config.js";
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import Wrapper from "@/components/containers/Wrapper.astro";
|
||||
|
||||
import { I18N_SOURCE_LANGUAGE } from "@/app/config";
|
||||
|
||||
import { items } from "@/app/navigation.js";
|
||||
import { items } from "../../app/navigation.js";
|
||||
|
||||
import ThemeToggle from "./ThemeToggle.astro";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user