This commit is contained in:
2024-10-08 19:08:37 +08:00
parent b844c2a509
commit 98c1a28dfb
29 changed files with 156 additions and 39 deletions

View File

@@ -3,6 +3,7 @@ import ResponsiveNav from "@/components/Navbar/ResponsiveNav";
import { fetchCourses, fetchSettings, fetchAboutus } from "@/utils";
import {AboutusProps } from "@/types";
import Home from '@/components/Aboutus/Home';
async function getCourses() {
const courses = await fetchCourses();
return courses;
@@ -31,6 +32,7 @@ export default async function Page() {
return (
<div className='bg-[#F6E8E9]'>
<ResponsiveNav courses={courses} settings={settings} />
<Home settings={settings} aboutus={aboutus} />

View File

@@ -1,6 +0,0 @@
module.exports = {
colors:{
},
api_link: "http://localhost/api/v1/",
}

View File

@@ -2,6 +2,7 @@ import React from 'react'
import ResponsiveNav from "@/components/Navbar/ResponsiveNav";
import { fetchCourses, fetchCourse, fetchSettings } from "@/utils";
import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(() => import('@/components/Course/Course'), {
ssr: false,
})
@@ -19,10 +20,6 @@ async function getSettings() {
return settings;
}
export const metadata = {
title: "All In One",
description: "**",
}
export default async function Page({ params }: { params: { slug: string } }) {
const courses = await getCourses();
@@ -34,6 +31,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
}
return (
<div className='bg-[#F6E8E8]'>
<ResponsiveNav courses={courses} settings={settings} />
<DynamicComponent course={course} settings={settings} />
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -15,6 +15,20 @@
.mainColor{
color: #D60050;
}
.navigation-loader {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
background: #0006;
color: #fff;
font-size: 18px;
font-weight: 700;
}
.dots {
li{

View File

@@ -1,6 +1,8 @@
import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";
import Head from 'next/head';
import NextTopLoader from 'nextjs-toploader';
import { Toaster } from "react-hot-toast";
const geistSans = localFont({
src: "./fonts/GeistVF.woff",
@@ -13,9 +15,31 @@ const geistMono = localFont({
weight: "100 900",
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "All And One Music",
description: "發掘你的音樂之路",
icons: [
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
url: '/favicon/favicon-32x32.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '16x16',
url: '/favicon/favicon-16x16.png',
},
{
rel: 'apple-touch-icon',
sizes: '180x180',
url: '/favicon/apple-touch-icon.png',
},
],
};
export default function RootLayout({
@@ -26,9 +50,12 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased bg-[#F6E5E9]`}
>
<link rel="icon" href="/favicon.ico" sizes="any" />
<NextTopLoader color="#D60050" height={5} />
<Toaster position="bottom-center" />
{children}

View File

@@ -1,21 +1,24 @@
import Home from "../components/Home/Home";
import { fetchCourses, fetchSettings} from "../utils/index";
import { fetchCourses, fetchSettings } from "../utils/index";
import ResponsiveNav from "../components/Navbar/ResponsiveNav";
import Head from "next/head";
async function getCourses() {
const courses = await fetchCourses();
return courses;
}
async function getSettings(){
async function getSettings() {
const settings = await fetchSettings();
return settings;
}
export const metadata = {
title: "All In One",
title: "All And One Music",
description: "**",
icons: {
icon: '/favicon.ico',
},
}
export default async function HomePage() {
@@ -23,7 +26,9 @@ export default async function HomePage() {
const settings = await getSettings();
return (
<div>
<ResponsiveNav courses={courses} settings={settings} />
<link rel="icon" href="/favicon.ico" />
<ResponsiveNav courses={courses} settings={settings} />
<Home courses={courses} settings={settings} />
</div>
);