Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Main Page Begins #21

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
14,528 changes: 14,528 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@
}
},
"dependencies": {
"@types/material-ui": "^0.21.1",
"@types/prop-types": "^15.5.2",
"canvas": "^1.6.9",
"glamor": "^2.20.40",
"glamorous": "^4.11.4",
"material-ui": "^1.0.0-beta.43",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-router-dom": "^4.2.2",
Expand Down
39 changes: 21 additions & 18 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
<html lang="en" style="max-width:100%; overflow-x:hidden;">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are adding these attributes to the html and body tags?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a fix I found online to prevent horizontal scrolling!


<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -19,14 +20,15 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
<title>React App</title>
</head>

<body style="max-width:100%; overflow-x:hidden;">
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

Expand All @@ -36,5 +38,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</body>

</html>
11 changes: 11 additions & 0 deletions src/Home/CircleButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import glamorous from 'glamorous';

const CircleButton = glamorous.button({
borderRadius: '50%',
backgroundColor: 'black',
width: '4vw',
height: '4vw',
padding: 3,
});

export default CircleButton;
30 changes: 30 additions & 0 deletions src/Home/Home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
*:focus {
outline: none !important;
}

#searchBar {
background-color: transparent;
height: 65px;
width: 100%;
font-size: 1.875rem;
font-weight: 300;
border-color: black;
border-width: 1px;
padding: 10px;
}

nav {
display: flex;
justify-content: flex-end;
font-size: 1.5em;
}

#titleText {
margin-right: auto;
}

.buttonGroup {
display: grid;
grid-template-columns: 4fr 4fr 4fr;
grid-column-gap: 0.5em;
}
43 changes: 42 additions & 1 deletion src/Home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
import * as React from 'react';
import glamorous from 'glamorous';
import './Home.css';
const { Div } = glamorous;
import PageCard from './PageCard';
import CircleButton from './CircleButton';
import Grid from 'material-ui/Grid';

const Home = () => <h1>Home Page</h1>;
class Home extends React.Component {
render() {
return (
<Div margin="5px auto" padding="20px" width="100%">
<Grid container spacing={24}>
<Grid item>
<nav>
<h1 id="titleText"> panel.uclaradio.com: links </h1>
<Div className="buttonGroup">
<CircleButton />
<CircleButton />
<CircleButton />
</Div>
</nav>

<Div id="search" display="flex" justifyContent="center">
<Div id="searchPadding" width={600} padding="30px">
<input placeholder="Search" type="text" id="searchBar" />
</Div>
</Div>
</Grid>

<Grid item sm={4}>
<PageCard />
</Grid>
<Grid item sm={4}>
<PageCard />
</Grid>
<Grid item sm={4}>
<PageCard />
</Grid>
</Grid>
</Div>
);
}
}

export default Home;
56 changes: 56 additions & 0 deletions src/Home/PageCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import * as React from 'react';
import * as PropTypes from 'prop-types';
import Card, { CardActions, CardContent, CardMedia } from 'material-ui/Card';
import Button from 'material-ui/Button';
import Typography from 'material-ui/Typography';

// const PageCard = glamorous.div({
// width: 380,
// height: 250,
// backgroundColor: 'rgba(255, 255, 255, 0.8)',
// maxWidth: 380,
// margin: '0 auto 30px',
// });

const styles = {
card: {
maxWidth: 345,
},

media: {
height: 0,
paddingTop: '56.25%', //16:9
},
};

function PageCard(props: any) {
const { classes } = props;
return (
<div>
<Card className={classes.card}>
<CardMedia className={classes.media} image="https://bzfd.it/2qMzcaE" />
<CardContent>
<Typography gutterBottom variant="headline" component="h2">
Tickets & Press Request Form
</Typography>

<Typography component="p">
Want to go to a show for free? Fill this out.
</Typography>
</CardContent>

<CardActions>
<Button size="small" color="primary">
I SAID GO!!!
</Button>
</CardActions>
</Card>
</div>
);
}

PageCard.propTypes = {
classes: PropTypes.object.isRequired,
};

export default PageCard;
8 changes: 8 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ReactDOM from 'react-dom';

import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();