forked from indymedia/epicyon
Dropdowns on avatars
parent
887feae5e5
commit
32a86f6e3a
|
@ -377,6 +377,23 @@ input[type=submit]:hover {
|
||||||
padding: 0px 0px;
|
padding: 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown-timeline-content {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
min-width: 100px;
|
||||||
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links inside the dropdown */
|
||||||
|
.dropdown-timeline-content a {
|
||||||
|
color: black;
|
||||||
|
padding: 12px 16px;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
/* Change color of dropdown links on hover */
|
/* Change color of dropdown links on hover */
|
||||||
.dropdown-content a:hover {background-color: #ddd;}
|
.dropdown-content a:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
@ -386,8 +403,10 @@ input[type=submit]:hover {
|
||||||
/* Change the background color of the dropdown button when the dropdown content is shown */
|
/* Change the background color of the dropdown button when the dropdown content is shown */
|
||||||
.dropdown:hover .dropbtn {background-color: #3e8e41;}
|
.dropdown:hover .dropbtn {background-color: #3e8e41;}
|
||||||
|
|
||||||
|
.dropdown-timeline-content a:hover {background-color: #ddd;}
|
||||||
|
|
||||||
/* Show the dropdown menu on hover */
|
/* Show the dropdown menu on hover */
|
||||||
.dropdown-timeline:hover .dropdown-content {display: block;}
|
.dropdown-timeline:hover .dropdown-timeline-content {display: block;}
|
||||||
|
|
||||||
/* Change the background color of the dropdown button when the dropdown content is shown */
|
/* Change the background color of the dropdown button when the dropdown content is shown */
|
||||||
.dropdown-timeline:hover .dropbtn {background-color: #3e8e41;}
|
.dropdown-timeline:hover .dropbtn {background-color: #3e8e41;}
|
||||||
|
|
|
@ -416,7 +416,7 @@ def individualPostAsHtml(session,wfRequest: {},personCache: {}, \
|
||||||
fullDomain=domain
|
fullDomain=domain
|
||||||
if port!=80 and port!=443:
|
if port!=80 and port!=443:
|
||||||
fullDomain=domain+':'+str(port)
|
fullDomain=domain+':'+str(port)
|
||||||
|
|
||||||
if fullDomain not in postJsonObject['actor']:
|
if fullDomain not in postJsonObject['actor']:
|
||||||
inboxUrl,pubKeyId,pubKey,fromPersonId,sharedInbox,capabilityAcquisition,avatarUrl2,preferredName = \
|
inboxUrl,pubKeyId,pubKey,fromPersonId,sharedInbox,capabilityAcquisition,avatarUrl2,preferredName = \
|
||||||
getPersonBox(session,wfRequest,personCache,'outbox')
|
getPersonBox(session,wfRequest,personCache,'outbox')
|
||||||
|
@ -424,18 +424,25 @@ def individualPostAsHtml(session,wfRequest: {},personCache: {}, \
|
||||||
avatarUrl=avatarUrl2
|
avatarUrl=avatarUrl2
|
||||||
if preferredName:
|
if preferredName:
|
||||||
titleStr=preferredName+' '+titleStr
|
titleStr=preferredName+' '+titleStr
|
||||||
|
|
||||||
|
avatarDropdown= \
|
||||||
|
' <a href="'+postJsonObject['actor']+'">' \
|
||||||
|
' <img src="'+avatarUrl+'" title="Show profile" alt="Avatar"'+avatarPosition+'/></a>'
|
||||||
|
if fullDomain+'/users/'+nickname not in postJsonObject['actor']:
|
||||||
|
avatarDropdown= \
|
||||||
|
' <div class="dropdown-timeline">' \
|
||||||
|
' <img src="'+avatarUrl+'" alt="Avatar"'+avatarPosition+'/>' \
|
||||||
|
' <div class="dropdown-timeline-content">' \
|
||||||
|
' <a href="'+postJsonObject['actor']+'">Visit</a>'+ \
|
||||||
|
' <a href="/users/'+nickname+'?follow">Follow</a>' \
|
||||||
|
' <a href="/users/'+nickname+'?block">Block</a>' \
|
||||||
|
' <a href="/users/'+nickname+'?report">Report</a>' \
|
||||||
|
' </div>' \
|
||||||
|
' </div>'
|
||||||
|
|
||||||
return \
|
return \
|
||||||
'<div class="'+containerClass+'">\n' \
|
'<div class="'+containerClass+'">\n'+ \
|
||||||
' <div class="dropdown-timeline">' \
|
avatarDropdown+ \
|
||||||
' <img src="'+avatarUrl+'" alt="Avatar"'+avatarPosition+'/>' \
|
|
||||||
' <div class="dropdown-content">' \
|
|
||||||
' <a href="'+postJsonObject['actor']+'">Visit</a>' \
|
|
||||||
' <a href="/users/'+nickname+'?follow">Follow</a>' \
|
|
||||||
' <a href="/users/'+nickname+'?block">Block</a>' \
|
|
||||||
' <a href="/users/'+nickname+'?report">Report</a>' \
|
|
||||||
' </div>' \
|
|
||||||
' </div>' \
|
|
||||||
'<p class="post-title">'+titleStr+'</p>'+ \
|
'<p class="post-title">'+titleStr+'</p>'+ \
|
||||||
postJsonObject['object']['content']+'\n'+ \
|
postJsonObject['object']['content']+'\n'+ \
|
||||||
attachmentStr+ \
|
attachmentStr+ \
|
||||||
|
|
Loading…
Reference in New Issue