summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamran Ahmed <kamranahmed.se@gmail.com>2018-08-24 09:01:00 +0500
committerKamran Ahmed <kamranahmed.se@gmail.com>2018-08-24 09:01:00 +0500
commit5b515917a1c0ac52fa8cc584137285a9309301a3 (patch)
tree1ad36704fe0b65f0b58b23533abe75421859c6e9
parentGrid refactoring (diff)
downloadgithunt-5b515917a1c0ac52fa8cc584137285a9309301a3.tar.gz
Add list view for repositories
-rw-r--r--src/components/repository-list/index.js8
-rw-r--r--src/components/repository-list/list-item/index.js64
-rw-r--r--src/components/repository-list/list-item/styles.css68
-rw-r--r--src/components/repository-list/styles.css6
-rw-r--r--src/containers/feed/index.js2
-rw-r--r--src/containers/feed/styles.css14
6 files changed, 124 insertions, 38 deletions
diff --git a/src/components/repository-list/index.js b/src/components/repository-list/index.js
index 4866094..5742ef7 100644
--- a/src/components/repository-list/index.js
+++ b/src/components/repository-list/index.js
@@ -1,11 +1,13 @@
import React from 'react';
import ListItem from './list-item';
+import './styles.css';
+
class RepositoryList extends React.Component {
render() {
return (
- <div className="repositories-grid">
- <div className="row grid-container">
+ <div className="repositories-list">
+ <div className="row list-container">
<ListItem/>
<ListItem/>
<ListItem/>
@@ -23,7 +25,7 @@ class RepositoryList extends React.Component {
</div>
</div>
</div>
- <div className="row grid-container">
+ <div className="row list-container">
<ListItem/>
<ListItem/>
<ListItem/>
diff --git a/src/components/repository-list/list-item/index.js b/src/components/repository-list/list-item/index.js
index 3d39eec..1482ad9 100644
--- a/src/components/repository-list/list-item/index.js
+++ b/src/components/repository-list/list-item/index.js
@@ -5,31 +5,47 @@ 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 className="col-12 list-item-container">
+ <div className="list-item-body">
+ <div className="repo-header">
+ <h3><a href="#"><span className="text-normal">ValveSoftware / </span>Proton</a></h3>
+ <p className="repo-meta text-muted small">Built by &middot; <a href="#">kamranahmedse</a> &middot; July 12, 2018</p>
+ </div>
+ <div className="repo-body">
+ <p>Create React apps with no build configuration</p>
+ </div>
+ <div className="repo-footer">
+ <span className="d-inline-block mr-3">
+ <span className="repo-language-color ml-0"></span>
+ <span itemProp="programmingLanguage">
+ PHP
+ </span>
+ </span>
+ <a className="muted-link d-inline-block mr-3" href="/ValveSoftware/Proton/stargazers">
+ <svg 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"/>
+ </svg>
+ 1,532
+ </a>
+ <a className="muted-link d-inline-block mr-3" href="/ValveSoftware/Proton/network">
+ <svg 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>
+ 30
+ </a>
+ <a className="muted-link d-inline-block mr-3" href="/ValveSoftware/Proton/network">
+ <svg className="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
+ <path fillRule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path>
+ </svg>
+ 55
+ </a>
+ </div>
</div>
+
+ <a href="#" className="author-link">
+ <img className='author-img' src="https://avatars0.githubusercontent.com/u/4921183?s=460&v=4"/>
+ </a>
</div>
);
}
diff --git a/src/components/repository-list/list-item/styles.css b/src/components/repository-list/list-item/styles.css
index e69de29..ff43acd 100644
--- a/src/components/repository-list/list-item/styles.css
+++ b/src/components/repository-list/list-item/styles.css
@@ -0,0 +1,68 @@
+.list-item-container {
+ padding: 0 0 20px;
+ margin-bottom: 20px;
+ border-bottom: 1px solid #e8e8e8;
+ position: relative;
+}
+
+.list-item-container .repo-header h3 {
+ margin-bottom: 4px;
+ font-size: 20px;
+ font-weight: 600;
+}
+
+.list-item-container .repo-header h3 .text-normal {
+ font-weight: 400;
+}
+
+.list-item-container .repo-footer {
+ font-size: 13px;
+}
+
+.list-item-container .repo-header p {
+ margin-bottom: 0;
+}
+
+.list-item-container .repo-header, .list-item-container .repo-body {
+ margin-bottom: 15px;
+}
+
+.list-item-container .repo-body p {
+ margin-bottom: 0;
+}
+
+.list-item-container .repo-footer svg {
+ position: relative;
+ top: -1px;
+ margin-right: 6px;
+ fill: #6c7583;
+}
+
+.list-item-container .repo-meta a {
+ color: currentColor;
+ text-decoration: none;
+ font-weight: 500;
+}
+
+.list-container .list-item-container:last-child {
+ margin-bottom: 0;
+ border-bottom: 0;
+ padding-bottom: 0;
+}
+
+.list-item-container .repo-footer a {
+ color: black;
+ text-decoration: none;
+}
+
+.list-item-container .author-link {
+ position: absolute;
+ top: 15px;
+ right: 15px;
+}
+
+.list-item-container .author-img {
+ height: 92px;
+ width: 92px;
+ border-radius: 92px;
+}
diff --git a/src/components/repository-list/styles.css b/src/components/repository-list/styles.css
new file mode 100644
index 0000000..66a9d54
--- /dev/null
+++ b/src/components/repository-list/styles.css
@@ -0,0 +1,6 @@
+.list-container {
+ background: white;
+ padding: 25px;
+ margin: 25px 0 0;
+ border-radius: 8px;
+}
diff --git a/src/containers/feed/index.js b/src/containers/feed/index.js
index 869fc8a..50951e2 100644
--- a/src/containers/feed/index.js
+++ b/src/containers/feed/index.js
@@ -13,7 +13,7 @@ class FeedContainer extends React.Component {
<div className="page-wrap">
<TopNav/>
- <div className="container mt-4">
+ <div className="container mt-4 mb-5 pb-4">
<div className="header-row clearfix">
<div className="group-heading">
<h4>Today <span className="small text-muted">July 12, 2019</span></h4>
diff --git a/src/containers/feed/styles.css b/src/containers/feed/styles.css
index 6e7c61a..11fbe5d 100644
--- a/src/containers/feed/styles.css
+++ b/src/containers/feed/styles.css
@@ -4,9 +4,12 @@
float: left;
}
+.header-row h4 {
+ margin-top: 15px;
+}
+
.group-heading h4 {
margin-bottom: 0;
- margin-top: 15px;
}
.group-heading .small {
@@ -23,15 +26,6 @@
margin-top: 20px;
}
-.grid-container:hover .grid-item-container {
- opacity: 0.5;
-}
-
-.grid-container .grid-item-container:hover {
- opacity: 1;
- z-index: 2;
-}
-
.row-group {
margin-top: 35px;
}