Merge pull request 'ghoul_font' (!63) from ghoul_font into master
Reviewed-on: #63
This commit is contained in:
		
						commit
						622b632773
					
				
					 6 changed files with 34 additions and 0 deletions
				
			
		|  | @ -87,6 +87,7 @@ TEMPLATES = [ | ||||||
| 				'header_fotky.context_processors.vzhled', | 				'header_fotky.context_processors.vzhled', | ||||||
| 				'various.context_processors.rozliseni', | 				'various.context_processors.rozliseni', | ||||||
| 				'various.context_processors.april', | 				'various.context_processors.april', | ||||||
|  | 				'various.context_processors.halloween', | ||||||
| 			) | 			) | ||||||
| 		}, | 		}, | ||||||
| 	}, | 	}, | ||||||
|  |  | ||||||
|  | @ -8,6 +8,13 @@ | ||||||
| 	font-weight: normal; | 	font-weight: normal; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @font-face { | ||||||
|  | 	font-family: 'GhoulFace'; | ||||||
|  | 	src: url("../fonts/ghoul/ghoulheadline.ttf"), | ||||||
|  | 		url("../fonts/ghoul/ghoul.woff"); | ||||||
|  | 	font-weight: normal; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| body { | body { | ||||||
| 	font-size: 14px; | 	font-size: 14px; | ||||||
| 	font-family: 'OpenSans'; | 	font-family: 'OpenSans'; | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								mamweb/static/fonts/ghoul/ghoul.ttf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								mamweb/static/fonts/ghoul/ghoul.ttf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								mamweb/static/fonts/ghoul/ghoulheadline.ttf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								mamweb/static/fonts/ghoul/ghoulheadline.ttf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -78,3 +78,16 @@ | ||||||
|     walkText(document.body); |     walkText(document.body); | ||||||
|   </script> |   </script> | ||||||
| {% endif %} | {% endif %} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | {% if halloween == 2024 %} | ||||||
|  |   <script> | ||||||
|  |     function printHalloween() { | ||||||
|  |       console.log("Halloween 2024"); | ||||||
|  |       body = document.getElementsByTagName('body')[0]; | ||||||
|  |       body.style.fontFamily = 'GhoulFace'; | ||||||
|  |     } | ||||||
|  |     window.onload = printHalloween; | ||||||
|  |   </script> | ||||||
|  | {% endif %} | ||||||
|  |  | ||||||
|  | @ -15,6 +15,19 @@ def april(req): | ||||||
| 		return {'april': today.year} | 		return {'april': today.year} | ||||||
| 	return {} | 	return {} | ||||||
| 
 | 
 | ||||||
|  | def halloween(req): | ||||||
|  | 	if 'X-Halloween' in req.headers: | ||||||
|  | 		try: | ||||||
|  | 			year = int(req.headers['X-Halloween']) | ||||||
|  | 			return {'halloween': year} | ||||||
|  | 		except: | ||||||
|  | 			pass # Fall-back to regular behaviour | ||||||
|  | 	 | ||||||
|  | 	import datetime | ||||||
|  | 	today = datetime.date.today() | ||||||
|  | 	if today.month == 10 and today.day >= 25: | ||||||
|  | 		return {'halloween': today.year} | ||||||
|  | 	return {} | ||||||
| 
 | 
 | ||||||
| def rozliseni(request): | def rozliseni(request): | ||||||
| 	ltp = settings.LOCAL_TEST_PROD | 	ltp = settings.LOCAL_TEST_PROD | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue