diff --git a/.hintrc b/.hintrc new file mode 100644 index 0000000..798957b --- /dev/null +++ b/.hintrc @@ -0,0 +1,8 @@ +{ + "extends": [ + "development" + ], + "hints": { + "apple-touch-icons": "off" + } +} \ No newline at end of file diff --git a/StaticGalleryBuilder.code-workspace b/StaticGalleryBuilder.code-workspace index 9d8e147..68caaa2 100644 --- a/StaticGalleryBuilder.code-workspace +++ b/StaticGalleryBuilder.code-workspace @@ -1,96 +1,29 @@ { - "folders": [ - { - "path": "./", - "name": "StaticGalleryBuilder" - } - ], - "settings": { - "files.associations": { - "**/*.html.j2": "jinja-html", - "**/*.css.j2": "jinja-css", - "**/*.css": "css", - }, - "python.analysis.inlayHints.callArgumentNames": "off", - "python.analysis.inlayHints.functionReturnTypes": false, - "python.analysis.inlayHints.variableTypes": false, - "pylint.args": [ - "--disable=C0111", - "--disable=C0301", - "--good-names-rgxs=^[_a-z][_a-z0-9]?$" - ], - "editor.formatOnSave": false, - "black-formatter.interpreter": [ - "/usr/bin/python3" - ], - "black-formatter.args": [ - "-l 140" - ], - "gitblame.inlineMessageEnabled": true, - "gitblame.inlineMessageFormat": "${author.name}, ${time.ago} • ${commit.summary}", - "gitblame.statusBarMessageFormat": "${author.name} (${time.ago})", - "html.format.templating": true, - "html.format.wrapAttributes": "preserve", - "html.format.wrapLineLength": 200, - "html.format.indentHandlebars": true, - "html.suggest.html5": true, - "html.hover.documentation": true, - "html.validate.scripts": true, - "html.validate.styles": true, - "prettier.htmlWhitespaceSensitivity": "css", - "json.schemaDownload.enable": true, - "json.schemas": [ - { - "fileMatch": [ - "manifest.json.j2" - ], - "url": "https://json.schemastore.org/web-manifest-combined.json" - } - ], - "emmet.includeLanguages": { - "jinja-html": "html", - "jinja-css": "css", - "jinja-js": "javascript", - "jinja-json": "json" - }, - "[python]": { - "editor.defaultFormatter": "ms-python.black-formatter" - }, - "[css]": { - "editor.defaultFormatter": "vscode.css-language-features" - }, - "[jinja-html]": { - "editor.defaultFormatter": "vscode.html-language-features" - }, - "[jinja-css]": { - "editor.defaultFormatter": "vscode.css-language-features" - }, - "[jinja-js]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - }, "extensions": { "recommendations": [ + "esbenp.prettier-vscode", + "ms-edgedevtools.vscode-edge-devtools", "ms-python.black-formatter", - "ms-python.python", - "ms-python.vscode-pylance", "ms-python.debugpy", "ms-python.pylint", + "ms-python.python", + "ms-python.vscode-pylance", "samuelcolvin.jinjahtml", - "vscode.html-language-features", "vscode.css-language-features", + "vscode.html-language-features", "waderyan.gitblame", - ] + ], }, + "folders": [ + { + "name": "StaticGalleryBuilder", + "path": "./", + }, + ], "launch": { "version": "0.2.0", "configurations": [ { - "name": "Testfolder", - "type": "debugpy", - "request": "launch", - "program": "${workspaceFolder}/builder.py", - "console": "integratedTerminal", "args": [ "-p", "${workspaceFolder}/test", @@ -105,14 +38,14 @@ "-n", "-r" ], - "postDebugTask": "Delete Lockfile" + "console": "integratedTerminal", + "name": "Testfolder", + "postDebugTask": "Delete Lockfile", + "program": "${workspaceFolder}/builder.py", + "request": "launch", + "type": "debugpy", }, { - "name": "woek", - "type": "debugpy", - "request": "launch", - "program": "${workspaceFolder}/builder.py", - "console": "integratedTerminal", "args": [ "-p", "/home/user/woek/Pictures", @@ -125,29 +58,98 @@ "--use-fancy-folders", "--web-manifest", "-n", - "-r" + "-r", ], - "postDebugTask": "Delete Lockfile 2" - } - ] + "console": "integratedTerminal", + "name": "woek", + "postDebugTask": "Delete Lockfile 2", + "program": "${workspaceFolder}/builder.py", + "request": "launch", + "type": "debugpy", + }, + ], + }, + "settings": { + "[css]": { + "editor.defaultFormatter": "vscode.css-language-features", + }, + "[jinja-css]": { + "editor.defaultFormatter": "vscode.css-language-features", + }, + "[jinja-html]": { + "editor.defaultFormatter": "vscode.html-language-features", + }, + "[jinja-js]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + }, + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter", + }, + "black-formatter.args": [ + "-l 140", + ], + "black-formatter.interpreter": [ + "/usr/bin/python3", + ], + "editor.formatOnSave": false, + "emmet.includeLanguages": { + "jinja-css": "css", + "jinja-html": "html", + "jinja-js": "javascript", + "jinja-json": "json", + }, + "files.associations": { + "**/*.css.j2": "jinja-css", + "**/*.css": "css", + "**/*.html.j2": "jinja-html", + }, + "gitblame.inlineMessageEnabled": true, + "gitblame.inlineMessageFormat": "${author.name}, ${time.ago} • ${commit.summary}", + "gitblame.statusBarMessageFormat": "${author.name} (${time.ago})", + "html.format.indentHandlebars": true, + "html.format.templating": true, + "html.format.wrapAttributes": "preserve", + "html.format.wrapLineLength": 200, + "html.hover.documentation": true, + "html.suggest.html5": true, + "html.validate.scripts": true, + "html.validate.styles": true, + "json.schemaDownload.enable": true, + "json.schemas": [ + { + "fileMatch": [ + "manifest.json.j2", + ], + "url": "https://json.schemastore.org/web-manifest-combined.json", + }, + ], + "prettier.htmlWhitespaceSensitivity": "css", + "pylint.args": [ + "--disable=C0111", + "--disable=C0301", + "--good-names-rgxs=^[_a-z][_a-z0-9]?$", + ], + "python.analysis.inlayHints.callArgumentNames": "off", + "python.analysis.inlayHints.functionReturnTypes": false, + "python.analysis.inlayHints.variableTypes": false, }, "tasks": { "version": "2.0.0", "tasks": [ { - "label": "Delete Lockfile", "command": "rm -f ${workspaceFolder}/test/.lock", - "type": "shell", + "isBackground": true, + "label": "Delete Lockfile", "problemMatcher": [], - "isBackground": true + "type": "shell", }, { - "label": "Delete Lockfile 2", "command": "rm -f /home/user/woek/Pictures/.lock", - "type": "shell", + "isBackground": true, + "label": "Delete Lockfile 2", "problemMatcher": [], - "isBackground": true - } - ] - } + "type": "shell", + }, + ], + }, } \ No newline at end of file diff --git a/builder.py b/builder.py index a2f9b93..460476b 100755 --- a/builder.py +++ b/builder.py @@ -31,7 +31,7 @@ FAVICON_PATH = ".static/favicon.ico" GLOBAL_CSS_PATH = ".static/global.css" DEFAULT_THEME_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), "themes", "default.css") DEFAULT_AUTHOR = "Author" -VERSION = "1.9.13" +VERSION = "1.9.14" RAW_EXTENSIONS = [".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"] IMG_EXTENSIONS = [".jpg", ".jpeg"] EXCLUDES = [".lock", "index.html", "manifest.json", ".sizelist.json", ".thumbnails", ".static"] diff --git a/files/global.css b/files/global.css index 24b9997..d7b68f7 100644 --- a/files/global.css +++ b/files/global.css @@ -106,6 +106,16 @@ figure { text-decoration: none; } +.navbar .title { + position: absolute; + left: 50%; + transform: translateX(-50%); +} + +.navbar .license { + float: right; +} + .navbar li .header { display: block; text-align: center; diff --git a/templates/index.html.j2 b/templates/index.html.j2 index 380db23..c66a1e0 100644 --- a/templates/index.html.j2 +++ b/templates/index.html.j2 @@ -34,17 +34,17 @@ {{ infoline }}
{%- endfor -%} - {%- endif -%} -
  • {{ header }}
  • + {%- endif %} +
  • {{ header }}
  • {%- if license %} -
  • License
  • +
  • License
  • {%- endif %} {% if subdirectories %}
    {%- for subdirectory in subdirectories %}
    - + {{ subdirectory.name }}
    {{ subdirectory.name }}
    {%- endfor %} @@ -98,8 +98,9 @@ {%- endif %} {%- else %} {%- endif %} {% if images %}