Separators with different background colors

main
Bob Mottram 2020-11-18 21:56:19 +00:00
parent 67b8630850
commit b3648d9f5d
2 changed files with 21 additions and 1 deletions

View File

@ -185,6 +185,24 @@ body, html {
display: block; display: block;
} }
.postSeparatorImageLeft img {
background-color: var(--column-left-color);
padding-top: var(--post-separator-margin-top);
padding-bottom: var(--post-separator-margin-bottom);
width: var(--post-separator-width);
height: var(--post-separator-height);
display: block;
}
.postSeparatorImageRight img {
background-color: var(--column-left-color);
padding-top: var(--post-separator-margin-top);
padding-bottom: var(--post-separator-margin-bottom);
width: var(--post-separator-width);
height: var(--post-separator-height);
display: block;
}
.headericons { .headericons {
display: inline-block; display: inline-block;
float: right; float: right;

View File

@ -728,13 +728,15 @@ def htmlPostSeparator(baseDir: str, column: str) -> str:
iconsPath = getIconsWebPath(baseDir) iconsPath = getIconsWebPath(baseDir)
theme = getConfigParam(baseDir, 'theme') theme = getConfigParam(baseDir, 'theme')
filename = 'separator.png' filename = 'separator.png'
separatorClass = "postSeparatorImage"
if column: if column:
separatorClass = "postSeparatorImage" + column.title()
filename = 'separator_' + column + '.png' filename = 'separator_' + column + '.png'
separatorImageFilename = baseDir + '/theme/' + theme + '/icons/' + filename separatorImageFilename = baseDir + '/theme/' + theme + '/icons/' + filename
separatorStr = '' separatorStr = ''
if os.path.isfile(separatorImageFilename): if os.path.isfile(separatorImageFilename):
separatorStr = \ separatorStr = \
'<div class="postSeparatorImage"><center>' + \ '<div class="' + separatorClass + '"><center>' + \
'<img src="/' + iconsPath + '/' + filename + '"/>' + \ '<img src="/' + iconsPath + '/' + filename + '"/>' + \
'</center></div>\n' '</center></div>\n'
return separatorStr return separatorStr