Merge branch 'main' of http://113.45.157.195:3003/insiinc/re-mooc
This commit is contained in:
commit
98c58fd9c3
|
@ -2,7 +2,6 @@ import HeroSection from './components/HeroSection';
|
|||
import CategorySection from './components/CategorySection';
|
||||
import CoursesSection from './components/CoursesSection';
|
||||
import FeaturedTeachersSection from './components/FeaturedTeachersSection';
|
||||
|
||||
const HomePage = () => {
|
||||
const mockCourses = [
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@ const { Content } = Layout;
|
|||
export function MainLayout() {
|
||||
return (
|
||||
<Layout className="min-h-screen">
|
||||
|
||||
<MainHeader />
|
||||
<Content className="mt-16 bg-gray-50">
|
||||
<Outlet />
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import MindEditor from "@web/src/components/common/editor/MindEditor";
|
||||
import MindElixir, { MindElixirInstance } from "mind-elixir";
|
||||
import { useEffect, useRef } from "react";
|
||||
export default function PathsPage() {
|
||||
return <>paths</>
|
||||
return <MindEditor></MindEditor>
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
import { MindElixirInstance } from "packages/mind-elixir-core/dist/types";
|
||||
import { useRef, useEffect } from "react";
|
||||
import MindElixir from 'mind-elixir';
|
||||
|
||||
export default function MindEditor() {
|
||||
const me = useRef<MindElixirInstance>();
|
||||
useEffect(() => {
|
||||
const instance = new MindElixir({
|
||||
el: "#map",
|
||||
direction: MindElixir.SIDE,
|
||||
draggable: true, // default true
|
||||
contextMenu: true, // default true
|
||||
toolBar: true, // default true
|
||||
nodeMenu: true, // default true
|
||||
keypress: true // default true
|
||||
|
||||
});
|
||||
// instance.install(NodeMenu);
|
||||
instance.init(MindElixir.new("新主题"));
|
||||
me.current = instance;
|
||||
}, []);
|
||||
return <div >
|
||||
<div>
|
||||
1
|
||||
</div>
|
||||
<div id="map" style={{ width: "100%" }} />
|
||||
</div>
|
||||
}
|
|
@ -124,3 +124,8 @@
|
|||
border-bottom: none;
|
||||
/* 去除最后一行的底部边框 */
|
||||
}
|
||||
|
||||
#map {
|
||||
height: 600px;
|
||||
width: 100%;
|
||||
}
|
|
@ -4,15 +4,9 @@ import {
|
|||
Link,
|
||||
NonIndexRouteObject,
|
||||
} from "react-router-dom";
|
||||
import { RolePerms } from "@nice/common";
|
||||
import ErrorPage from "../app/error";
|
||||
import DepartmentAdminPage from "../app/admin/department/page";
|
||||
import TermAdminPage from "../app/admin/term/page";
|
||||
import StaffAdminPage from "../app/admin/staff/page";
|
||||
import RoleAdminPage from "../app/admin/role/page";
|
||||
import WithAuth from "../components/utils/with-auth";
|
||||
import LoginPage from "../app/login";
|
||||
import BaseSettingPage from "../app/admin/base-setting/page";
|
||||
import StudentCoursesPage from "../app/main/courses/student/page";
|
||||
import InstructorCoursesPage from "../app/main/courses/instructor/page";
|
||||
import HomePage from "../app/main/home/page";
|
||||
|
@ -24,8 +18,8 @@ import CourseSettingForm from "../components/models/course/editor/form/CourseSet
|
|||
import CourseEditorLayout from "../components/models/course/editor/layout/CourseEditorLayout";
|
||||
import { MainLayout } from "../app/main/layout/MainLayout";
|
||||
import CoursesPage from "../app/main/courses/page";
|
||||
import PathsPage from "../app/main/paths/page";
|
||||
import { adminRoute } from "./admin-route";
|
||||
|
||||
interface CustomIndexRouteObject extends IndexRouteObject {
|
||||
name?: string;
|
||||
breadcrumb?: string;
|
||||
|
@ -62,6 +56,11 @@ export const routes: CustomRouteObject[] = [
|
|||
{
|
||||
index: true,
|
||||
element: <HomePage />,
|
||||
|
||||
},
|
||||
{
|
||||
path: "paths",
|
||||
element: <PathsPage></PathsPage>
|
||||
},
|
||||
{
|
||||
path: "courses",
|
||||
|
|
|
@ -12,7 +12,6 @@ events {
|
|||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main
|
||||
'$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
|
|
Loading…
Reference in New Issue