mirror of
				https://github.com/DerTyp7/obs-twitch-camera-frame.git
				synced 2025-10-31 13:47:12 +01:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 80ea3c297e | ||
|   | c5e597ef58 | 
| @@ -75,3 +75,12 @@ | |||||||
| 		background: var(--border-color-flash-1); | 		background: var(--border-color-flash-1); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @keyframes tfBannerAnimation { | ||||||
|  | 	from { | ||||||
|  | 		margin-top: -200px; | ||||||
|  | 	} | ||||||
|  | 	to { | ||||||
|  | 		margin-top: 0px; | ||||||
|  | 	} | ||||||
|  | } | ||||||
|   | |||||||
| @@ -55,3 +55,27 @@ html { | |||||||
| 	animation-duration: 20s; | 	animation-duration: 20s; | ||||||
| 	animation-name: backgroundAnimation; | 	animation-name: backgroundAnimation; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #teafire-banner { | ||||||
|  | 	height: 50px; | ||||||
|  | 	width: 180px; | ||||||
|  | 	padding: 20px; | ||||||
|  | 	margin-top: -200px; | ||||||
|  | 	z-index: 1; | ||||||
|  | 	animation-timing-function: linear; | ||||||
|  | 	float: right; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #teafire-banner p { | ||||||
|  | 	color: teal; | ||||||
|  | 	float: left; | ||||||
|  | 	font-size: 23pt; | ||||||
|  | 	font-weight: bolder; | ||||||
|  | 	padding-top: 8px; | ||||||
|  | 	padding-left: 5px; | ||||||
|  | } | ||||||
|  | #teafire-banner img { | ||||||
|  | 	color: teal; | ||||||
|  | 	height: 50px; | ||||||
|  | 	float: left; | ||||||
|  | } | ||||||
|   | |||||||
| @@ -11,6 +11,10 @@ | |||||||
| 	</head> | 	</head> | ||||||
| 	<body> | 	<body> | ||||||
| 		<div id="frame"></div> | 		<div id="frame"></div> | ||||||
|  | 		<div id="teafire-banner"> | ||||||
|  | 			<img src="img/logo128x128.png" alt="" /> | ||||||
|  | 			<p>TealFire</p> | ||||||
|  | 		</div> | ||||||
| 		<div id="subCount">0</div> | 		<div id="subCount">0</div> | ||||||
| 		<script src="config.js"></script> | 		<script src="config.js"></script> | ||||||
| 		<script src="js/socket.io.min.js"></script> | 		<script src="js/socket.io.min.js"></script> | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								img/logo128x128.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/logo128x128.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 7.7 KiB | 
							
								
								
									
										31
									
								
								js/app.js
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								js/app.js
									
									
									
									
									
								
							| @@ -1,5 +1,6 @@ | |||||||
| const subCount = document.getElementById("subCount"); | const subCount = document.getElementById("subCount"); | ||||||
| const frame = document.getElementById("frame"); | const frame = document.getElementById("frame"); | ||||||
|  | const tfBanner = document.getElementById("teafire-banner"); | ||||||
|  |  | ||||||
| let subCountNumber = 0; | let subCountNumber = 0; | ||||||
|  |  | ||||||
| @@ -33,4 +34,34 @@ function sub(subName) { | |||||||
| 		updateSubCount(); | 		updateSubCount(); | ||||||
| 	}, 11000); | 	}, 11000); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function showTealFireBanner() { | ||||||
|  | 	tfBanner.style.animationName = "tfBannerAnimation"; | ||||||
|  | 	tfBanner.style.animationDuration = "3s"; | ||||||
|  | 	tfBanner.style.animationDirection = "normal"; | ||||||
|  | 	setTimeout(() => { | ||||||
|  | 		tfBanner.style.marginTop = "0px"; | ||||||
|  | 		tfBanner.style.animationName = ""; | ||||||
|  | 		tfBanner.style.animationDuration = ""; | ||||||
|  | 	}, 3000); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | function closeTealFireBanner() { | ||||||
|  | 	tfBanner.style.animationName = "tfBannerAnimation"; | ||||||
|  | 	tfBanner.style.animationDuration = "3s"; | ||||||
|  | 	tfBanner.style.animationDirection = "reverse"; | ||||||
|  |  | ||||||
|  | 	setTimeout(() => { | ||||||
|  | 		tfBanner.style.marginTop = "-200px"; | ||||||
|  | 		tfBanner.style.animationName = ""; | ||||||
|  | 		tfBanner.style.animationDuration = ""; | ||||||
|  | 	}, 3000); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | setInterval(() => { | ||||||
|  | 	showTealFireBanner(); | ||||||
|  | 	setTimeout(() => { | ||||||
|  | 		closeTealFireBanner(); | ||||||
|  | 	}, 20000); | ||||||
|  | }, 300000); | ||||||
| updateSubCount(); | updateSubCount(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user