updating sinacutie's pr for permalink styling

master
Vincent Zeng 2018-03-11 19:57:54 -04:00
parent 41ccd6ba32
commit 782c86d66c
2 changed files with 29 additions and 2 deletions

View File

@ -153,5 +153,14 @@ version 0.9.3 features:
non-public on posting; this option only really makes sense if you're non-public on posting; this option only really makes sense if you're
already publishing to html/gopher, but is available either way! 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!"""
} }

View File

@ -50,7 +50,7 @@ from . import chatter
from . import gopher from . import gopher
from . import util from . import util
__version__ = "0.11.2" __version__ = "0.11.3"
__author__ = "endorphant <endorphant@tilde.town)" __author__ = "endorphant <endorphant@tilde.town)"
p = inflect.engine() p = inflect.engine()
@ -761,6 +761,7 @@ publicly available on github at https://github.com/modgethanc/ttbp
other contributors: other contributors:
~vilmibm, packaging help and gopher support ~vilmibm, packaging help and gopher support
~sanqui, the bug swatter ~sanqui, the bug swatter
~sinacutie, for css updates
if you have ideas for ttbp, you are welcome to contact me to discuss them; 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 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}) SETTINGS.update({"post as nopub": False})
save_settings() 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(""" print("""
you're all good to go, """+chatter.say("friend")+"""! please contact ~endorphant if you're all good to go, """+chatter.say("friend")+"""! please contact ~endorphant if
something strange happened to you during this update. 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 # version 0.11.2 patch notes
print(config.UPDATES["0.11.2"]) 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 = "" confirm = ""
while confirm not in ("x", "<x>", "X", "<X>"): while confirm not in ("x", "<x>", "X", "<X>"):