Separators with different background colors

merge-requests/8/head
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;
}
.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 {
display: inline-block;
float: right;

View File

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