From 9f538c804d83b59cd4cb0ca9bd17f3165b37c01d Mon Sep 17 00:00:00 2001 From: david-swift Date: Tue, 11 Mar 2025 22:40:05 +0100 Subject: [PATCH] Add option to left-align subproject badges --- config.toml | 3 +++ sass/_subproject-list.scss | 9 ++++++++- templates/partials/subprojects.html | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 398a0fe..cec1cb8 100644 --- a/config.toml +++ b/config.toml @@ -113,6 +113,9 @@ show_backlinks = true # Hide the tags in the subprojects list. # hide_subproject_tags = true # +# Left-align badges in the subprojects list. +# left_align_badges = true +# # Whether to use Content Security Policy. # Keep in mind that although this can potentially increase security, # it can break some stuff, in which case you will need to set custom policy. diff --git a/sass/_subproject-list.scss b/sass/_subproject-list.scss index 51f9019..f0f09e3 100644 --- a/sass/_subproject-list.scss +++ b/sass/_subproject-list.scss @@ -36,7 +36,14 @@ position: absolute; z-index: 10; margin: 20px; - right: 0; background-color: var(--bg-color) } + + .badge:not(#left-align-badge) { + right: 0; + } + + #left-align-badge { + left: 0; + } } diff --git a/templates/partials/subprojects.html b/templates/partials/subprojects.html index d13aa4d..2cfd337 100644 --- a/templates/partials/subprojects.html +++ b/templates/partials/subprojects.html @@ -7,7 +7,7 @@ {%- endif -%} {% if page.extra.badge %} - + {{ page.extra.badge }} {%- endif %}