parent
5bcd80db42
commit
422c0a7cae
@ -1,8 +1,12 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
|
|
||||||
|
const basePath = '/html';
|
||||||
|
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
output: 'export',
|
output: 'export',
|
||||||
distDir: 'html',
|
distDir: 'html',
|
||||||
basePath: '/html',
|
basePath,
|
||||||
|
env: { basePath },
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
@ -1,11 +1,23 @@
|
|||||||
import Image from 'next/image';
|
import ImageWithBasePath from '@/components/ImageWithBasePath';
|
||||||
|
|
||||||
export default function AppLogo(props: { className?: string }) {
|
export default function AppLogo(props: { className?: string }) {
|
||||||
const cls = props.className || '';
|
const cls = props.className || '';
|
||||||
return (
|
return (
|
||||||
<div className={`flex flex-col items-center ${cls}`}>
|
<div className={`flex flex-col items-center ${cls}`}>
|
||||||
<Image className="w-[90px] h-[90px]" width={90} height={90} src="img/app_icon_white_bg.svg" alt="queyue" />
|
<ImageWithBasePath
|
||||||
<Image className="w-[122px] h-[24px] mt-[20px]" width={122} height={24} src="img/slogn.svg" alt="独立 不独于世" />
|
className="w-[90px] h-[90px]"
|
||||||
|
width={90}
|
||||||
|
height={90}
|
||||||
|
src="img/app_icon_white_bg.svg"
|
||||||
|
alt="queyue"
|
||||||
|
/>
|
||||||
|
<ImageWithBasePath
|
||||||
|
className="w-[122px] h-[24px] mt-[20px]"
|
||||||
|
width={122}
|
||||||
|
height={24}
|
||||||
|
src="img/slogn.svg"
|
||||||
|
alt="独立 不独于世"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
import Image from 'next/image';
|
||||||
|
|
||||||
|
export default function ImageWithBasePath(props: any) {
|
||||||
|
const imgSrc = process.env.NODE_ENV === 'development' ? `${process.env.basePath}/${props?.src || ''}` : props?.src;
|
||||||
|
return <Image {...props} src={imgSrc} alt={props?.alt} />;
|
||||||
|
}
|
Loading…
Reference in new issue