From 95e994e7f92c3d5c333e71870cd1dae438596a4f Mon Sep 17 00:00:00 2001 From: Renata Estes Date: Fri, 6 Oct 2017 21:05:10 -0500 Subject: [PATCH 1/3] twitter --- public/App.js | 8 ++++++-- public/Follow.js | 3 +++ public/Header.js | 11 +++++++++++ public/Main.js | 12 ++++++++++-- public/Profile.js | 4 ++++ public/Trends.js | 4 ++++ public/Tweets.js | 4 ++++ public/index.html | 29 +++++++++++++++++++---------- src/index.css | 9 +++++++++ 9 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 public/Follow.js create mode 100644 public/Header.js create mode 100644 public/Profile.js create mode 100644 public/Trends.js create mode 100644 public/Tweets.js diff --git a/public/App.js b/public/App.js index a46a147..9b8fde2 100644 --- a/public/App.js +++ b/public/App.js @@ -1,3 +1,7 @@ function App(){ - return
-} \ No newline at end of file + return ( +
+
+
+ ) +} diff --git a/public/Follow.js b/public/Follow.js new file mode 100644 index 0000000..7e84c42 --- /dev/null +++ b/public/Follow.js @@ -0,0 +1,3 @@ +function Follow(){ + return

Follow Me!

+} diff --git a/public/Header.js b/public/Header.js new file mode 100644 index 0000000..d8731b4 --- /dev/null +++ b/public/Header.js @@ -0,0 +1,11 @@ +function Header(){ + var myvar = "The Header/Navbar"; + + return ( +
+

+ {myvar} +

+
+ ) +} diff --git a/public/Main.js b/public/Main.js index cb7c512..8ca20e0 100644 --- a/public/Main.js +++ b/public/Main.js @@ -1,3 +1,11 @@ function Main(){ - return
Hello
-} \ No newline at end of file + return ( +
+
+
+
+
+
+
+ ) +} diff --git a/public/Profile.js b/public/Profile.js new file mode 100644 index 0000000..b70d272 --- /dev/null +++ b/public/Profile.js @@ -0,0 +1,4 @@ +function Profile(){ + return

My Profile @TwitterClone

+ +} diff --git a/public/Trends.js b/public/Trends.js new file mode 100644 index 0000000..3496b06 --- /dev/null +++ b/public/Trends.js @@ -0,0 +1,4 @@ +function Trends(){ + return

What's Trending?

+ +} diff --git a/public/Tweets.js b/public/Tweets.js new file mode 100644 index 0000000..7ac9e7c --- /dev/null +++ b/public/Tweets.js @@ -0,0 +1,4 @@ +function Tweets(){ + return

My Twitter Feed

+ +} diff --git a/public/index.html b/public/index.html index 460ce2f..7c34af1 100644 --- a/public/index.html +++ b/public/index.html @@ -27,24 +27,26 @@ "I just saw a movie that changed my life", "shirts are 50% of at Macy's today" ]; - + - --> + + - + + + + + + + + diff --git a/src/index.css b/src/index.css index b4cc725..827f759 100644 --- a/src/index.css +++ b/src/index.css @@ -3,3 +3,12 @@ body { padding: 0; font-family: sans-serif; } + +.border { + border-style: solid; + border-color: red; +} + +h3 { + background-color: blue; +} From 6594ee800d54887905c85ed8be949c2021aa346b Mon Sep 17 00:00:00 2001 From: Renata Estes Date: Fri, 6 Oct 2017 23:59:08 -0500 Subject: [PATCH 2/3] 7 components --- public/LiveVideo.js | 4 ++++ public/Main.js | 2 ++ public/PostTweets.js | 4 ++++ public/index.html | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 public/LiveVideo.js create mode 100644 public/PostTweets.js diff --git a/public/LiveVideo.js b/public/LiveVideo.js new file mode 100644 index 0000000..aa089e0 --- /dev/null +++ b/public/LiveVideo.js @@ -0,0 +1,4 @@ +function LiveVideo(){ + return

Live Videos Here

+ +} diff --git a/public/Main.js b/public/Main.js index 8ca20e0..f208eea 100644 --- a/public/Main.js +++ b/public/Main.js @@ -3,9 +3,11 @@ function Main(){
+
+
) } diff --git a/public/PostTweets.js b/public/PostTweets.js new file mode 100644 index 0000000..6cb3538 --- /dev/null +++ b/public/PostTweets.js @@ -0,0 +1,4 @@ +function PostTweets(){ + return

Type a Tweet Here

+ +} diff --git a/public/index.html b/public/index.html index 7c34af1..9f5dc2c 100644 --- a/public/index.html +++ b/public/index.html @@ -46,7 +46,7 @@ ); --> - + + + From 3af1ef23d5ed0d85962eea2bd95c887b7d17405a Mon Sep 17 00:00:00 2001 From: Renata Estes Date: Mon, 9 Oct 2017 20:00:35 -0500 Subject: [PATCH 3/3] new saves --- public/Main.js | 25 +++++++++++++++++-------- public/PostTweets.js | 23 +++++++++++++++++++++-- public/Tweets.js | 16 ++++++++++++++++ public/index.js | 6 ++++-- src/App.js | 7 +++++-- src/index.css | 42 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 105 insertions(+), 14 deletions(-) diff --git a/public/Main.js b/public/Main.js index f208eea..b32378e 100644 --- a/public/Main.js +++ b/public/Main.js @@ -1,13 +1,22 @@ -function Main(){ +function Main(props){ + let mydiv =
+ [].push(
); + + let mydivs = props.tweets.map((item) => { + return
{item}
+ }); + + return (
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {mydivs}
) } diff --git a/public/PostTweets.js b/public/PostTweets.js index 6cb3538..8ede0e8 100644 --- a/public/PostTweets.js +++ b/public/PostTweets.js @@ -1,4 +1,23 @@ -function PostTweets(){ - return

Type a Tweet Here

+class PostTweets extends React.component{ +constructor(){ + super(); + this.state={ + theword:"" + } +} + +render(){ + function hello(){ + console.log("hello") + } + return ( +

+ { + this.setState({theword:e.target.value}); + }} /> + +

+ ) + } } diff --git a/public/Tweets.js b/public/Tweets.js index 7ac9e7c..4c8802c 100644 --- a/public/Tweets.js +++ b/public/Tweets.js @@ -2,3 +2,19 @@ function Tweets(){ return

My Twitter Feed

} + + + + diff --git a/public/index.js b/public/index.js index 2457755..306c22a 100644 --- a/public/index.js +++ b/public/index.js @@ -1,4 +1,6 @@ +console.log(tweets); + ReactDOM.render( - , + , document.getElementById('root')//there has to be a starting point for where to put your element -); \ No newline at end of file +); diff --git a/src/App.js b/src/App.js index d7bd2a7..85af5f4 100644 --- a/src/App.js +++ b/src/App.js @@ -2,10 +2,13 @@ import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; -function App(){ +function App(props){ + +console.log(props.mytweets); + return (
- +
); } diff --git a/src/index.css b/src/index.css index 827f759..2484999 100644 --- a/src/index.css +++ b/src/index.css @@ -12,3 +12,45 @@ body { h3 { background-color: blue; } + +/*.header{ + height: 20px; + width: 100%; + background-color: red; +} + +.profile { + height: 200px; + width: 50%; + background-color: orange; +} + +.posttweets{ + height: 200px; + width: 50%; + background-color: yellow; +} + +.tweets{ + height: 200px; + width: 50%; + background-color: green; +} + +.trends{ + height: 200px; + width: 50%; + background-color: blue; +} + +.follow{ + height: 200px; + width: 50%; + background-color: purple; +} + +.livevideo{ + height: 200px; + width: 50%; + background-color: pink; +}*/