forked from endorphant/ttbp
		
	updating sinacutie's pr for permalink styling
This commit is contained in:
		
							parent
							
								
									41ccd6ba32
								
							
						
					
					
						commit
						782c86d66c
					
				| @ -153,5 +153,14 @@ version 0.9.3 features: | ||||
|       non-public on posting; this option only really makes sense if you're | ||||
|       already publishing to html/gopher, but is available either way! | ||||
|        | ||||
|       you can find this option under 'settings' as 'post as nopub'.""" | ||||
|       you can find this option under 'settings' as 'post as nopub'.""", | ||||
|         "0.11.3": """ | ||||
| ~[version 0.11.3 update]~ | ||||
| 
 | ||||
|     * thanks to ~sinacutie, you can now set custom css for the permalink text | ||||
|       styling on your html page. the default permalink style has been added to | ||||
|       your current css file, and shouldn't change the appearance of your page. | ||||
|        | ||||
|       if you're not using custom css, don't worry about this!""" | ||||
| 
 | ||||
| } | ||||
|  | ||||
							
								
								
									
										20
									
								
								ttbp/ttbp.py
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								ttbp/ttbp.py
									
									
									
									
									
								
							| @ -50,7 +50,7 @@ from . import chatter | ||||
| from . import gopher | ||||
| from . import util | ||||
| 
 | ||||
| __version__ = "0.11.2" | ||||
| __version__ = "0.11.3" | ||||
| __author__ = "endorphant <endorphant@tilde.town)" | ||||
| 
 | ||||
| p = inflect.engine() | ||||
| @ -761,6 +761,7 @@ publicly available on github at https://github.com/modgethanc/ttbp | ||||
| other contributors: | ||||
|     ~vilmibm, packaging help and gopher support | ||||
|     ~sanqui, the bug swatter | ||||
|     ~sinacutie, for css updates | ||||
| 
 | ||||
| if you have ideas for ttbp, you are welcome to contact me to discuss them; | ||||
| please send me tildemail or open a github issue. i am not a very experienced | ||||
| @ -1335,6 +1336,19 @@ def update_user_version(): | ||||
|             SETTINGS.update({"post as nopub": False}) | ||||
|             save_settings() | ||||
| 
 | ||||
|         if z < 3: | ||||
|             # update permalink css | ||||
|             style = open(os.path.join(config.USER_CONFIG, 'style.css'), 'r').read() | ||||
|             if "permalink" not in style: | ||||
|                 print("adding new css...") | ||||
|                 with open(os.path.join(config.USER_CONFIG, 'style.css'), 'a') as f: | ||||
|                     f.write(""" | ||||
| .entry p.permalink { | ||||
|   font-size: .6em; | ||||
|   font-color: #808080; | ||||
|   text-align: right; | ||||
| }""") | ||||
| 
 | ||||
|     print(""" | ||||
| you're all good to go, """+chatter.say("friend")+"""! please contact ~endorphant if | ||||
| something strange happened to you during this update. | ||||
| @ -1356,6 +1370,10 @@ something strange happened to you during this update. | ||||
|         # version 0.11.2 patch notes | ||||
|         print(config.UPDATES["0.11.2"]) | ||||
| 
 | ||||
|     if y < 11 or z < 3: | ||||
|         # version 0.11.3 patch notes | ||||
|         print(config.UPDATES["0.11.3"]) | ||||
| 
 | ||||
|     confirm = "" | ||||
| 
 | ||||
|     while confirm not in ("x", "<x>", "X", "<X>"): | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user