Monospace font for git patches

main
Bob Mottram 2020-05-02 20:24:17 +01:00
parent 0bea2ab9f9
commit e4c9365de0
2 changed files with 20 additions and 8 deletions

View File

@ -270,6 +270,12 @@ a:link {
width: 90%;
}
.gitpatch {
margin-left: 7%;
width: 90%;
font-family: monospace;
}
.container p.administeredby {
font-size: var(--font-size-header);
}

View File

@ -68,6 +68,7 @@ from happening import todaysEventsCheck
from happening import thisWeeksEventsCheck
from happening import getCalendarEvents
from happening import getTodaysEvents
from git import isGitPatch
def updateAvatarImageCache(session, baseDir: str, httpPrefix: str,
@ -3971,7 +3972,12 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
if isMuted:
contentStr = ''
else:
if not isGitPatch(baseDir, nickname, domain,
postJsonObject['object']['summary'],
postJsonObject['object']['content']):
contentStr = '<div class="message">' + contentStr + '</div>'
else:
contentStr = '<div class="gitpatch">' + contentStr + '</div>'
postHtml = ''
if boxName != 'tlmedia':