Skip to content

Commit

Permalink
fix: 删除无用代码,修改bgurl,metatitle
Browse files Browse the repository at this point in the history
  • Loading branch information
liuduwei committed Dec 1, 2023
1 parent eb4a3ee commit 96af5c3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 42 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# production
/build
/build.*

# misc
.DS_Store
Expand Down
9 changes: 5 additions & 4 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import avatar from "../assets/zsu.PNG";
import { AiOutlineWechat } from "react-icons/ai";
import { SiSinaweibo } from "react-icons/si";
import { AiFillPhone } from "react-icons/ai";
const Footer = function (props) {
return (
<footer className="footer sm:grid-flow-col p-10 bg-neutral text-neutral-content">
Expand All @@ -21,7 +18,11 @@ const Footer = function (props) {
<header className="footer-title">联系我们:</header>
<div className="grid grid-flow-row gap-4">
<div>
<a target="_blank" href="https://sph.sysu.edu.cn/?page=4">
<a
target="_blank"
href="https://sph.sysu.edu.cn/?page=4"
rel="noreferrer"
>
学院官网
</a>
</div>
Expand Down
22 changes: 2 additions & 20 deletions src/components/Hero.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import hero from "../assets/bg.jpg";
import avatar from "../assets/logo.png";
import { useEffect } from "react";
import { SiSinaweibo } from "react-icons/si";
import _ from "../assets/utils";
import styles from "./styles.module.less";
const Hero = function ({ isLogin, authUrl, handleLogout }) {
Expand All @@ -12,7 +10,8 @@ const Hero = function ({ isLogin, authUrl, handleLogout }) {
<div
className="hero h-screen relative"
style={{
backgroundImage: `url(${hero})`,
backgroundImage:
"https://pic-resource-yousan.oss-cn-hangzhou.aliyuncs.com/bg.jpg",
}}
>
<div className={`hero-overlay ${styles.overShadow}`}></div>
Expand Down Expand Up @@ -51,26 +50,9 @@ const Hero = function ({ isLogin, authUrl, handleLogout }) {
)}
</div>
<div className="w-[calc(100vw-24px)] flex justify-between items-center absolute top-2">
{/* <div className="avatar "> */}
<div className="w-64">
<img src={avatar} alt="avatar"></img>
</div>
{/* </div> */}
{/* <div className="flex items-center gap-4">
{isLogin ? (
<>
<p>你好,微博用户</p>
<button className="btn btn-primary" onClick={handleLogout}>
登出
</button>
</>
) : (
<a href={authUrl} className="btn btn-primary">
<SiSinaweibo size={"2rem"}></SiSinaweibo>
登陆
</a>
)}
</div> */}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const NavBar = function ({ avatar1, isLogin }) {
</div>
</div>
<div className="navbar-center">
<a className="btn btn-ghost normal-case text-xl">问卷平台</a>
<a className="btn btn-ghost normal-case text-xl">心理树洞</a>
</div>
<div className="navbar-end">
{isLogin ? (
Expand Down
2 changes: 1 addition & 1 deletion src/routes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from "react-router-dom";
const Element = function (props) {
const { component: Component, meta } = props;
const { title = "知乎日报webApp" } = meta || {};
const { title = "心理树洞App" } = meta || {};
document.title = title;
const location = useLocation();
const params = useParams();
Expand Down
12 changes: 0 additions & 12 deletions src/routes/profileRoutes.js

This file was deleted.

8 changes: 4 additions & 4 deletions src/routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ const routes = [
component: () => <Navigate to="/Home"></Navigate>,
name: "root",
meta: {
title: "问卷调查App",
title: "心理树洞App",
},
},
{
path: "/Home",
component: Home,
name: "Home",
meta: {
title: "问卷调查App",
title: "心理树洞App",
},
},
{
path: "/login/:code?",
component: Home,
name: "Home",
meta: {
title: "问卷调查App",
title: "心理树洞App",
},
},
{
path: "*",
name: "NotFound",
component: Home,
meta: {
title: "问卷调查App",
title: "心理树洞App",
},
},
];
Expand Down

0 comments on commit 96af5c3

Please sign in to comment.