forked from indymedia/epicyon
Approvals button on timeline
parent
8cf9dde826
commit
cc0e5504a8
|
@ -85,6 +85,22 @@ body, html {
|
|||
margin: 5px;
|
||||
}
|
||||
|
||||
.followerApprovalsButton {
|
||||
border-radius: 4px;
|
||||
background-color: darkgreen;
|
||||
border: none;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
padding: 10px;
|
||||
width: 25%;
|
||||
max-width: 200px;
|
||||
min-width: 100px;
|
||||
transition: all 0.5s;
|
||||
cursor: pointer;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.followApprove {
|
||||
border-radius: 4px;
|
||||
background-color: darkgreen;
|
||||
|
@ -121,6 +137,13 @@ body, html {
|
|||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
.followerApprovalsButton span {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.button span {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
|
@ -128,6 +151,15 @@ body, html {
|
|||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.followerApprovalsButton span:after {
|
||||
content: '\00bb';
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
top: 0;
|
||||
right: -20px;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.button span:after {
|
||||
content: '\00bb';
|
||||
position: absolute;
|
||||
|
@ -137,10 +169,19 @@ body, html {
|
|||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.followerApprovalsButton:hover span {
|
||||
padding-right: 25px;
|
||||
}
|
||||
|
||||
.button:hover span {
|
||||
padding-right: 25px;
|
||||
}
|
||||
|
||||
.followerApprovalsButton:hover span:after {
|
||||
opacity: 1;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.button:hover span:after {
|
||||
opacity: 1;
|
||||
right: 0;
|
||||
|
|
|
@ -513,8 +513,18 @@ def htmlTimeline(session,baseDir: str,wfRequest: {},personCache: {}, \
|
|||
personalButton='buttonselected'
|
||||
elif boxName=='federated':
|
||||
federatedButton='buttonselected'
|
||||
|
||||
actor='/users/'+nickname
|
||||
|
||||
followApprovals=''
|
||||
followRequestsFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/followrequests.txt'
|
||||
if os.path.isfile(followRequestsFilename):
|
||||
with open(followRequestsFilename,'r') as f:
|
||||
for line in f:
|
||||
if len(line)>0:
|
||||
# show a star on the followers tab
|
||||
followApprovals='<a href="'+actor+'/followers"><button class="followerApprovalsButton"><span>Approvals </span></button></a>'
|
||||
break
|
||||
|
||||
tlStr=htmlHeader(profileStyle)
|
||||
newPostStr=' <a href="'+actor+'/newpost"><button class="'+newPostButton+'"><span>New Post </span></button></a>'
|
||||
tlStr+= \
|
||||
|
@ -523,8 +533,8 @@ def htmlTimeline(session,baseDir: str,wfRequest: {},personCache: {}, \
|
|||
'<div class="container">\n' \
|
||||
' <center>'+newPostStr+ \
|
||||
' <a href="'+actor+'/inbox"><button class="'+localButton+'"><span>Local </span></button></a>' \
|
||||
' <a href="'+actor+'/outbox"><button class="'+personalButton+'"><span>Personal </span></button></a>' \
|
||||
' <a href="'+actor+'/federated"><button class="'+federatedButton+'"><span>Federated </span></button></a>' \
|
||||
' <a href="'+actor+'/outbox"><button class="'+personalButton+'"><span>Personal </span></button></a>'+ \
|
||||
followApprovals+ \
|
||||
' </center>' \
|
||||
'</div>'
|
||||
for item in timelineJson['orderedItems']:
|
||||
|
|
Loading…
Reference in New Issue