click on button to view all effortposts
parent
9d640fe4c8
commit
87eb87b1da
|
@ -5197,6 +5197,8 @@ span.green {
|
|||
}
|
||||
.effortpost-flair {
|
||||
padding: 5px 5px 4px 5px !important;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
}
|
||||
.patron[style*="background-color:#ffffff"] {
|
||||
color: black !important;
|
||||
|
|
|
@ -143,7 +143,7 @@ blockquote a {
|
|||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #949494 !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ blockquote {
|
|||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #949494 !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ pre {
|
|||
border-color: #101010;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #7a7a7a !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ color: var(--gray-700);
|
|||
background-color: #313131 !important;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #6e6e6e !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ blockquote {
|
|||
background: rgba(var(--primary_rgb), 0.2) !important;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #7a7a7a !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ body, .navbar-light, .navbar-dark, .card, .modal-content, .comment-write textare
|
|||
background-color: #313131 !important;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #6e6e6e !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
background-color: #313131 !important;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #b0b0b0 !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ blockquote {
|
|||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #5c5c5c !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ pre {
|
|||
background: none !important;
|
||||
}
|
||||
|
||||
.visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
.visited, h5.post-title a:not(.effortpost-flair):visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited {
|
||||
color: #7a7a7a !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ def front_all(v, hole=None):
|
|||
|
||||
sort = request.values.get("sort", defaultsorting)
|
||||
t = request.values.get('t', defaulttime)
|
||||
effortposts_only = request.values.get('effortposts_only', False)
|
||||
|
||||
if SITE == 'rdrama.net' and t == 'all' and sort == 'hot' and page > 1000:
|
||||
sort = 'top'
|
||||
|
@ -57,7 +58,7 @@ def front_all(v, hole=None):
|
|||
pins = session.get(f'{hole}_{sort}', default)
|
||||
|
||||
if not v:
|
||||
result = cache.get(f'frontpage_{sort}_{t}_{page}_{hole}_{pins}')
|
||||
result = cache.get(f'frontpage_{sort}_{t}_{page}_{hole}_{pins}_{effortposts_only}')
|
||||
if result:
|
||||
calc_users()
|
||||
return result
|
||||
|
@ -71,6 +72,7 @@ def front_all(v, hole=None):
|
|||
lt=lt,
|
||||
hole=hole,
|
||||
pins=pins,
|
||||
effortposts_only=effortposts_only,
|
||||
)
|
||||
|
||||
posts = get_posts(ids, v=v)
|
||||
|
@ -83,7 +85,7 @@ def front_all(v, hole=None):
|
|||
result = render_template("home.html", v=v, listing=posts, total=total, sort=sort, t=t, page=page, hole=hole, home=True, pins=pins, size=size)
|
||||
|
||||
if not v:
|
||||
cache.set(f'frontpage_{sort}_{t}_{page}_{hole}_{pins}', result, timeout=900)
|
||||
cache.set(f'frontpage_{sort}_{t}_{page}_{hole}_{pins}_{effortposts_only}', result, timeout=900)
|
||||
|
||||
return result
|
||||
|
||||
|
@ -94,7 +96,7 @@ LIMITED_WPD_HOLES = {'aftermath', 'fights', 'gore', 'medical', 'request', 'selfh
|
|||
'slavshit', 'sandshit'}
|
||||
|
||||
@cache.memoize()
|
||||
def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='', gt=0, lt=0, hole=None, pins=True):
|
||||
def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='', gt=0, lt=0, hole=None, pins=True, effortposts_only=False):
|
||||
posts = g.db.query(Post)
|
||||
|
||||
if v and v.hidevotedon:
|
||||
|
@ -113,6 +115,9 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
|||
if gt: posts = posts.filter(Post.created_utc > gt)
|
||||
if lt: posts = posts.filter(Post.created_utc < lt)
|
||||
|
||||
if effortposts_only:
|
||||
posts = posts.filter_by(effortpost=True)
|
||||
|
||||
if not gt and not lt:
|
||||
posts = apply_time_filter(t, posts, Post)
|
||||
|
||||
|
|
|
@ -94,12 +94,12 @@
|
|||
<h1 id="post-title" class="{{p.award_classes(v, True)}} card-title post-title text-left mb-md-3">
|
||||
{% if p.realurl(v) and not v_forbid_deleted %}
|
||||
<a class="no-visited" {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="noopener" href="{{p.realurl(v)}}">
|
||||
{% if p.effortpost %}<span class="post-flair effortpost-flair font-weight-bolder mr-1">EFFORTPOST</span>{% endif %}
|
||||
{% if p.effortpost %}<a href="/?effortposts_only=True" class="post-flair effortpost-flair font-weight-bolder mr-1">EFFORTPOST</a>{% endif %}
|
||||
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
|
||||
{{p.realtitle(v) | safe}}
|
||||
</a>
|
||||
{% else %}
|
||||
{% if p.effortpost %}<span class="post-flair effortpost-flair font-weight-bolder mr-1">EFFORTPOST</span>{% endif %}
|
||||
{% if p.effortpost %}<a href="/?effortposts_only=True" class="post-flair effortpost-flair font-weight-bolder mr-1">EFFORTPOST</a>{% endif %}
|
||||
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
|
||||
{{p.realtitle(v) | safe}}
|
||||
{% endif %}
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
</div>
|
||||
<h5 class="card-title post-title text-left w-lg-95 pb-0 pb-md-1">
|
||||
<a id="{{p.id}}-title" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %} href="{{p.permalink}}" class="{% if p.hole %}sub{% endif %} stretched-link {% if p.chudded %}text-uppercase{% endif %}">
|
||||
{% if p.effortpost %}<span class="post-flair effortpost-flair font-weight-bolder mr-1">EFFORTPOST</span>{% endif %}
|
||||
{% if p.effortpost %}<a href="/?effortposts_only=True" class="post-flair effortpost-flair font-weight-bolder mr-1">EFFORTPOST</a>{% endif %}
|
||||
{% if p.flair %}<span class="post-flair font-weight-bolder mr-1">{{p.flair | safe}}</span>{% endif %}
|
||||
{{p.realtitle(v) | safe}}
|
||||
</a></h5>
|
||||
|
|
Loading…
Reference in New Issue