License on profile page

main2
Bob Mottram 2019-10-03 15:28:52 +01:00
parent 5cb313383d
commit 6a74bac2bb
3 changed files with 10 additions and 4 deletions

View File

@ -60,6 +60,10 @@ a:link {
font-weight: bold; font-weight: bold;
} }
.license {
width: 5%;
}
.cwButton { .cwButton {
border-radius: var(--button-corner-radius); border-radius: var(--button-corner-radius);
background-color: #554; background-color: #554;

BIN
img/icons/agpl.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -1288,13 +1288,15 @@ def htmlProfile(translate: {},projectVersion: str, \
with open(cssFilename, 'r') as cssFile: with open(cssFilename, 'r') as cssFile:
profileStyle = cssFile.read().replace('image.png',actor+'/image.png') profileStyle = cssFile.read().replace('image.png',actor+'/image.png')
licenseStr='<centre><a href="https://gitlab.com/bashrc2/epicyon"><img class="license" src="/icons/agpl.png" /></a></centre>'
if selected=='posts': if selected=='posts':
profileStr+= \ profileStr+= \
htmlProfilePosts(translate, \ htmlProfilePosts(translate, \
baseDir,httpPrefix,authorized, \ baseDir,httpPrefix,authorized, \
ocapAlways,nickname,domain,port, \ ocapAlways,nickname,domain,port, \
session,wfRequest,personCache, \ session,wfRequest,personCache, \
projectVersion) projectVersion)+licenseStr
if selected=='following': if selected=='following':
profileStr+= \ profileStr+= \
htmlProfileFollowing(translate,baseDir,httpPrefix, \ htmlProfileFollowing(translate,baseDir,httpPrefix, \
@ -1317,13 +1319,13 @@ def htmlProfile(translate: {},projectVersion: str, \
pageNumber,maxItemsPerPage) pageNumber,maxItemsPerPage)
if selected=='roles': if selected=='roles':
profileStr+= \ profileStr+= \
htmlProfileRoles(translate,nickname,domainFull,extraJson) htmlProfileRoles(translate,nickname,domainFull,extraJson)+licenseStr
if selected=='skills': if selected=='skills':
profileStr+= \ profileStr+= \
htmlProfileSkills(translate,nickname,domainFull,extraJson) htmlProfileSkills(translate,nickname,domainFull,extraJson)+licenseStr
if selected=='shares': if selected=='shares':
profileStr+= \ profileStr+= \
htmlProfileShares(translate,nickname,domainFull,extraJson) htmlProfileShares(translate,nickname,domainFull,extraJson)+licenseStr
profileStr=htmlHeader(cssFilename,profileStyle)+profileStr+htmlFooter() profileStr=htmlHeader(cssFilename,profileStyle)+profileStr+htmlFooter()
return profileStr return profileStr