favicon.(png|gif|ico) can be placed in styles/$yourstyle/ now
This commit is contained in:
parent
3853641e80
commit
cff4943809
15
blogthon.cgi
15
blogthon.cgi
@ -393,6 +393,21 @@ else:
|
|||||||
print(ind*2 + "<meta name=\"keywords\" content=\"%s\" />" % keywords)
|
print(ind*2 + "<meta name=\"keywords\" content=\"%s\" />" % keywords)
|
||||||
print(ind*2 + "<meta name=\"description\" content=\"%s\" />" % blog_title)
|
print(ind*2 + "<meta name=\"description\" content=\"%s\" />" % blog_title)
|
||||||
print(ind*2 + "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/%s/%s.css\" />" % (style, style))
|
print(ind*2 + "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/%s/%s.css\" />" % (style, style))
|
||||||
|
|
||||||
|
if os.path.exists("styles/" + style + "/favicon.png"):
|
||||||
|
icon_suffix = "png"
|
||||||
|
icon_type = "image/png"
|
||||||
|
elif os.path.exists("styles/" + style + "/favicon.gif"):
|
||||||
|
icon_suffix = "gif"
|
||||||
|
icon_type = "image/gif"
|
||||||
|
elif os.path.exists("styles/" + style + "/favicon.ico"):
|
||||||
|
icon_suffix = "ico"
|
||||||
|
icon_type = "image/x-icon"
|
||||||
|
else:
|
||||||
|
icon_type = None;
|
||||||
|
if icon_type:
|
||||||
|
print(ind*2 + "<link rel=\"icon\" href=\"styles/%s/favicon.%s\" type=\"%s\" />" % (style, icon_suffix, icon_type))
|
||||||
|
|
||||||
print(ind + "</head>")
|
print(ind + "</head>")
|
||||||
print(ind + "<body>")
|
print(ind + "<body>")
|
||||||
print("")
|
print("")
|
||||||
|
Loading…
Reference in New Issue
Block a user