Browse Source

allow changing background image

dev
xmcp 7 years ago
parent
commit
1ac4458223
  1. 4
      src/App.js
  2. 13
      src/Common.css
  3. 2
      src/Common.js
  4. 3
      src/Title.js

4
src/App.js

@ -31,7 +31,9 @@ class App extends Component {
render() { render() {
return ( return (
<div> <div>
<div className="bg-img" /> <div className="bg-img" style={{
backgroundImage: 'url('+(localStorage['REPLACE_ERIRI_WITH_URL'] || '/eriri_bg.jpg')+')'
}} />
<Title callback={this.show_sidebar.bind(this)} set_search_text={this.set_search_text.bind(this)} /> <Title callback={this.show_sidebar.bind(this)} set_search_text={this.set_search_text.bind(this)} />
<div className="left-container"> <div className="left-container">
<Flow key={this.state.flow_render_key} <Flow key={this.state.flow_render_key}

13
src/Common.css

@ -31,6 +31,7 @@
.title-line::before, .title-line::before,
.title-line::after { .title-line::after {
background-color: #fff; background-color: #fff;
box-shadow: 0 1px 1px #000;
} }
.bg-img { .bg-img {
@ -40,6 +41,16 @@
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #124 url(/eriri_bg.jpg) fixed center center; background: #124 fixed center center;
background-size: cover; background-size: cover;
}
.black-outline {
text-shadow:
-1px -1px 0 #000,
0 -1px 0 #000,
1px -1px 0 #000,
-1px 1px 0 #000,
0 1px 0 #000,
1px 1px 0 #000;
} }

2
src/Common.js

@ -36,7 +36,7 @@ export function Time(props) {
export function TitleLine(props) { export function TitleLine(props) {
return ( return (
<p className="centered-line title-line aux-margin"> <p className="centered-line title-line aux-margin">
<span>{props.text}</span> <span className="black-outline">{props.text}</span>
</p> </p>
) )
} }

3
src/Title.js

@ -7,7 +7,8 @@ const HELP_TEXT=(
<ul> <ul>
<li>为保证使用体验请使用 Chrome 浏览器 stable 分支最新版</li> <li>为保证使用体验请使用 Chrome 浏览器 stable 分支最新版</li>
<li>在列表中点击帖子可以显示全部回复</li> <li>在列表中点击帖子可以显示全部回复</li>
<li>搜索框输入 #472865 等可以查看指定 ID 的树洞</li> <li>在搜索框输入 #472865 等可以查看指定 ID 的树洞</li>
<li>自定义背景图片请修改 localStorage['REPLACE_ERIRI_WITH_URL']</li>
</ul> </ul>
<p>使用本网站时您需要了解并同意</p> <p>使用本网站时您需要了解并同意</p>
<ul> <ul>

Loading…
Cancel
Save