move global title to infrastructure

This commit is contained in:
xmcp
2019-06-19 20:38:27 +08:00
parent e97c939831
commit 03068f68e5
4 changed files with 3 additions and 31 deletions

View File

@@ -59,22 +59,14 @@
overflow-y: hidden;
}
.aux-margin,
.left-container .flow-item {
margin-left: 50px;
}
.aux-margin {
width: calc(100% - 2 * 50px);
}
@media screen and (max-width: 1300px) {
.aux-margin,
.left-container .flow-item {
margin-left: 10px;
}
.aux-margin {
width: calc(100% - 2 * 10px);
}
.flow-reply-row {
width: calc(100% - 485px);

View File

@@ -10,19 +10,6 @@
margin-bottom: 1em;
}
.title {
font-size: 1.5em;
height: 4em;
padding-top: 1em;
text-align: center;
}
.title .title-small {
opacity: .6;
padding-top: .5em;
font-size: .5em;
line-height: .5em;
}
.control-bar {
display: flex;
margin-top: .5em;

View File

@@ -1,4 +1,5 @@
import React, {Component, PureComponent} from 'react';
import {AppSwitcher} from './infrastructure/widgets';
import {LoginForm, PostForm} from './UserAction';
import {TokenCtx} from './UserAction';
import {PromotionBar} from './Common';
@@ -153,22 +154,14 @@ class ControlBar extends PureComponent {
}
export function Title(props) {
let date=new Date();
let final_exam_egg=(1+date.getMonth())===6 && date.getDate()>=8 && date.getDate()<=21;
return (
<div className="title-bar">
<AppSwitcher appid="hole" />
<div className="aux-margin">
<div className="title">
<p className="centered-line">
P大树洞
</p>
<p className="title-small">
{ final_exam_egg && window.config.easter_egg ?
<span style={{backgroundColor: 'yellow'}}>期末加油</span> :
"官方网页版"
}
</p>
</div>
<ControlBar show_sidebar={props.show_sidebar} set_mode={props.set_mode} />
</div>