From a31178318a2e69df59247ea0342218202e3e2ca2 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 3 Jan 2020 11:36:15 -0500 Subject: [PATCH] fix channel page style --- ui/component/channelAbout/view.jsx | 2 +- ui/component/channelDiscussion/view.jsx | 2 +- ui/page/channel/view.jsx | 194 ++++++++++++------------ ui/scss/component/_channel.scss | 5 +- ui/scss/component/tabs.scss | 5 +- 5 files changed, 102 insertions(+), 106 deletions(-) diff --git a/ui/component/channelAbout/view.jsx b/ui/component/channelAbout/view.jsx index a73eec2db..b8f2cc07c 100644 --- a/ui/component/channelAbout/view.jsx +++ b/ui/component/channelAbout/view.jsx @@ -22,7 +22,7 @@ function ChannelContent(props: Props) { const showAbout = description || email || website; return ( -
+
{!showAbout &&

{__('Nothing here yet')}

} {showAbout && ( diff --git a/ui/component/channelDiscussion/view.jsx b/ui/component/channelDiscussion/view.jsx index 6db8ec2f7..0613f88db 100644 --- a/ui/component/channelDiscussion/view.jsx +++ b/ui/component/channelDiscussion/view.jsx @@ -10,7 +10,7 @@ type Props = { function ChannelDiscussion(props: Props) { const uri = props.uri; return ( -
+
diff --git a/ui/page/channel/view.jsx b/ui/page/channel/view.jsx index 08dea0382..e1eb73c83 100644 --- a/ui/page/channel/view.jsx +++ b/ui/page/channel/view.jsx @@ -165,110 +165,104 @@ function ChannelPage(props: Props) { -
-
-
- {!channelIsBlocked && !channelIsBlackListed && } - {!channelIsMine && ( -
- {!editing && cover && ( - +
+ {!channelIsBlocked && !channelIsBlackListed && } + {!channelIsMine && ( +
+ {!editing && cover && ( + + )} + {editing && } + {/* component that offers select/upload */} +
+ {!editing && ( + + )} + {editing && ( + + )} +

{title || '@' + channelName}

+ {channelIsMine && !editing && ( +
- - - {__('Content')} - {editing ? __('Editing Your Channel') : __('About')} - {__('Comments')} - {/* only render searchbar on content page (tab index 0 === content page) */} - {tabIndex === 0 ? ( -
- - - - ) : ( -
- )} - +
+ + + + {__('Content')} + {editing ? __('Editing Your Channel') : __('About')} + {__('Comments')} + {/* only render searchbar on content page (tab index 0 === content page) */} + {tabIndex === 0 ? ( +
+ + + + ) : ( +
+ )} + - - - {searchResults ? ( - searchResults.map(url => ) - ) : ( - - )} - - - {editing ? ( - setThumbPreview(v)} - updateCover={v => setCoverPreview(v)} - /> - ) : ( - - )} - - - - - - -
+ + + {searchResults ? ( + searchResults.map(url => ) + ) : ( + + )} + + + {editing ? ( + setThumbPreview(v)} + updateCover={v => setCoverPreview(v)} + /> + ) : ( + + )} + + + + + +
); } diff --git a/ui/scss/component/_channel.scss b/ui/scss/component/_channel.scss index 1c004135f..086935fce 100644 --- a/ui/scss/component/_channel.scss +++ b/ui/scss/component/_channel.scss @@ -8,8 +8,6 @@ $metadata-z-index: 1; align-items: flex-end; box-sizing: content-box; color: #fff; - border-top-left-radius: var(--card-radius); - border-top-right-radius: var(--card-radius); .button { color: #fff; @@ -28,6 +26,8 @@ $metadata-z-index: 1; .channel-cover__custom { height: var(--cover-photo-height); width: 100%; + border-top-left-radius: var(--card-radius); + border-top-right-radius: var(--card-radius); } .channel-thumbnail { @@ -47,7 +47,6 @@ $metadata-z-index: 1; position: absolute; height: var(--channel-thumbnail-width); width: var(--channel-thumbnail-width); - box-shadow: 0px 8px 40px -3px #000; left: var(--spacing-medium); top: 4rem; diff --git a/ui/scss/component/tabs.scss b/ui/scss/component/tabs.scss index 61f17dc8a..c6bfcf28f 100644 --- a/ui/scss/component/tabs.scss +++ b/ui/scss/component/tabs.scss @@ -17,7 +17,10 @@ .tabs__list--channel-page { padding-left: calc(var(--channel-thumbnail-width) + var(--spacing-large)); padding-right: var(--spacing-medium); + margin-bottom: var(--spacing-large); height: 4rem; + border-bottom-left-radius: var(--card-radius); + border-bottom-right-radius: var(--card-radius); @media (max-width: $breakpoint-small) { padding-left: var(--spacing-medium); @@ -47,7 +50,7 @@ .tab__divider { position: absolute; - margin-top: calc(var(--tab-indicator-size) * -1); + margin-top: calc(var(--tab-indicator-size) * -1 - var(--spacing-large)); } .tab::after,