Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
Add a profile post form to the user bio page
Browse files Browse the repository at this point in the history
  • Loading branch information
artkravchenko committed Apr 4, 2017
1 parent 9d475b0 commit a034edd
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/less/blocks/bio.less
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,17 @@
}
}
&_form {
.bio__title {
margin-left: 60px;
}

@media (min-width: 768px) {
padding-left: 60px;
}

&.bio__river-item:first-child {
padding-top: 20px;
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/less/blocks/v2/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
.media(@standard-desktop, { .generate-columns(@size: ~"l", @n: 23); });
.media(@widescreen-desktop, { .generate-columns(@size: ~"xl", @n: 23); });

.generate-margins(@size: ~"all");
.media(@tablet-flexible, { .generate-margins(@size: ~"xs"); });
.media(@tablet, { .generate-margins(@size: ~"s"); });
.media(@narrow-desktop, { .generate-margins(@size: ~"m"); });
Expand Down
25 changes: 25 additions & 0 deletions src/pages/user-bio.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import Button from '../components/button';
import VisibilitySensor from '../components/visibility-sensor';
import NotFound from './not-found';
import BaseUserPageWithoutHeader from './base/user-without_header';
import RiverItemCreateForm from '../components/river/type/text/create-form';

class UserBioPage extends React.Component {
static displayName = 'UserBioPage';
Expand Down Expand Up @@ -166,6 +167,30 @@ class UserBioPage extends React.Component {
onUpdate={this.handleUpdateProfilePost}
/>
{loadMore}
<div className="margin--all_top">
<div className="bio__river-item bio__river-item--type_form">
<h5 className="bio__title">Add:</h5>
<RiverItemCreateForm
cancel={{ hide: true }}
className="bio__create-post-form"
icon={
<div className="bio__icon">
<Avatar isRound={false} size={26} user={user} />
</div>
}
input={{
className: 'bio__post--type_text',
placeholder: ''
}}
submit={{
className: 'button-wide bio__button',
color: 'dark_blue',
title: 'Post'
}}
onSubmit={this.handleCreateProfilePost}
/>
</div>
</div>
</div>
</BaseUserPageWithoutHeader>
);
Expand Down

0 comments on commit a034edd

Please sign in to comment.