forked from newthuhole/hole_thu_frontend
move global title to infrastructure
This commit is contained in:
@@ -59,22 +59,14 @@
|
|||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aux-margin,
|
|
||||||
.left-container .flow-item {
|
.left-container .flow-item {
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
}
|
}
|
||||||
.aux-margin {
|
|
||||||
width: calc(100% - 2 * 50px);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: 1300px) {
|
@media screen and (max-width: 1300px) {
|
||||||
.aux-margin,
|
|
||||||
.left-container .flow-item {
|
.left-container .flow-item {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
.aux-margin {
|
|
||||||
width: calc(100% - 2 * 10px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.flow-reply-row {
|
.flow-reply-row {
|
||||||
width: calc(100% - 485px);
|
width: calc(100% - 485px);
|
||||||
|
|||||||
@@ -10,19 +10,6 @@
|
|||||||
margin-bottom: 1em;
|
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 {
|
.control-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: .5em;
|
margin-top: .5em;
|
||||||
|
|||||||
11
src/Title.js
11
src/Title.js
@@ -1,4 +1,5 @@
|
|||||||
import React, {Component, PureComponent} from 'react';
|
import React, {Component, PureComponent} from 'react';
|
||||||
|
import {AppSwitcher} from './infrastructure/widgets';
|
||||||
import {LoginForm, PostForm} from './UserAction';
|
import {LoginForm, PostForm} from './UserAction';
|
||||||
import {TokenCtx} from './UserAction';
|
import {TokenCtx} from './UserAction';
|
||||||
import {PromotionBar} from './Common';
|
import {PromotionBar} from './Common';
|
||||||
@@ -153,22 +154,14 @@ class ControlBar extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function Title(props) {
|
export function Title(props) {
|
||||||
let date=new Date();
|
|
||||||
let final_exam_egg=(1+date.getMonth())===6 && date.getDate()>=8 && date.getDate()<=21;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="title-bar">
|
<div className="title-bar">
|
||||||
|
<AppSwitcher appid="hole" />
|
||||||
<div className="aux-margin">
|
<div className="aux-margin">
|
||||||
<div className="title">
|
<div className="title">
|
||||||
<p className="centered-line">
|
<p className="centered-line">
|
||||||
P大树洞
|
P大树洞
|
||||||
</p>
|
</p>
|
||||||
<p className="title-small">
|
|
||||||
{ final_exam_egg && window.config.easter_egg ?
|
|
||||||
<span style={{backgroundColor: 'yellow'}}>期末加油</span> :
|
|
||||||
"官方网页版"
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<ControlBar show_sidebar={props.show_sidebar} set_mode={props.set_mode} />
|
<ControlBar show_sidebar={props.show_sidebar} set_mode={props.set_mode} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Submodule src/infrastructure updated: 68ae75e38e...044721854a
Reference in New Issue
Block a user