diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js index 15e8a2e3a..742898891 100644 --- a/public/react/src/modules/courses/ListPageIndex.js +++ b/public/react/src/modules/courses/ListPageIndex.js @@ -12,10 +12,6 @@ const CommonWork = Loadable({ loader: () => import('./busyWork/commonWork'), loading: Loading, }) -const GroupWork = Loadable({ - loader: () => import('./busyWork/commonWork'), - loading: Loading, -}) // 讨论 const Boards = Loadable({ loader: () => import('./boards'), diff --git a/public/react/src/modules/home/index.jsx b/public/react/src/modules/home/index.jsx index d44a4bcbc..7c34c0ba1 100644 --- a/public/react/src/modules/home/index.jsx +++ b/public/react/src/modules/home/index.jsx @@ -7,8 +7,12 @@ import TPMIndexHOC from '../tpm/TPMIndexHOC' import ListContainer from './list-container' import { SnackbarHOC, getImageUrl, configShareForIndex } from 'educoder' import ShixunPathCard from '../paths/ShixunPathCard' +import { Carousel } from 'antd' +import { getUrl } from 'educoder' +import './index.less' +import NavList from './nav-list' -function Home({ mygetHelmetapi }) { +function Home({ mygetHelmetapi, user }) { const [resource, setResource] = useState({ loading: true, @@ -56,12 +60,22 @@ function Home({ mygetHelmetapi }) { } const { loading, updata, data } = resource - const { shixuns, subjects } = data + const { shixuns, subjects, images_url, reps } = data return ( {loading ? :
+
+
+ + {images_url.map(item => + banner + )} + +
+ {user && user.main_site ? : null} +
{updata ? : null} {pathstype || subjects.length > 0 ? diff --git a/public/react/src/modules/home/index.less b/public/react/src/modules/home/index.less new file mode 100644 index 000000000..a319bac39 --- /dev/null +++ b/public/react/src/modules/home/index.less @@ -0,0 +1,57 @@ +.carousel-container { + margin: 30px auto 60px auto; + + img { + display: block; + max-width: 100%; + height: 350px; + } + + .slick-slide { + background: #364d79; + border-radius: 10px; + } + + a { + display: block; + } +} + +.nav-list-container { + position: relative; + margin: 0 auto; +} + +.black_nav_list li span a { + color: #fff; +} + +.black_nav_list li span a:hover { + color: #000; +} + +.black_nav_list li:hover span a { + color: #000; +} + +.black_nav_span { + display: block; + margin: 0px 20px; + border-bottom: 1px solid #4B4B4B; + padding-left: 8px; + color: #FAFAFA; +} + +.user_navlist_white a { + color: #989898 !important; +} + +.user_navlist_white .navlistpanel-line .little-titles a { + color: #000 !important; +} + + +.user_navlist_white { + max-height: 350px !important; + overflow-y: auto; +} \ No newline at end of file diff --git a/public/react/src/modules/home/nav-list.jsx b/public/react/src/modules/home/nav-list.jsx new file mode 100644 index 000000000..93bf0daf1 --- /dev/null +++ b/public/react/src/modules/home/nav-list.jsx @@ -0,0 +1,44 @@ +import React from 'react' +import { Link } from 'react-router-dom' +import { getImageUrl } from 'educoder' + +export default ({ list }) => { + return ( +
+
+
    + {list.map(item => +
  • + + + {item.name} + + + +
      + { + item.sub_repertoires.map((i) => { + return ( +
      +
      + {i.name} +
      + { + i.tags.map((t, e) => { + return ( + {t.name} + ) + }) + } +
      + ) + }) + } +
    +
  • + )} +
+
+
+ ) +} \ No newline at end of file diff --git a/public/react/src/modules/home/shixunsHome.js b/public/react/src/modules/home/shixunsHome.js index bdb3a1f74..fef8c46a1 100644 --- a/public/react/src/modules/home/shixunsHome.js +++ b/public/react/src/modules/home/shixunsHome.js @@ -168,57 +168,58 @@ class ShixunsHome extends Component { ))} } - {this.props.user && this.props.user.main_site === true ?
-
-
    - {homedatalist === undefined ? "" : homedatalistreps.map((item, key) => { - return ( -
  • - - - {item.name} - - - -
      - { - item.sub_repertoires.map((i, k) => { - return ( -
      -
      - - {i.name} - + {this.props.user && this.props.user.main_site === true ? +
      +
      +
        + {homedatalist === undefined ? "" : homedatalistreps.map((item, key) => { + return ( +
      • + + + {item.name} + + + +
          + { + item.sub_repertoires.map((i, k) => { + return ( +
          +
          + + {i.name} + +
          + { + i.tags.map((t, e) => { + return ( + {t.name} + ) + }) + } +
          - { - i.tags.map((t, e) => { - return ( - {t.name} - ) - }) - } - -
      - - ) - }) - } -
    -
  • - ) - }) - - } -
-
-
: ""} + + ) + }) + } + + + ) + }) + + } + +
+ : ""}