updated
This commit is contained in:
@@ -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} />
|
||||
|
||||
|
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
colors:{
|
||||
|
||||
},
|
||||
api_link: "http://localhost/api/v1/",
|
||||
}
|
@@ -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>
|
||||
|
BIN
app/favicon.ico
BIN
app/favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 15 KiB |
@@ -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{
|
||||
|
@@ -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}
|
||||
|
||||
|
15
app/page.tsx
15
app/page.tsx
@@ -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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user