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

@ -18,8 +18,8 @@
--font-size: 30px;
--font-size2: 24px;
--font-size3: 38px;
--font-size4: 22px;
--font-size5: 20px;
--font-size4: 22px;
--font-size5: 20px;
--text-entry-foreground: #ccc;
--text-entry-background: #111;
--time-color: #aaa;
@ -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);
}
@ -633,7 +639,7 @@ div.gallery img {
.galleryContainer {
display: grid;
grid-template-columns: 50% 50%;
grid-column-gap: 5px;
grid-column-gap: 5px;
background-color: var(--main-bg-color);
}
div.gallerytext {
@ -669,7 +675,7 @@ div.gallery img {
max-width: 400px;
width: 8%;
-ms-transform: translateY(-25%);
transform: translateY(-25%);
transform: translateY(-25%);
}
.container img.timelineicon {
float: right;
@ -769,7 +775,7 @@ div.gallery img {
transition: all 0.5s;
cursor: pointer;
margin: 5px;
}
}
.buttonselected {
border-radius: var(--button-corner-radius);
background-color: var(--button-selected);
@ -998,7 +1004,7 @@ div.gallery img {
max-width: 400px;
width: 12%;
-ms-transform: translateY(-25%);
transform: translateY(-25%);
transform: translateY(-25%);
}
.container img.timelineicon {
float: right;
@ -1098,7 +1104,7 @@ div.gallery img {
transition: all 0.5s;
cursor: pointer;
margin: 15px;
}
}
.buttonselected {
border-radius: var(--button-corner-radius);
background-color: var(--button-selected);

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:
contentStr = '<div class="message">' + contentStr + '</div>'
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':