Skip to content

Commit

Permalink
i
Browse files Browse the repository at this point in the history
  • Loading branch information
Cynthian-pshds committed Dec 12, 2024
1 parent 136671a commit 4c8e9fe
Show file tree
Hide file tree
Showing 5 changed files with 464 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const config = {
},
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: '标题',
title: undefined,
hideOnScroll: true,
logo: {
alt: '图片加载失败',
Expand Down
19 changes: 14 additions & 5 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
import React from 'react';
import { useColorMode } from '@docusaurus/theme-common';

const FeatureList = [
{
title: '形式科学',
Svg: require('@site/static/img/形式科学.svg').default,
SvgLight: require('@site/static/img/形式科学.svg').default,
SvgDark: require('@site/static/img/形式科学_dark.svg').default,
description: (
<>
分析|函数论 & 微分方程 <br></br>
代数|矩阵论 & 线性代数 <br></br>
优化|凸问题 & 更优算法 <br></br>
优化|凸基础 & 动态规划 <br></br>
</>
),
},
{
title: '社会科学',
Svg: require('@site/static/img/社会科学.svg').default,
SvgLight: require('@site/static/img/社会科学.svg').default,
SvgDark: require('@site/static/img/社会科学_dark.svg').default,
description: (
<>
应用|劳动经济学 & 家庭决策<br></br>
Expand All @@ -27,7 +31,8 @@ const FeatureList = [
},
{
title: '工程技术',
Svg: require('@site/static/img/工程技术.svg').default,
SvgLight: require('@site/static/img/工程技术.svg').default,
SvgDark: require('@site/static/img/工程技术_dark.svg').default,
description: (
<>
验证计算|看关系 & 因果推断<br></br>
Expand All @@ -38,7 +43,11 @@ const FeatureList = [
},
];

function Feature({Svg, title, description}) {


function Feature({ SvgLight, SvgDark, title, description}) {
const { colorMode } = useColorMode();
const Svg = colorMode === 'dark' ? SvgDark : SvgLight;
return (
<div className={clsx('col col--4')}>
<div className="text--center">
Expand Down
109 changes: 109 additions & 0 deletions static/img/工程技术_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4c8e9fe

Please sign in to comment.