Browse Source

修改style,置顶栏可关闭

pull/4/head
欧醚 5 years ago
parent
commit
36ec3f043c
4 changed files with 31 additions and 23 deletions
  1. +13
    -1
      app/javascript/mastodon/features/ui/components/tabs_bar.js
  2. +12
    -0
      app/javascript/styles/closed-social/global.scss
  3. +2
    -2
      app/javascript/styles/closed-social/timeline_comments.scss
  4. +4
    -20
      app/javascript/styles/thu/diff.scss

+ 13
- 1
app/javascript/mastodon/features/ui/components/tabs_bar.js View File

@ -37,6 +37,10 @@ class TabsBar extends React.PureComponent {
history: PropTypes.object.isRequired,
}
state = {
showPinned: true,
}
setRef = ref => {
this.node = ref;
}
@ -73,8 +77,13 @@ class TabsBar extends React.PureComponent {
}
handleClear = () => {
this.setState({ showPinned: false});
}
render () {
const { intl: { formatMessage } } = this.props;
const { showPinned } = this.state;
return (
<div className='tabs-bar__wrapper'>
@ -83,9 +92,12 @@ class TabsBar extends React.PureComponent {
</nav>
<div id='tabs-bar__portal' />
{ pinnedInfo &&
{ pinnedInfo && showPinned &&
<div className='hero-widget__text pinned-info'>
{ReactHtmlParser(pinnedInfo)}
<div className='pinned-info__icon' onClick={this.handleClear}>
<Icon id='times-circle' />
</div>
</div>
}
</div>

+ 12
- 0
app/javascript/styles/closed-social/global.scss View File

@ -1,8 +1,20 @@
.column {
flex: 1 0 auto;
}
.pinned-info {
opacity: 0.85;
font-size: 15px;
padding: 10px 20px;
}
.pinned-info__icon {
.fa {
position: absolute;
bottom: 16px;
right: 10px;
cursor: pointer;
}
}
div {

+ 2
- 2
app/javascript/styles/closed-social/timeline_comments.scss View File

@ -7,12 +7,12 @@
transform-origin: 80% 0%;
margin-bottom: -32px;
&:hover {
max-height: none;
max-height: 420px;
-webkit-mask-image: none;
mask-image: none;
}
&:active {
max-height: none;
max-height: 420px;
-webkit-mask-image: none;
mask-image: none;
}

+ 4
- 20
app/javascript/styles/thu/diff.scss View File

@ -16,32 +16,13 @@ body {
background-position: center;
height: 100vh !important;
}
body.app-body {
body.theme-thu {
background: rgba(73, 58, 99, 1) url(https://www.tsinghua.edu.cn/publish/thu2018/images/footer.jpg) no-repeat fixed;
background-size: cover;
background-attachment: fixed;
background-position: center;
height: 100vh !important;
}
body.about-body {
background: rgba(73, 58, 99, 1) url(https://www.tsinghua.edu.cn/publish/thu2018/images/footer.jpg) no-repeat fixed;
background-size: cover;
background-attachment: fixed;
background-position: center;
height: 100vh !important;
}
body.admin {
background: rgba(73, 58, 99, 1) url(https://www.tsinghua.edu.cn/publish/thu2018/images/footer.jpg) no-repeat fixed;
background-size: cover;
background-attachment: fixed;
background-position: center;
height: 100vh !important;
}
.regeneration-indicator {
background: rgba(73, 58, 99, 1) url(https://www.tsinghua.edu.cn/publish/thu2018/images/footer.jpg) no-repeat fixed;
background-size: cover;
background-attachment: fixed;
}
.ui {
background: rgba(0, 0, 0, .4);
}
@ -253,3 +234,6 @@ button.icon-button.active {
background: rgba(73, 58, 99, 0.7);
}
.tabs-bar__wrapper {
background: rgba(23,25,31);
}

Loading…
Cancel
Save