CourseNew.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { Col, Row } from "antd";
  2. import { Link } from "react-router";
  3. import img_book from "../../assets/library/images/teachers.svg";
  4. import CourseNewList from "./CourseNewList";
  5. import { useIntl } from "react-intl";
  6. const CourseNewWidget = () => {
  7. const intl = useIntl(); //i18n
  8. return (
  9. <Row
  10. style={{
  11. backgroundColor: "#313131",
  12. minHeight: 200,
  13. }}
  14. >
  15. <Col flex="auto"></Col>
  16. <Col
  17. flex="960px"
  18. style={{
  19. display: "flex",
  20. backgroundImage: `url(${img_book})`,
  21. backgroundRepeat: "no-repeat",
  22. backgroundPositionX: "right",
  23. }}
  24. >
  25. <div style={{ flex: 9 }}>
  26. <CourseNewList />
  27. </div>
  28. <div style={{ flex: 4, margin: "2em" }}>
  29. <span style={{ fontSize: "250%", fontWeight: 700, color: "white" }}>
  30. 课程
  31. </span>
  32. <span style={{ position: "absolute", right: 30, bottom: 0 }}>
  33. <Link to="course/list">
  34. {intl.formatMessage({ id: "buttons.more" })}
  35. </Link>
  36. </span>
  37. </div>
  38. </Col>
  39. <Col flex="auto"></Col>
  40. </Row>
  41. );
  42. };
  43. export default CourseNewWidget;