Add local CSS option + emacs badge
This commit is contained in:
parent
bf8c9edee8
commit
48cf0b2961
3 changed files with 14 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -14,6 +14,8 @@ build/secret/*.pdf
|
|||
build/secret/*.epub
|
||||
build/secret/*.gif
|
||||
build/secret/*.png
|
||||
build/archive.css
|
||||
build/emacs.jpg
|
||||
originalsmeta/*
|
||||
!originalsmeta/__init__.py
|
||||
!originalsmeta/template.py
|
||||
|
|
2
build.sh
2
build.sh
|
@ -4,4 +4,6 @@
|
|||
|
||||
python3 generate.py
|
||||
|
||||
touch build/comments/.gitkeep
|
||||
|
||||
rclone copy build praze:/home/public/fic -P
|
||||
|
|
|
@ -2,8 +2,10 @@ def headerwrite(output,title,headerone,desc,main=False,local=False):
|
|||
header = open(output, "a")
|
||||
header.write("<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<link rel=\"stylesheet\" href=\"")
|
||||
if local:
|
||||
header.write("https://tre.praze.net")
|
||||
header.write("/fic/archive.css\">\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n<link href=\"https://fonts.googleapis.com/css2?family=Hubballi&family=Lato:wght@400;700&family=Merriweather:wght@400;700&display=swap\" rel=\"stylesheet\">\n<title>" + title + "</title>\n</head>\n<body>\n<div id=\"content\">\n<h1>" + headerone + "</h1>\n" + desc + "\n")
|
||||
header.write("/home/mdd/Documents/drive/proj/fic-archive/build/")
|
||||
else:
|
||||
header.write("/fic/")
|
||||
header.write("archive.css\">\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n<link href=\"https://fonts.googleapis.com/css2?family=Hubballi&family=Lato:wght@400;700&family=Merriweather:wght@400;700&display=swap\" rel=\"stylesheet\">\n<title>" + title + "</title>\n</head>\n<body>\n<div id=\"content\">\n<h1>" + headerone + "</h1>\n" + desc + "\n")
|
||||
if not main:
|
||||
header.write("<p>\n<a href=\"")
|
||||
if local:
|
||||
|
@ -23,5 +25,10 @@ def footerwrite(output,main=False,local=False):
|
|||
else:
|
||||
footer.write("/fic")
|
||||
footer.write("\">main page\n</a>\n</p>\n")
|
||||
footer.write("</div>\n</body>\n</html>")
|
||||
footer.write("<img src=\"")
|
||||
if local:
|
||||
footer.write("/home/mdd/Documents/drive/proj/fic-archive/build/emacs.jpg")
|
||||
else:
|
||||
footer.write("/fic/emacs.jpg")
|
||||
footer.write("\"></div>\n</body>\n</html>")
|
||||
footer.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue