Merge branch 'main' of github.com:olinpin/twitter-project
This commit is contained in:
		| @@ -62,6 +62,32 @@ | ||||
|             <div class="maintable"> | ||||
|                 <div class="leftcol column"> | ||||
|                     <h1 class="colheader">LATEST CLUCCS</h1> | ||||
|                     <div class="tweetcontainer"> | ||||
|                         <div class="tweet"> | ||||
|                             <img src="https://pbs.twimg.com/profile_images/1158803404656959490/9MKSbW4O_400x400.jpg" alt="" class="tweet-profilepicture"> | ||||
|                             <div class="tweet-content"> | ||||
|                                 <div class="tweet-name"> | ||||
|                                     <span class="tweet-nickname">Tim Wijma</span> | ||||
|                                     <span class="tweet-username">@timwijma</span> | ||||
|                                 </div> | ||||
|                                 <span class="tweet-text">Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus velit maiores non deserunt adipisci dicta quam nobis ad. Iste, unde?</span> | ||||
|                                 <div class="tweet-interactions"> | ||||
|                                     <div class="tweet-interaction tweet-likes"> | ||||
|                                         <span class="material-symbols-outlined">favorite</span> | ||||
|                                         <span>20</span> | ||||
|                                     </div> | ||||
|                                     <div class="tweet-interaction tweet-retweets"> | ||||
|                                         <span class="material-symbols-outlined">repeat</span> | ||||
|                                         <span>20</span> | ||||
|                                     </div> | ||||
|                                     <div class="tweet-interaction tweet-replies"> | ||||
|                                         <span class="material-symbols-outlined">chat_bubble</span> | ||||
|                                         <span>20</span> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 </div> | ||||
|                 <div class="centercol column"> | ||||
|                     <h1 class="colheader">FILTERED CLUCCS</h1> | ||||
|   | ||||
| @@ -25,30 +25,30 @@ function getCSSVariable(name) { | ||||
| function tweetCell(tweet, parent) { | ||||
|     var cell = document.createElement("div"); | ||||
|     cell.innerHTML = | ||||
|         '<div class="tweet">'+ | ||||
|             '<img src="' + tweet.user.profile_image_url + '" alt="" class="tweet-profilepicture">' + | ||||
|             '<div class="tweet-content">' + | ||||
|                 '<div class="tweet-name">'+ | ||||
|                     '<span class="tweet-nickname">'+tweet.user.name+' </span>'+ | ||||
|                     '<span class="tweet-username">@'+tweet.user.screen_name+'</span>'+ | ||||
|                 '</div>'+ | ||||
|                 '<span class="tweet-text">'+tweet.text+'</span>'+ | ||||
|                 '<div class="tweet-interactions">'+ | ||||
|                     '<div class="tweet-interaction tweet-likes">'+ | ||||
|                         '<span class="material-symbols-outlined">favorite</span>'+ | ||||
|                         '<span>'+tweet.favorite_count+'</span>'+ | ||||
|                     '</div>'+ | ||||
|                     '<div class="tweet-interaction tweet-retweets">'+ | ||||
|                         '<span class="material-symbols-outlined">repeat</span>'+ | ||||
|                         '<span>'+tweet.retweet_count+'</span>'+ | ||||
|                     '</div>'+ | ||||
|                     '<div class="tweet-interaction tweet-replies">'+ | ||||
|                         '<span class="material-symbols-outlined">chat_bubble</span>'+ | ||||
|                         '<span>'+tweet.reply_count+'</span>'+ | ||||
|                     '</div>'+ | ||||
|                 '</div>'+ | ||||
|             '</div>'+ | ||||
|         '</div>'; | ||||
|     `<div class="tweet"> | ||||
|         <img src="${tweet.user.profile_image_url}" alt="" class="tweet-profilepicture"> | ||||
|         <div class="tweet-content">  | ||||
|             <div class="tweet-name"> | ||||
|                 <span class="tweet-nickname">${tweet.user.name}</span> | ||||
|                 <span class="tweet-username">@${tweet.user.screen_name}</span> | ||||
|             </div> | ||||
|             <span class="tweet-text">${tweet.text}</span> | ||||
|             <div class="tweet-interactions"> | ||||
|                 <div class="tweet-interaction tweet-likes"> | ||||
|                     <span class="material-symbols-outlined">favorite</span> | ||||
|                     <span>${tweet.favorite_count}</span> | ||||
|                 </div> | ||||
|                 <div class="tweet-interaction tweet-retweets"> | ||||
|                     <span class="material-symbols-outlined">repeat</span> | ||||
|                     <span>${tweet.retweet_count}</span> | ||||
|                 </div> | ||||
|                 <div class="tweet-interaction tweet-replies"> | ||||
|                     <span class="material-symbols-outlined">chat_bubble</span> | ||||
|                     <span>${tweet.reply_count}</span> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div>` | ||||
|     parent.append(cell); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -2,4 +2,7 @@ | ||||
| // Sports = all selected sports, ARRAY | ||||
| $(".sport").on("selected", function(e, selected, sports) { | ||||
|     console.log(selected, sports); | ||||
| }) | ||||
| }) | ||||
| window.addEventListener('DOMContentLoaded', (event) => { | ||||
|     window.sessionStorage.setItem('tweets', JSON.stringify([])); | ||||
| }); | ||||
| @@ -80,6 +80,14 @@ block.fn.tweets = function(config) { | ||||
|  | ||||
|     // register default handler for handling tweet data | ||||
|     this.actions(function(e, tweet){ | ||||
|         tweets = window.sessionStorage.getItem('tweets'); | ||||
|         tweets = JSON.parse(tweets); | ||||
|         tweets.push(tweet); | ||||
|         if(tweets.length >= options.memory) { | ||||
|             tweets.shift(); | ||||
|         } | ||||
|         window.sessionStorage.setItem('tweets', JSON.stringify(tweets)); | ||||
|  | ||||
|         var $item = $('<li class="stream-item"></li>'); | ||||
|  | ||||
|         var $tweet = $('<div class="tweet"></div>'); | ||||
|   | ||||
| @@ -88,19 +88,43 @@ body { | ||||
|  | ||||
| .tweet { | ||||
| 	display: flex; | ||||
| 	background-color: var(--main-dark); | ||||
| 	border-radius: 16px; | ||||
| 	padding: 16px; | ||||
| } | ||||
|  | ||||
| .tweet-profilepicture { | ||||
| 	border-radius: 100%; | ||||
| 	width: 60px; | ||||
| 	height: 60px; | ||||
| 	/* padding: 8px; */ | ||||
| } | ||||
|  | ||||
| .tweet-content { | ||||
| 	padding-left: 16px; | ||||
| } | ||||
|  | ||||
| .tweet-interactions { | ||||
| 	display: flex; | ||||
| 	margin-top: 8px; | ||||
| } | ||||
|  | ||||
| .tweet-interaction { | ||||
| 	display: flex; | ||||
| 	align-items: center; | ||||
| 	margin-right: 32px; | ||||
| } | ||||
|  | ||||
| .tweet-interaction .material-symbols-outlined { | ||||
| 	margin-right: 4px; | ||||
| } | ||||
|  | ||||
| .tweet-nickname { | ||||
| 	font-weight: bold; | ||||
| } | ||||
|  | ||||
| .tweet-username { | ||||
| 	opacity: 0.8; | ||||
| } | ||||
|  | ||||
| .filters-search input { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Drew
					Drew