From 5c0dea1ee79cc94decd5d862895b075b9e54ae2c Mon Sep 17 00:00:00 2001 From: xmcp Date: Sun, 19 May 2019 12:28:06 +0800 Subject: [PATCH] Revert "update sidebar style" This reverts commit c77f74c2d67eb84ef243be52ddabf53052311f4e. --- src/Config.css | 2 +- src/Flows.js | 1 + src/Sidebar.css | 21 ++------------------- src/Sidebar.js | 8 +++----- src/UserAction.css | 2 +- 5 files changed, 8 insertions(+), 26 deletions(-) diff --git a/src/Config.css b/src/Config.css index 733945a7..03c16012 100644 --- a/src/Config.css +++ b/src/Config.css @@ -1,6 +1,6 @@ .config-ui-header { text-align: center; - top: 3em; + top: 0; position: sticky; } diff --git a/src/Flows.js b/src/Flows.js index 4d4973e6..6aa5667e 100644 --- a/src/Flows.js +++ b/src/Flows.js @@ -344,6 +344,7 @@ class FlowSidebar extends PureComponent { area_ref={this.reply_ref} on_complete={this.load_replies.bind(this)} /> :
登录后可以回复树洞
} +
) } diff --git a/src/Sidebar.css b/src/Sidebar.css index 3b1fc15b..6367653c 100644 --- a/src/Sidebar.css +++ b/src/Sidebar.css @@ -23,6 +23,7 @@ top: 0; height: 100%; width: calc(100% - 700px); + padding: 1em; background-color: rgba(255,255,255,.7); z-index: 21; overflow-y: auto; @@ -34,30 +35,12 @@ .sidebar-title { text-shadow: 0 0 3px white; font-weight: bold; - position: fixed; - width: 100%; - top: 0; - line-height: 3em; - padding-left: .5em; - padding-bottom: 1em; - margin-bottom: -1em; - background-image: linear-gradient(top,rgba(255,255,255,.7) 40%,rgba(255,255,255,0) 100%); - pointer-events: none; -} -.sidebar-title a { - pointer-events: initial; -} - -.sidebar-content { - padding: 2em 1em 1em 1em; } @media screen and (max-width: 1300px) { .sidebar { width: 550px; - } - .sidebar-content { - padding: 2em .5em 1em .5em; + padding: 1em .5em; } .sidebar-on .sidebar { left: calc(100% - 550px); diff --git a/src/Sidebar.js b/src/Sidebar.js index 7732c94f..9bbf3aa7 100644 --- a/src/Sidebar.js +++ b/src/Sidebar.js @@ -6,13 +6,11 @@ export function Sidebar(props) {
-
+

   {props.title} -

-
- {props.content} -
+

+ {props.content}
); diff --git a/src/UserAction.css b/src/UserAction.css index aca6ff64..620c41b6 100644 --- a/src/UserAction.css +++ b/src/UserAction.css @@ -10,7 +10,7 @@ } .reply-sticky { position: sticky; - bottom: 1em; + bottom: 0; } .reply-form textarea {