Merge pull request '查看源代码的浏览器logo以及页面添加的监听事件的移除' (#257) from caishi/forgeplus-react:gitlink_server into gitlink_server

This commit is contained in:
yystopf 2021-11-11 16:38:14 +08:00
commit 652de9b441
6 changed files with 14 additions and 5 deletions

BIN
public/favicon-.ico Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -390,13 +390,13 @@ class NewHeader extends Component {
{
publicNav &&
<a href={'https://www.ccf.org.cn/'} className={"fl pr15"}>
<img src={MainLogo} alt="" style={{ heigth: "40px" }}/>
<img src={MainLogo} alt="ccf" />
</a>
}
{
settings && settings.nav_logo_url ?
<a href={settings && settings.new_course.default_url} className={"fl mr50"} style={{minWidth:"45px"}}>
<img alt="可控开源社区" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(`/${settings.nav_logo_url}`)}></img>
<a href={settings && settings.new_course.default_url} className={"fl mr50"}>
<img alt="可控开源社区" className="logoimg" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>
</a>
:
""

View File

@ -23,8 +23,13 @@ function Index(props) {
useEffect(()=>{
window.addEventListener("scroll",scrollListener);
getTab();
return ComponentWillUnmount;
},[])
function ComponentWillUnmount() {
window.removeEventListener("scroll",scrollListener);
}
function getTab() {
const url = `/topics.json?topic_type=card`;
Axios.get(url,{

View File

@ -45,7 +45,11 @@ const codes=[
function SecondEdition({setValue}) {
useEffect(()=>{
window.addEventListener('scroll', handleScroll);
return ComponentWillUnmount;
},[])
function ComponentWillUnmount() {
window.removeEventListener("scroll",handleScroll);
}
const [ hadoop , setHadoop ] = useState(false);
const [ highDevops , setHighDevops ] = useState(false);

View File

@ -227,8 +227,8 @@ body>.-task-title {
.logoimg {
float: left;
min-width: 40px;
height: 40px;
min-width: 34px;
height: 34px;
}
.headwith100b {