Skip to content
This repository was archived by the owner on Feb 2, 2019. It is now read-only.

Feature/mobile layout #14

Open
wants to merge 6 commits into
base: feat/arxivAPI
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Research Kernel's Frontend

We at Research Kernel are working on **React.js** for developing UI for Frontend with **Ant Deisng** as a UI design language.
We at Research Kernel are working on **React.js** for developing UI for Frontend with **Ant Design** as a UI design language.

## What this Organisation do ?

Expand Down
63 changes: 52 additions & 11 deletions src/components/common/navbar/navbar.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,60 @@ import {
} from "./navbar.style";
import SearchBox from "./../search_box/search_box.component";
import Logo from "../../../_assets/images/rk-light.png";
import { Row, Col,Popover, Icon, Button } from 'antd';

const content = (
<div>
<NavbarLinks>
<p><StyledLink as={Link} to="/community">
Community
</StyledLink></p>
<p><StyledLink as={Link} to="/about-us">
About-Us
</StyledLink></p>
<p><StyledLink as={Link} to="/contact-us">
Contact-Us
</StyledLink></p>
<p><StyledLink as={Link} to="/donate">
Donate
</StyledLink></p>
<p><StyledLink as={Link} to="/sign-in">
Sign In
</StyledLink></p>
<p><StyledLink as={Link} to="/sign-up">
Sign Up
</StyledLink></p>
</NavbarLinks>
</div>
);

const NavbarComponent = () => {
return (
<Navbar>
<div>
<Row type="flex" justify="space-around" align="middle">
<Col xs={22} sm={22} md={5} lg={3}>
<NavbarLogo>
{/* <StyledLink as={Link} to="/"> */}
<NavbarImg src={Logo} />
{/* </StyledLink> */}
</NavbarLogo>
</Col>
<Col xs={2} sm={2} md={0} lg={0}>
<Popover
content={content}
placement="bottomRight"
trigger="click">
<Button><Icon type= 'menu' /></Button>
</Popover>
</Col>
<Col xs={0} sm={0} md={18} lg={12}>
<NavbarLinks>
<StyledLink as={Link} to="/community">
<StyledLink as={Link} to="/community">
Community
</StyledLink>
<StyledLink as={Link} to="/about-us">
About Us
</StyledLink>
<StyledLink as={Link} to="/about-us">
About-Us
</StyledLink>
<StyledLink as={Link} to="/contact-us">
Contact Us
Contact-Us
</StyledLink>
<StyledLink as={Link} to="/donate">
Donate
Expand All @@ -37,9 +73,14 @@ const NavbarComponent = () => {
<StyledLink as={Link} to="/sign-up">
Sign Up
</StyledLink>
</NavbarLinks>
<SearchBox />
</Navbar>
</NavbarLinks>
</Col>
<Col xs={20} sm={16} md={8} lg={6}>
<SearchBox />
</Col>

</Row>
</div>
);
};

Expand Down
3 changes: 0 additions & 3 deletions src/components/common/navbar/navbar.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ export const Navbar = styled.div`

export const NavbarLinks = styled.div`
display: inherit;
@media (max-width: 992px) {
display: none;
}
`;

export const NavbarLogo = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/search_box/search_box.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SearchBoxComponent extends React.Component {
const { dataSource } = this.state;
return (
<div style={{ flex: 1 }}>
<div className="global-search-wrapper" style={{ width: 400 }}>
<div>
{/* <AutoComplete
className="global-search"
size="medium"
Expand Down
5 changes: 2 additions & 3 deletions src/components/common/sidebar/sidebar.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ class SiderComponent extends React.Component {
render() {
return (
<Sider
breakpoint="lg"
collapsedWidth="0"
style={{ background: "#fff" }}

style={{ background: "#fff", overflow:'auto' }}
theme="dark"
width={200}
onBreakpoint={broken => {
Expand Down
6 changes: 1 addition & 5 deletions src/views/login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from "react";
import { login } from "./../../_actions/auth.action";
import { Link } from "react-router-dom";
import { connect } from "react-redux";
import { Form, Icon, Button, Checkbox, Input } from 'antd';
import { Form, Icon, Input } from 'antd';
import {
StyledForm,
LoginButton,
Expand Down Expand Up @@ -59,10 +59,6 @@ class Login extends Component {
onChange={this.handlePassword}
/>
</FormItem>
{/* <FormItem>
<Checkbox>Remember me</Checkbox>
<Forgot><a href="">Forgot password</a></Forgot>
</FormItem> */}
<FormItem>
<LoginButton type="primary" htmlType="submit">
Sign In
Expand Down
2 changes: 0 additions & 2 deletions src/views/login/login.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import styled from "styled-components";
import { Form, Button } from 'antd';
import { Link } from "react-router-dom";

const FormItem = Form.Item;

export const LoginPage = styled.div`
margin-left: 35%;
margin-right: 35%;
Expand Down