css responsive
This commit is contained in:
		| @@ -16,12 +16,37 @@ $(".sport").on("click", function() { | ||||
|     } | ||||
|  | ||||
|     $(this).trigger("selected", [selectedSports.includes(sportName), selectedSports]) // Trigger event | ||||
|     showFeeds() | ||||
| }) | ||||
|  | ||||
| function getCSSVariable(name) { | ||||
|     return getComputedStyle(root).getPropertyValue(name) | ||||
| } | ||||
|  | ||||
|  | ||||
| function showFeeds() { | ||||
|     if ($(window).width() < 1280) { | ||||
|         if (selectedSports.length === 0) { | ||||
|             $(".leftcol").show() | ||||
|             $(".centercol").hide() | ||||
|         } else { | ||||
|             $(".leftcol").hide() | ||||
|             $(".centercol").show() | ||||
|         } | ||||
|     } else { | ||||
|         $(".leftcol").show() | ||||
|         $(".centercol").show() | ||||
|     } | ||||
| } | ||||
|  | ||||
| $(window).on("resize", function(){ | ||||
|     showFeeds() | ||||
| }); | ||||
|  | ||||
| $(window).on("load", function() { | ||||
|     showFeeds() | ||||
| }) | ||||
|  | ||||
| function tweetCell(tweet, parent) { | ||||
|     var cell = document.createElement("div"); | ||||
|     cell.innerHTML = | ||||
| @@ -52,56 +77,55 @@ function tweetCell(tweet, parent) { | ||||
|     parent.append(cell); | ||||
| } | ||||
|  | ||||
|  | ||||
| var atweet = { | ||||
|     "created_at": "Sat Nov 16 12:51:41 +0000 2019", | ||||
|     "text": "@BobGreenburg @ONeill_Coffee Congrats to the excellent football program at Wilmington. One classy organization!", | ||||
|     "source": "<a href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\">Twitter for iPhone<\/a>", | ||||
|     "user": { | ||||
|         "name": "Express Youngstown", | ||||
|         "screen_name": "ExpressProsYO", | ||||
|         "url": "http:\/\/apply.expresspros.com\/", | ||||
|         "profile_image_url": "http:\/\/pbs.twimg.com\/profile_images\/775167844921188353\/fWquHsOK_normal.jpg", | ||||
|     }, | ||||
|     "quote_count": 0, | ||||
|     "reply_count": 0, | ||||
|     "retweet_count": 0, | ||||
|     "favorite_count": 0, | ||||
|     "entities": { | ||||
|         "hashtags": [ | ||||
|  | ||||
|         ], | ||||
|         "urls": [ | ||||
|  | ||||
|         ], | ||||
|         "user_mentions": [ | ||||
|             { | ||||
|                 "screen_name": "BobGreenburg", | ||||
|                 "name": "Bob Greenburg", | ||||
|                 "id": 483881032, | ||||
|                 "id_str": "483881032", | ||||
|                 "indices": [ | ||||
|                     0, | ||||
|                     13 | ||||
|                 ] | ||||
|             }, | ||||
|             { | ||||
|                 "screen_name": "ONeill_Coffee", | ||||
|                 "name": "O'NeillCoffeeCompany", | ||||
|                 "id": 2804543925, | ||||
|                 "id_str": "2804543925", | ||||
|                 "indices": [ | ||||
|                     14, | ||||
|                     28 | ||||
|                 ] | ||||
|             } | ||||
|         ], | ||||
|         "symbols": [ | ||||
|  | ||||
|         ] | ||||
|     }, | ||||
| } | ||||
|  | ||||
| for (let i = 0; i < 2; i++) { | ||||
|     tweetCell(atweet, $(".leftcol")); | ||||
| } | ||||
| } | ||||
|  | ||||
|     var atweet = { | ||||
|         "created_at": "Sat Nov 16 12:51:41 +0000 2019", | ||||
|         "text": "@BobGreenburg @ONeill_Coffee Congrats to the excellent football program at Wilmington. One classy organization!", | ||||
|         "source": "<a href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\">Twitter for iPhone<\/a>", | ||||
|         "user": { | ||||
|             "name": "Express Youngstown", | ||||
|             "screen_name": "ExpressProsYO", | ||||
|             "url": "http:\/\/apply.expresspros.com\/", | ||||
|             "profile_image_url": "http:\/\/pbs.twimg.com\/profile_images\/775167844921188353\/fWquHsOK_normal.jpg", | ||||
|         }, | ||||
|         "quote_count": 0, | ||||
|         "reply_count": 0, | ||||
|         "retweet_count": 0, | ||||
|         "favorite_count": 0, | ||||
|         "entities": { | ||||
|             "hashtags": [ | ||||
|      | ||||
|             ], | ||||
|             "urls": [ | ||||
|      | ||||
|             ], | ||||
|             "user_mentions": [ | ||||
|                 { | ||||
|                     "screen_name": "BobGreenburg", | ||||
|                     "name": "Bob Greenburg", | ||||
|                     "id": 483881032, | ||||
|                     "id_str": "483881032", | ||||
|                     "indices": [ | ||||
|                         0, | ||||
|                         13 | ||||
|                     ] | ||||
|                 }, | ||||
|                 { | ||||
|                     "screen_name": "ONeill_Coffee", | ||||
|                     "name": "O'NeillCoffeeCompany", | ||||
|                     "id": 2804543925, | ||||
|                     "id_str": "2804543925", | ||||
|                     "indices": [ | ||||
|                         14, | ||||
|                         28 | ||||
|                     ] | ||||
|                 } | ||||
|             ], | ||||
|             "symbols": [ | ||||
|      | ||||
|             ] | ||||
|         }, | ||||
|     } | ||||
		Reference in New Issue
	
	Block a user
	 Tim Wijma
					Tim Wijma