Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected some ui of the front page #178

Open
wants to merge 1 commit into
base: master
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
16 changes: 15 additions & 1 deletion src/components/CategoryList/CategoryList.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#categories{
padding: 20px;
padding: 10px 0 10px 0;
font-size: 20px;
font-weight: 800;
background:#f4f4f4
Expand All @@ -11,6 +11,16 @@
#categories .ant-col span a{
color: gray;
}
#categories .ant-col a span{
color: gray;
font-size: 20px;
font-weight: 800;
}
#categories .ant-dropdown-menu-item {
color: gray;
font-size: 20px;
font-weight: 800;
}
#categories .ant-col {
transition: all 0.5s;
padding: 5px;
Expand All @@ -23,4 +33,8 @@ background: rgba(0, 0, 0, 0.1)
padding: 0;
font-size: 8px;
}
#categories .ant-col a span{
padding: 0;
font-size: 8px;
}
}
30 changes: 23 additions & 7 deletions src/components/CategoryList/CategoryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connect } from "react-redux";
import { Link } from 'react-router-dom';
import 'antd/dist/antd.css';
import './CategoryList.css'
import {Col,Row,Icon, notification } from "antd";
import {Col,Row,Icon, notification,Menu,Dropdown } from "antd";

import { getAllCategories } from "../../redux/actions/categoryServiceActions";

Expand All @@ -29,7 +29,7 @@ class CategoryList extends Component {
}
render() {
const menu =
this.props.categoryService.categories.slice(0,6).map(category=>{
this.props.categoryService.categories.slice(0,5).map(category=>{
return(
<Col xs={8} md={8} lg={4}>
<Icon type="file-sync" />
Expand All @@ -38,15 +38,31 @@ class CategoryList extends Component {
)
}
)
const categoryList=
<Menu>
{ this.props.categoryService.categories.map(category=>{
return(
<Menu.Item>
<Icon type="file-sync" />
<span><Link to={`/categoryWiseServices/${category.name}`} style={{color:"gray",padding:"2px 5px 2px 5px"}}>{category.name}</Link></span>
</Menu.Item>
)
}
)}
</Menu>
return (
<Row id="categories">
{/* <Dropdown overlay={menu} style={{padding:"10px"}}>
<a href="#">
<span style={{background:"white",color:"black",textTransform:"capitalize",letterSpacing:"2px",fontSize:"15px",padding:"5px"}}>See all Categories <Icon type="down" />
{menu}
<Col xs={8} md={8} lg={4}>
<Dropdown overlay={categoryList} style={{padding:"10px"}} trigger={['click']}>

<a href="#d">
<span>Categories<Icon type="down" />
</span>
</a>
</Dropdown> */}
{menu}
</Dropdown>
</Col>

</Row>
)
}
Expand Down
8 changes: 7 additions & 1 deletion src/components/Navbar/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
background-color: inherit !important;
border: none;
}
#navbar .ant-menu-item{
border: none;
}
#navbar .ant-menu-item:hover{
border: none;
}
Expand All @@ -34,7 +37,6 @@
.right {
float: right;
font-size: 14px;
margin-right: 7px;
}

.left {
Expand All @@ -52,3 +54,7 @@
font-size: 20px !important;
}
}
footer {
background: black;
color: white;
}
3 changes: 2 additions & 1 deletion src/components/Navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import TopServices from "../topServices/topServices";
import NewlyAddedService from '../NewlyAddedService/NewlyAddedService';
import PageHeader from '../PageHeader/PageHeader';

const { Header, Content } = Layout;
const { Header, Content, Footer } = Layout;

class Navbar extends Component {
static propTypes = {
Expand Down Expand Up @@ -113,6 +113,7 @@ class Navbar extends Component {
</Switch>
</Content>
</Layout>
<Footer style={{background:"black",color:"white",height:"100px"}}>Ant Design ©2018 Created by Ant UED</Footer>
</Layout>
</Router>
);
Expand Down
5 changes: 5 additions & 0 deletions src/components/PageHeader/PageHeader.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@
}
#pageHeader .ant-input-search {
margin: 40px 0 0 0 ;
}
@media(max-width:370px){
#pageHeader h1{
font-size: 40px;
}
}
7 changes: 5 additions & 2 deletions src/components/Tables/Tables.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ height: 600px;
}
#tables .imageBox , #tables .descBox{
font-size: 15px;
font-weight: 900;
}
#tables .descBox{
font-size: 20px;
Expand All @@ -29,6 +30,8 @@ height: 600px;

}
#tables .imageBox img{
width: 100px;
height: 100px;
width: 70px;
height: 70px;
padding: 5px 0 ;

}
2 changes: 1 addition & 1 deletion src/components/Tables/Tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import './Tables.css';
export default function Tables(props){
let list = null
if(props.status === "done"){
list = props.services.services.map(service=>{
list = props.services.services.slice(0,5).map(service=>{
return (
<Row className="tableBox">
<Col xs={10} sm={10} md={6} lg={6} className="imageBox">
Expand Down
2 changes: 1 addition & 1 deletion src/components/topServices/topServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ this.props.getAllServices();
render() {
const {services,status} = this.props;
if(status === "done"){
const serviceList = services.services.map(service=>{
const serviceList = services.services.slice(0,8).map(service=>{
return(
<Link to={`service/${service._id}`}>
<Col xs={24} md={8} lg={6} style={{padding:"30px"}}>
Expand Down