Added fixed some css and made new additions

Css was changed such that the list looks more standard.
Added Project Website button if the project has one.
Theater was added to page
This commit is contained in:
Camerin 2021-09-17 18:43:00 -04:00
parent 5e0a4ad96b
commit a910d63127
3 changed files with 63 additions and 23 deletions

View File

@ -2,6 +2,8 @@ import React from 'react';
import { connect } from 'react-redux';
import './css/Github.css';
import {getRepos} from '../actions';
import Theater from './Theater';
import space from '../img/space.webp';
class Github extends React.Component {
@ -17,10 +19,17 @@ class Github extends React.Component {
console.log(repo);
return (
<a className="repo" href={repo.html_url}>
<div className="title">{repo.name}</div>
<div className="repo">
<a href={repo.html_url} target="_blank" rel="noreferrer" className="title">{repo.name}</a>
<div className="content">
<p className="description">{repo.description ? repo.description : "No Description"}</p>
</a>
{
repo.homepage ?
<a href={repo.homepage} target="_blank" rel="noreferrer" className="website"> Project Website </a>:
""
}
</div>
</div>
);
});
@ -33,7 +42,15 @@ class Github extends React.Component {
render() {
return (
<div className="Github">
<h1>Github</h1>
<Theater
title="Github"
description="This is a list of projects that I've uploaded to github.
You can check them out, fork them, and maybe give them a
star. Any projects that have a website will have a button
that will bring you right to the site"
background={space}
peak
/>
<div>
{this.renderRepos()}
</div>

View File

@ -1,14 +1,3 @@
.repo {
display: flex;
flex-direction: column;
background-color: #DDDCDC;
border-radius: 10px;
align-items: center;
margin-top: 10px;
}
.repo-list {
display:flex;
flex-direction: column;
@ -17,16 +6,50 @@
margin-right: auto;
}
.repo {
border-top-style: solid;
border-top-color: #A4A4A1;
border-top-width:2px;
display: flex;
flex-direction: column;
align-items: left;
margin-top: 10px;
}
.repo .title {
background-color: gray;
width:100%;
margin-top: 10px;
color: #3A4ADC;
font-weight:bold;
width:fit-content;
width:-moz-fit-content;
text-align:start;
padding:5px;
border-radius: 3px;
}
.repo .title:hover {
color: black;
}
.repo .content {
display:flex;
flex-direction: row;
align-items:center;
}
.repo .website {
height:fit-content;
height: -moz-fit-content;
background-color: #5A5A5C;
color: white;
border-radius: 10px;
padding:10px;
align-items:center;
text-align: center;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding-top:5px;
padding-bottom:5px;
width: 58px;
}
.repo .description {
flex-grow: 1;
padding:10px;
}

BIN
src/img/space.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 KiB