Browse Source

move global title to infrastructure

dev
xmcp 6 years ago
parent
commit
03068f68e5
  1. 8
      src/Flows.css
  2. 13
      src/Title.css
  3. 11
      src/Title.js
  4. 2
      src/infrastructure

8
src/Flows.css

@ -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);

13
src/Title.css

@ -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

@ -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>

2
src/infrastructure

@ -1 +1 @@
Subproject commit 68ae75e38ecb45e7518b2b94c0de91701b8a56e8 Subproject commit 044721854a2e35603e87254f943c5f359a319102
Loading…
Cancel
Save