Skip to content

Instantly share code, notes, and snippets.

View gate5th's full-sized avatar

Michael Bruns gate5th

View GitHub Profile
@gate5th
gate5th / commandLine
Created September 12, 2018 16:47
oldschoolshuffle
npm install -g create-react-app
create-react-app oldschoolshuffle
git init
@gate5th
gate5th / commandLine
Last active September 12, 2018 16:48
oldschoolshuffle
npx create-react-app oldschoolshuffle
@gate5th
gate5th / index.js
Created September 12, 2018 16:48
oldschoolshuffle
//index.js
import App from './App' --------------> import App from './components/App';
@gate5th
gate5th / App.js
Created September 12, 2018 16:49
oldschoolshuffle
//in App.js
render(){
return (
<div className="App">
<header className="App-header">
Old School Shuffle
</header>
<div className="featuredPost">
<p>Featured post here</p>
@gate5th
gate5th / App.js
Created September 12, 2018 16:55
oldschoolshuffle
//in App.js
render(){
return (
<div className="App">
<header className="App-header">
Old School Shuffle
</header>
<div className="featuredPost">
<p>Featured post here</p>
@gate5th
gate5th / App.css
Created September 12, 2018 16:56
oldschoolshuffle
/*App.css*/
.App {
margin: auto;
padding-left: 50px;
padding-right: 50px;
text-align: center;
display: grid; /* Sets the element to grid mode */
grid-template-columns: 2fr 1fr; /* We want 2 columns, with the first column 2/3 of the space */
grid-column-gap: 20px; /* give us 20px margin between columns */
@gate5th
gate5th / commandLine
Created September 12, 2018 16:58
oldschoolshuffle
//on the command line
npm install --save @material-ui/core
@gate5th
gate5th / index.html
Created September 12, 2018 16:59
oldschoolshuffle
<!-- add Roboto font to /public/index.html -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
@gate5th
gate5th / FeaturedPost.js
Created September 12, 2018 17:00
oldschoolshuffle
//FeaturedPost.js
import React, { Component } from 'react';
import './FeaturedPost.css';
import Typography from '@material-ui/core/Typography';
import Paper from '@material-ui/core/Paper';
class FeaturedPost extends Component {
@gate5th
gate5th / FeaturedPost.css
Created September 12, 2018 17:38
oldschoolshuffle
/* FeaturedPost.css */
.FeaturedPost {
height: 100%;
display: flex; /* Flex is more flexible than CSS Grid and better for smaller components */
align-items: flex-start;
}
.content {
padding: 10px;