#{props.info.cid}
@@ -39,7 +39,7 @@ function FlowItem(props) {
{!!parseInt(props.info.likenum, 10) && {props.info.likenum}★}
- {!!parseInt(props.info.reply, 10) && {props.info.reply} 回复}
+ {!!parseInt(props.info.reply, 10) && {props.info.reply}回复}
#{props.info.pid}
@@ -79,7 +79,7 @@ class FlowItemRow extends Component {
throw new Error(json.code);
this.setState({
replies: json.data.map((info)=>{
- info._display_color=info.islz ? '#fff' : this.color_picker.get(info.name)
+ info._display_color=info.islz ? null : this.color_picker.get(info.name)
return info;
}),
reply_loading: false,
@@ -101,8 +101,10 @@ class FlowItemRow extends Component {
);
}}>
- {!!this.state.reply_loading &&
}
- {this.state.replies.slice(0,10).map((reply)=>
)}
+
+ {!!this.state.reply_loading && }
+ {this.state.replies.slice(0,10).map((reply)=>)}
+
);
}
diff --git a/src/Sidebar.css b/src/Sidebar.css
index e57fd08..47bacd0 100644
--- a/src/Sidebar.css
+++ b/src/Sidebar.css
@@ -39,11 +39,18 @@
left: calc(100% - 550px);
}
}
+@media screen and (max-width: 600px) {
+ .sidebar {
+ width: calc(100% - 50px);
+ }
+ .sidebar-on .sidebar {
+ left: 50px;
+ }
+}
.sidebar-flow-item {
display: block;
}
.sidebar-flow-item .box {
- margin: 1em;
- width: calc(100% - 2em);
+ width: 100%;
}
\ No newline at end of file
diff --git a/src/Title.js b/src/Title.js
index b154f5a..7d678f6 100644
--- a/src/Title.js
+++ b/src/Title.js
@@ -65,7 +65,7 @@ class ControlBar extends Component {
on_keypress(event) {
if(event.key==='Enter')
- this.set_search_text(this.state.search_text);
+ this.set_search_text(this.state.search_text||null);
}
do_refresh() {
@@ -90,7 +90,6 @@ class ControlBar extends Component {
'关于 P大树洞(非官方) 网页版',
HELP_TEXT
)}}>Help
-
GitHub
)
}
diff --git a/src/color_picker.js b/src/color_picker.js
index 6608a51..2c53b20 100644
--- a/src/color_picker.js
+++ b/src/color_picker.js
@@ -12,7 +12,7 @@ export class ColorPicker {
if(!this.names[name]) {
this.current_h+=golden_ratio_conjugate;
this.current_h%=1;
- this.names[name]=`hsl(${this.current_h*360}, 40%, 80%)`;
+ this.names[name]=`hsl(${this.current_h*360}, 40%, 85%)`;
}
return this.names[name];
}
diff --git a/src/index.css b/src/index.css
index d4a0670..ccf653a 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,9 +1,9 @@
body {
- min-width: 620px;
margin: 0;
padding: 0;
font-family: '微软雅黑', 'Microsoft YaHei', sans-serif;
background-size: cover;
+ overflow-x: hidden;
}
body::-webkit-scrollbar {
@@ -12,6 +12,8 @@ body::-webkit-scrollbar {
* {
box-sizing: border-box;
+ word-wrap: break-word;
+ -webkit-overflow-scrolling: touch;
}
p {
@@ -33,4 +35,9 @@ input {
audio {
vertical-align: middle;
+}
+
+pre {
+ white-space: pre-wrap;
+ font-family: '微软雅黑', 'Microsoft YaHei', sans-serif;
}
\ No newline at end of file