From 26ba451ff7cb73a06cbf3120c8b6525d9710dbb1 Mon Sep 17 00:00:00 2001 From: srgooglo <38926803+srgooglo@users.noreply.github.com> Date: Sun, 16 Feb 2020 18:59:19 +0100 Subject: [PATCH] 0.1.16-T2 Tags & Posts Update --- src/components/MainSidebar/index.js | 3 --- src/components/MainSidebar/index.less | 3 +-- src/components/MicroHeader/index.js | 29 +++++++------------------- src/components/MicroHeader/index.less | 12 +++++++++-- src/components/PostCard/index.js | 4 ++-- src/components/PostCard/index.less | 16 ++++++++++++++ src/components/UserProfile/index.js | 5 +++++ src/components/UserProfile/styles.less | 5 +++++ src/pages/main/index.js | 5 +++-- 9 files changed, 49 insertions(+), 33 deletions(-) diff --git a/src/components/MainSidebar/index.js b/src/components/MainSidebar/index.js index a0e06b0d..731f9e39 100644 --- a/src/components/MainSidebar/index.js +++ b/src/components/MainSidebar/index.js @@ -7,12 +7,9 @@ import styles from './index.less' var userData = ycore.SDCP() class MainSidebar extends React.Component { - state = { collapsed: false, }; - - render(){ return(
diff --git a/src/components/MainSidebar/index.less b/src/components/MainSidebar/index.less index 57af3ba6..6374a47e 100644 --- a/src/components/MainSidebar/index.less +++ b/src/components/MainSidebar/index.less @@ -1,8 +1,7 @@ @import '~themes/vars.less'; .main_menuWrapper{ - position: absolute; - left: 2%; + float: left; margin: 0 auto 0 auto; top: 70px; width: 20vw; diff --git a/src/components/MicroHeader/index.js b/src/components/MicroHeader/index.js index 856bf61d..8139ac5f 100644 --- a/src/components/MicroHeader/index.js +++ b/src/components/MicroHeader/index.js @@ -2,19 +2,7 @@ import React from 'react' import * as ycore from 'ycore' import * as antd from 'antd' import styles from './index.less' -import Radium, {StyleRoot}from 'radium'; -import { fadeInUp, bounceOutDown } from 'react-animations' - -const animationStyles = { - fadeInUp: { - animation: 'x 0.5s', - animationName: Radium.keyframes(fadeInUp, 'fadeInUp') - }, - bounceOutDown: { - animation: 'x 1s', - animationName: Radium.keyframes(bounceOutDown, 'bounceOutDown') - } -} +import { HandleVisibility } from 'components/PostCreator' export function HandleShow(){ window.MicroHeaderComponent.toogleShow(); @@ -25,8 +13,8 @@ class MicroHeader extends React.Component { super(props), window.MicroHeaderComponent = this; this.state = { - FadeIN: true, - Show: false + FadeIN: false, + Show: true } } toogleShow(){ @@ -34,18 +22,15 @@ class MicroHeader extends React.Component { this.state.FadeIN? this.setState({ Show: true }) : setTimeout(() => this.setState({ Show: false }), 1000) } render(){ - const { FadeIN, Show } = this.state + const { Show } = this.state return( Show? ( - -
+
- - Gatitos el gai - + HandleVisibility()} /> +
- ) : null ) } diff --git a/src/components/MicroHeader/index.less b/src/components/MicroHeader/index.less index 1393d103..2816a6ef 100644 --- a/src/components/MicroHeader/index.less +++ b/src/components/MicroHeader/index.less @@ -5,7 +5,7 @@ width: 100%; height: auto; position: absolute; - z-index: 100; + z-index: 10; top: 0; text-align: center; :global { @@ -14,9 +14,17 @@ max-width: 7%; margin: auto; padding: 5px; + border-radius: 0 0 13px 13px; + transform: translate(0, -30px); + transition: all 150ms ease-in; + } + .ant-card-body:hover { + + transform: translate(0, 0px); + transition: all 150ms ease-in; } .ant-btn { - background-color: rgba(0, 0, 0, 0.1); + background-color: transparent; margin: 3px; } } diff --git a/src/components/PostCard/index.js b/src/components/PostCard/index.js index 1198b83e..eeeea250 100644 --- a/src/components/PostCard/index.js +++ b/src/components/PostCard/index.js @@ -57,7 +57,7 @@ class PostCard extends React.PureComponent{ render(){ const { payload, customActions, } = this.props - const { user, ago, avatar, content, file, postFileName, publisher, post_likes } = payload || emptyPayload; + const { user, ago, avatar, content, file, postFileName, publisher, post_likes, is_post_pinned } = payload || emptyPayload; const defaultActions = [
{post_likes}
,,] const actions = customActions || defaultActions; return( @@ -65,7 +65,7 @@ class PostCard extends React.PureComponent{
} - title={

@{user} {ycore.booleanFix(publisher.verified)? : null}

} + title={

@{user} {ycore.booleanFix(publisher.verified)? : null}{ycore.booleanFix(publisher.nsfw_flag)? NSFW : null}

{ycore.booleanFix(is_post_pinned)? : null }
} description={{ago}} bordered="false" /> diff --git a/src/components/PostCard/index.less b/src/components/PostCard/index.less index ca3adc4a..905d180c 100644 --- a/src/components/PostCard/index.less +++ b/src/components/PostCard/index.less @@ -68,7 +68,23 @@ font-size: 10px; margin: 0 0 0 53px; } +.PostTags{ + float: right; + color:rgb(249, 179, 64); + width: 100%; + z-index: 10; + i{ + float: right; + margin: -0 6px 0 0;; + font-size: 17px; + } +} +.titleWrapper{ + display: flex; + +} .postContent{ + word-break: break-all; display: flex; border-radius: 3px; margin: 23px 24px 23px 24px; diff --git a/src/components/UserProfile/index.js b/src/components/UserProfile/index.js index 9527efe0..145837e2 100644 --- a/src/components/UserProfile/index.js +++ b/src/components/UserProfile/index.js @@ -28,10 +28,15 @@ const UserHeader = ({ values }) => {
+
+ {ycore.booleanFix(values.nsfw_flag)? NSFW : null} + +

{values.username}{ycore.booleanFix(values.verified)? : null}

{values.about}
+
} /> diff --git a/src/components/UserProfile/styles.less b/src/components/UserProfile/styles.less index 86c0794a..68c40596 100644 --- a/src/components/UserProfile/styles.less +++ b/src/components/UserProfile/styles.less @@ -1,8 +1,13 @@ @import '~themes/vars.less'; + .userWrapper{ padding: 0 68px 15px 68px; margin: auto; } +.TagWrappers{ + float: right; + position: relative; +} .UserCover { border-radius: 15px 15px 0 0; position: relative; diff --git a/src/pages/main/index.js b/src/pages/main/index.js index b2dac3f0..69a12b5e 100644 --- a/src/pages/main/index.js +++ b/src/pages/main/index.js @@ -20,8 +20,9 @@ class Main extends React.Component { render(){ return (
- - +
Kintxy xikito
+
+
) }