diff options
| author | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-23 22:48:56 +0500 |
|---|---|---|
| committer | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-23 22:48:56 +0500 |
| commit | 2ff09ab821cafefff55ebe768c48343352ef7cd3 (patch) | |
| tree | 3d8e61ddb2fbf41957b7c3674ef225ccdbbdf9fa /src | |
| parent | Repository grid component (diff) | |
| download | githunt-2ff09ab821cafefff55ebe768c48343352ef7cd3.tar.gz | |
Grid refactoring
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/repository-grid/grid-item/index.js | 4 | ||||
| -rw-r--r-- | src/components/repository-grid/grid-item/styles.css | 36 | ||||
| -rw-r--r-- | src/components/repository-list/index.js | 32 | ||||
| -rw-r--r-- | src/components/repository-list/list-item/index.js | 38 | ||||
| -rw-r--r-- | src/components/repository-list/list-item/styles.css | 0 | ||||
| -rw-r--r-- | src/containers/feed/index.js | 3 | ||||
| -rw-r--r-- | src/containers/feed/styles.css | 4 |
7 files changed, 78 insertions, 39 deletions
diff --git a/src/components/repository-grid/grid-item/index.js b/src/components/repository-grid/grid-item/index.js index dac236d..b3a850b 100644 --- a/src/components/repository-grid/grid-item/index.js +++ b/src/components/repository-grid/grid-item/index.js @@ -5,8 +5,8 @@ import './styles.css'; class GridItem extends React.Component { render() { return ( - <div className="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12 repository-container"> - <div className="repository-body"> + <div className="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12 grid-item-container"> + <div className="grid-item-body"> <div className="author-header clearfix"> <a href="#"> <div className="author-img"> diff --git a/src/components/repository-grid/grid-item/styles.css b/src/components/repository-grid/grid-item/styles.css index c6ade83..8cf6265 100644 --- a/src/components/repository-grid/grid-item/styles.css +++ b/src/components/repository-grid/grid-item/styles.css @@ -1,9 +1,9 @@ -.repository-container { +.grid-item-container { padding: 10px; transition: all 0.3s ease; } -.repository-body { +.grid-item-body { background: white; padding: 20px; border-radius: 10px; @@ -11,11 +11,11 @@ height: 270px; } -.author-details { +.grid-item-container .author-details { margin-bottom: 20px; } -.author-img img { +.grid-item-container .author-img img { width: 35px; height: 35px; object-fit: cover; @@ -24,59 +24,59 @@ margin-right: 15px; } -.author-details h5 { +.grid-item-container .author-details h5 { margin-bottom: 2px; font-weight: 600; color: #6c7583; font-size: 14px; } -.author-details a { +.grid-item-container .author-details a { color: #6c7583; } -.author-details p { +.grid-item-container .author-details p { margin-bottom: 0; font-size: 12px; } -.author-header, .repo-header, .repo-body { +.grid-item-container .author-header, .repo-header, .repo-body { margin-bottom: 15px; } -.author-header a { +.grid-item-container .author-header a { text-decoration: none; } -.repo-header h5 { +.grid-item-container .repo-header h5 { font-size: 19px; margin-bottom: 5px; } -.repo-header p { +.grid-item-container .repo-header p { margin-bottom: 0; } -.repo-header a { +.grid-item-container .repo-header a { color: black; text-decoration: none; } -.author-name { +.grid-item-container .author-name { font-weight: 400; } -.repo-name { +.grid-item-container .repo-name { font-weight: 700; } -.repo-body p { +.grid-item-container .repo-body p { font-size: 14px; margin-bottom: 0; color: #6e7583; } -.repo-footer { +.grid-item-container .repo-footer { font-size: 12px; position: absolute; bottom: 15px; @@ -86,13 +86,13 @@ padding: 10px; } -.repo-footer a { +.grid-item-container .repo-footer a { text-decoration: none; color: #000000; font-weight: 500; } -.repo-footer a svg { +.grid-item-container .repo-footer a svg { position: relative; top: -2px; margin-right: 5px; diff --git a/src/components/repository-list/index.js b/src/components/repository-list/index.js index dada59b..4866094 100644 --- a/src/components/repository-list/index.js +++ b/src/components/repository-list/index.js @@ -1,20 +1,20 @@ import React from 'react'; -import GridItem from './grid-item'; +import ListItem from './list-item'; class RepositoryList extends React.Component { render() { return ( <div className="repositories-grid"> <div className="row grid-container"> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> </div> <div className="row row-group"> <div className="group-heading"> @@ -24,12 +24,12 @@ class RepositoryList extends React.Component { </div> </div> <div className="row grid-container"> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> - <GridItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> + <ListItem/> </div> </div> ); diff --git a/src/components/repository-list/list-item/index.js b/src/components/repository-list/list-item/index.js new file mode 100644 index 0000000..3d39eec --- /dev/null +++ b/src/components/repository-list/list-item/index.js @@ -0,0 +1,38 @@ +import React from 'react'; + +import './styles.css'; + +class ListItem extends React.Component { + render() { + return ( + <div className="col-12"> + <h3><a href="#"><span className="text-normal">ValveSoftware / </span>Proton</a></h3> + <p className="text-muted">Compatibility tool for Steam Play based on Wine and additional components</p> + + <div className='list-item-footer'> + <a href="#"> + <svg aria-label="star" className="octicon octicon-star" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img"> + <path fillRule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path> + </svg> + 3,087 + </a> + + <a href="#"> + <svg aria-label="fork" className="octicon octicon-repo-forked" viewBox="0 0 10 16" version="1.1" width="10" height="16" role="img"> + <path fillRule="evenodd" + d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path> + </svg> + 65 + </a> + + <span> + Built by + <a href="/nanonyme"><img src="https://avatars0.githubusercontent.com/u/4921183?s=460&v=4" width="20" height="20"/></a> + </span> + </div> + </div> + ); + } +} + +export default ListItem; diff --git a/src/components/repository-list/list-item/styles.css b/src/components/repository-list/list-item/styles.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/components/repository-list/list-item/styles.css diff --git a/src/containers/feed/index.js b/src/containers/feed/index.js index bb0bff4..869fc8a 100644 --- a/src/containers/feed/index.js +++ b/src/containers/feed/index.js @@ -5,6 +5,7 @@ import TopNav from '../../components/top-nav'; import Filters from '../../components/filters'; import GridItem from '../../components/repository-grid/grid-item'; import RepositoryGrid from '../../components/repository-grid'; +import RepositoryList from '../../components/repository-list'; class FeedContainer extends React.Component { render() { @@ -22,7 +23,7 @@ class FeedContainer extends React.Component { </div> </div> <div className="body-row"> - <RepositoryGrid/> + <RepositoryList/> </div> </div> </div> diff --git a/src/containers/feed/styles.css b/src/containers/feed/styles.css index 491517c..6e7c61a 100644 --- a/src/containers/feed/styles.css +++ b/src/containers/feed/styles.css @@ -23,11 +23,11 @@ margin-top: 20px; } -.grid-container:hover .repository-container { +.grid-container:hover .grid-item-container { opacity: 0.5; } -.grid-container .repository-container:hover { +.grid-container .grid-item-container:hover { opacity: 1; z-index: 2; } |
