diff --git a/files/default-dark.css b/files/default-dark.css new file mode 100644 index 0000000..8a4e207 --- /dev/null +++ b/files/default-dark.css @@ -0,0 +1,23 @@ +.navbar { + color: #e8e6e3; + background-color: #262a2b; +} + +.navbar li a { + color: #e8e6e3; +} + +/* Change the link color on hover */ +.navbar li a:hover { + background-color: #0d0e0e; +} + +.license { + color: #e8e6e3; + background-color: #313537; +} + +body { + color: #e8e6e3; + background-color: #181a1b; +} \ No newline at end of file diff --git a/files/default.css b/files/default.css new file mode 100644 index 0000000..1006681 --- /dev/null +++ b/files/default.css @@ -0,0 +1,22 @@ +.navbar { + color: #fff; + background-color: #333; +} + +.navbar li a { + color: #fff; +} + +/* Change the link color on hover */ +.navbar li a:hover { + background-color: #111; +} + +.license { + color: #000; + background-color: #ddd; +} + +body { + background-color: #fff; +} \ No newline at end of file diff --git a/files/global.css b/files/global.css index 9f1300a..9e31819 100644 --- a/files/global.css +++ b/files/global.css @@ -7,6 +7,7 @@ body { margin-top: 32px; margin-bottom: 56px; font-family: Arial; + height: 100%; } .folders { @@ -129,7 +130,6 @@ figure { .caption { padding-top: 4px; text-align: center; - font-style: italic; font-size: 12px; width: 100%; display: block; @@ -139,7 +139,6 @@ figure { position: fixed; bottom: 0; width: 100%; - background-color: lightgrey; padding: 12px; } @@ -151,7 +150,6 @@ figure { position: fixed; top: 0; width: 100%; - background-color: #333; } .navbar li { @@ -160,7 +158,6 @@ figure { .navbar li a { display: block; - color: white; text-align: center; padding: 14px 16px; text-decoration: none; @@ -168,13 +165,7 @@ figure { .navbar li span { display: block; - color: white; text-align: center; padding: 14px 16px; text-decoration: none; -} - -/* Change the link color to #111 (black) on hover */ -.navbar li a:hover { - background-color: #111; } \ No newline at end of file diff --git a/files/monokai-vibrant.css b/files/monokai-vibrant.css new file mode 100644 index 0000000..0647272 --- /dev/null +++ b/files/monokai-vibrant.css @@ -0,0 +1,30 @@ +.navbar { + font-weight: bold; + color: #f6f6f6; + background-color: #191b20; + } + + .navbar li a { + font-weight: bold; + color: #f6f6f6; + } + + /* Change the link color on hover */ + .navbar li a:hover { + background-color: #2c313a; + } + + .license { + color: #f6f6f6; + background-color: #2c313a; + } + + body { + color: #f6f6f6; + background-color: #16171d + } + + a { + font-weight: bold; + color: #ffd945; + } \ No newline at end of file diff --git a/generate_html.py b/generate_html.py index a978af3..c377145 100755 --- a/generate_html.py +++ b/generate_html.py @@ -20,6 +20,7 @@ _ROOTTITLE = "Pictures" _STATICFILES = os.path.join(os.path.abspath(os.path.dirname(__file__)), "files") _FAVICON = ".static/favicon.ico" _STYLE = ".static/global.css" +_THEME = ".static/default.css" _AUTHOR = "Author" # fmt: off rawext = [".3fr", ".ari", ".arw", ".bay", ".braw", ".crw", ".cr2", ".cr3", ".cap", ".data", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".fff", ".gpr", ".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef", ".ptx", ".pxn", ".r3d", ".raf", ".raw", ".rwl", ".rw2", ".rwz", ".sr2", ".srf", ".srw", ".tif", ".tiff", ".x3f"] @@ -122,7 +123,7 @@ def listfolder(folder: str, title: str): title=title, favicon=f"{args.webroot}{_FAVICON}", stylesheet=f"{args.webroot}{_STYLE}", - theme=None, + theme=f"{args.webroot}{urllib.parse.quote(args.theme)}", root=args.webroot, parent=parent, header=header, @@ -179,6 +180,7 @@ def main(): parser.add_argument("-l", "--license", help="License", default=None, required=False, choices=["cc-zero", "cc-by", "cc-by-sa", "cc-by-nd", "cc-by-nc", "cc-by-nc-sa", "cc-by-nc-nd"], dest="license") parser.add_argument("-a", "--author", help="Author", default=_AUTHOR, required=False, type=str, dest="author") parser.add_argument("-t", "--title", help="Title", default=_ROOTTITLE, required=False, type=str, dest="title") + parser.add_argument("--theme", help="Relative link to CSS theme file", default=_THEME, required=False, type=str, dest="theme") parser.add_argument("--fancyfolders", help="Use fancy folders instead of default apache ones", action="store_true", default=False, required=False, dest="fancyfolders") args = parser.parse_args() # fmt: on