mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 23:00:57 +00:00
New file history (#2359)
This commit is contained in:
committed by
Daniel Pan
parent
5924c65d08
commit
ca0110e996
47
frontend/src/components/logo.js
Normal file
47
frontend/src/components/logo.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import React from 'react';
|
||||
import PropsType from 'prop-types';
|
||||
|
||||
const siteRoot = window.app.config.siteRoot;
|
||||
const mediaUrl = window.app.config.mediaUrl;
|
||||
const logoPath = window.app.config.logoPath;
|
||||
const logoWidth = window.app.config.logoWidth;
|
||||
const logoHeight = window.app.config.logoHeight;
|
||||
const siteTitle = window.app.config.siteTitle;
|
||||
|
||||
const propsType = {
|
||||
onCloseSidePanel: PropsType.func.isRequired,
|
||||
};
|
||||
|
||||
class Logo extends React.Component {
|
||||
|
||||
closeSide = () => {
|
||||
this.props.onCloseSidePanel();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="logo">
|
||||
<a href={siteRoot} id="logo">
|
||||
<img
|
||||
src={mediaUrl + logoPath}
|
||||
height={logoHeight}
|
||||
width={logoWidth}
|
||||
title={siteTitle}
|
||||
alt="logo"
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
className="sf2-icon-x1 sf-popover-close side-panel-close op-icon d-md-none"
|
||||
onClick={this.closeSide}
|
||||
title="Close"
|
||||
aria-label="Close"
|
||||
>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Logo.propsType = propsType;
|
||||
|
||||
export default Logo;
|
Reference in New Issue
Block a user