forked from indymedia/epicyon
Showing shares on profile screen
parent
222c024545
commit
55ccd4cb97
|
@ -740,7 +740,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
return
|
||||
authorized=self._isAuthorized()
|
||||
|
||||
shares=getSharesFeedForPerson(self.server.baseDir,self.server.domain, \
|
||||
shares=getSharesFeedForPerson(self.server.baseDir, \
|
||||
self.server.domain, \
|
||||
self.server.port,self.path, \
|
||||
self.server.httpPrefix, \
|
||||
sharesPerPage)
|
||||
|
|
|
@ -195,7 +195,12 @@ body, html {
|
|||
|
||||
.post-title {
|
||||
margin-top: 0px;
|
||||
color: #999;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.share-title {
|
||||
margin-top: 0px;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.skill-title {
|
||||
|
|
|
@ -167,7 +167,7 @@ def expireShares(baseDir: str,nickname: str,domain: str) -> None:
|
|||
commentjson.dump(sharesJson, fp, indent=4, sort_keys=True)
|
||||
|
||||
def getSharesFeedForPerson(baseDir: str, \
|
||||
nickname: str,domain: str,port: int, \
|
||||
domain: str,port: int, \
|
||||
path: str,httpPrefix: str, \
|
||||
sharesPerPage=12) -> {}:
|
||||
"""Returns the shares for an account from GET requests
|
||||
|
@ -237,6 +237,7 @@ def getSharesFeedForPerson(baseDir: str, \
|
|||
'type': 'OrderedCollectionPage'}
|
||||
|
||||
if not os.path.isfile(sharesFilename):
|
||||
print("test5")
|
||||
return shares
|
||||
currPage=1
|
||||
pageCtr=0
|
||||
|
|
|
@ -104,11 +104,12 @@ def htmlProfileShares(nickname: str,domain: str,sharesJson: {}) -> str:
|
|||
profileStr=''
|
||||
for item in sharesJson['orderedItems']:
|
||||
profileStr+='<div class="container">'
|
||||
profileStr+='<p class="post-title">'+item['displayName']+'</p>'
|
||||
profileStr+='<p class="share-title">'+item['displayName']+'</p>'
|
||||
profileStr+='<img src="'+item['imageUrl']+'" alt="Item image"></a>'
|
||||
profileStr+='<p>'+item['summary']+'</p>'
|
||||
profileStr+='<p>Type: '+item['itemType']+' '
|
||||
profileStr+='Category: '+item['itemCategory']+' '
|
||||
profileStr+='Location: '+item['location']+'</p>'
|
||||
profileStr+='<p><b>Type:</b> '+item['itemType']+' '
|
||||
profileStr+='<b>Category:</b> '+item['category']+' '
|
||||
profileStr+='<b>Location:</b> '+item['location']+'</p>'
|
||||
profileStr+='</div>'
|
||||
if len(profileStr)==0:
|
||||
profileStr+='<p>@'+nickname+'@'+domain+' is not sharing any items</p>'
|
||||
|
|
Loading…
Reference in New Issue