forked from rDrama/rDrama
parent
6ff9f4bc3a
commit
5c2fa1fe19
|
@ -400,7 +400,7 @@ def thumbnail_thread(pid):
|
||||||
parsed_url = urlparse(post_url)
|
parsed_url = urlparse(post_url)
|
||||||
return f"https://{parsed_url.netloc}{fragment_url}"
|
return f"https://{parsed_url.netloc}{fragment_url}"
|
||||||
else:
|
else:
|
||||||
return f"{post_url}{'/' if not post_url.endswith('/')}{fragment_url}"
|
return f"{post_url}{'/' if not post_url.endswith('/') else ''}{fragment_url}"
|
||||||
|
|
||||||
db = db_session()
|
db = db_session()
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
<form action="/admin/alt_votes" method="get" class="mb-6">
|
<form action="/admin/alt_votes" method="get" class="mb-6">
|
||||||
<label for="link-input">Usernames</label>
|
<label for="link-input">Usernames</label>
|
||||||
<input id="link-input" type="text" class="form-control mb-2" name="u1" value="{{u1.username if u1}}" placeholder="User 1">
|
<input id="link-input" type="text" class="form-control mb-2" name="u1" value="{{u1.username if u1 else ''}}" placeholder="User 1">
|
||||||
<input id="link-input" type="text" class="form-control mb-2" name="u2" value="{{u2.username if u2}}" placeholder="User 2">
|
<input id="link-input" type="text" class="form-control mb-2" name="u2" value="{{u2.username if u2 else ''}}" placeholder="User 2">
|
||||||
<input type="submit" value="Submit" class="btn btn-primary">
|
<input type="submit" value="Submit" class="btn btn-primary">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
<button class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
|
<button class="btn btn-primary login w-100 mt-3" id="login_button">Sign in</button>
|
||||||
|
|
||||||
<div class="text-center text-muted text-small mt-5 mb-3">
|
<div class="text-center text-muted text-small mt-5 mb-3">
|
||||||
Don't have an account? <a href="/signup{{'?redirect='+redirect if redirect}}" class="font-weight-bold toggle-login">Sign up</a>
|
Don't have an account? <a href="/signup{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Sign up</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{% block pagetype %}search{% endblock %}
|
{% block pagetype %}search{% endblock %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>Search for "{{query}}" - {{'SITE_NAME' | app_config}}"</title> <meta name="description" content="{{total}} result{{'s' if total != 1}}">
|
<title>Search for "{{query}}" - {{'SITE_NAME' | app_config}}"</title> <meta name="description" content="{{total}} result{{'s' if total != 1 else ''}}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block PseudoSubmitForm %}{% endblock %}
|
{% block PseudoSubmitForm %}{% endblock %}
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
<div class="pl-md-3">
|
<div class="pl-md-3">
|
||||||
<div class="text-muted text-small mb-1">Advanced search parameters (with examples): "author:quadnarca", "domain:reddit.com", "over18:true"<div>
|
<div class="text-muted text-small mb-1">Advanced search parameters (with examples): "author:quadnarca", "domain:reddit.com", "over18:true"<div>
|
||||||
<br>
|
<br>
|
||||||
<div class="text-muted text-small mb-1">Showing {% block listinglength %}{{listing | length}}{% endblock %} of {{total}} result{{'s' if total != 1}} for</div>
|
<div class="text-muted text-small mb-1">Showing {% block listinglength %}{{listing | length}}{% endblock %} of {{total}} result{{'s' if total != 1 else ''}} for</div>
|
||||||
<h1 class="h4 mb-0">{{query}}</h1>
|
<h1 class="h4 mb-0">{{query}}</h1>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select id='frontsize' class="form-control" form="profile-settings" name="frontsize" onchange="post_toast('/settings/profile?frontsize='+document.getElementById('frontsize').value)">
|
<select id='frontsize' class="form-control" form="profile-settings" name="frontsize" onchange="post_toast('/settings/profile?frontsize='+document.getElementById('frontsize').value)">
|
||||||
{% for entry in [25, 50, 100] %}
|
{% for entry in [25, 50, 100] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.frontsize==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.frontsize==entry else ''}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select id='defaultsortingcomments' class="form-control" form="profile-settings" name="defaultsortingcomments" onchange="post_toast('/settings/profile?defaultsortingcomments='+document.getElementById('defaultsortingcomments').value)">
|
<select id='defaultsortingcomments' class="form-control" form="profile-settings" name="defaultsortingcomments" onchange="post_toast('/settings/profile?defaultsortingcomments='+document.getElementById('defaultsortingcomments').value)">
|
||||||
{% for entry in ["new", "old", "top", "bottom", "controversial"] %}
|
{% for entry in ["new", "old", "top", "bottom", "controversial"] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.defaultsortingcomments==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.defaultsortingcomments==entry else ''}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select id='defaultsorting' class="form-control" form="profile-settings" name="defaultsorting" onchange="post_toast('/settings/profile?defaultsorting='+document.getElementById('defaultsorting').value)">
|
<select id='defaultsorting' class="form-control" form="profile-settings" name="defaultsorting" onchange="post_toast('/settings/profile?defaultsorting='+document.getElementById('defaultsorting').value)">
|
||||||
{% for entry in ["hot", "new", "old", "top", "bottom", "controversial", "comments"] %}
|
{% for entry in ["hot", "new", "old", "top", "bottom", "controversial", "comments"] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.defaultsorting==entry else ''}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
<select id='defaulttime' class="form-control" form="profile-settings" name="defaulttime" onchange="post_toast('/settings/profile?defaulttime='+document.getElementById('defaulttime').value)">
|
<select id='defaulttime' class="form-control" form="profile-settings" name="defaulttime" onchange="post_toast('/settings/profile?defaulttime='+document.getElementById('defaulttime').value)">
|
||||||
{% for entry in ["hour", "day", "week", "month", "year", "all"] %}
|
{% for entry in ["hour", "day", "week", "month", "year", "all"] %}
|
||||||
<option value="{{entry}}"{{' selected' if v.defaulttime==entry}}>{{entry}}</option>
|
<option value="{{entry}}"{{' selected' if v.defaulttime==entry else ''}}>{{entry}}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -281,7 +281,7 @@
|
||||||
|
|
||||||
<input type="text" readonly="" class="form-control copy-link" id="referral_code" value="{{request.host_url}}signup?ref={{v.username}}" data-clipboard-text="{{request.host_url}}signup?ref={{v.username}}">
|
<input type="text" readonly="" class="form-control copy-link" id="referral_code" value="{{request.host_url}}signup?ref={{v.username}}" data-clipboard-text="{{request.host_url}}signup?ref={{v.username}}">
|
||||||
|
|
||||||
<span class="input-group-append" data-bs-toggle="tooltip" data-bs-placement="top" title="You have referred {{v.referral_count}} user{{'s' if v.referral_count != 1}} so far. {% if v.referral_count==0 %}¯\_(ツ)_/¯{% elif v.referral_count>10%}Wow!{% endif %}">
|
<span class="input-group-append" data-bs-toggle="tooltip" data-bs-placement="top" title="You have referred {{v.referral_count}} user{{'s' if v.referral_count != 1 else ''}} so far. {% if v.referral_count==0 %}¯\_(ツ)_/¯{% elif v.referral_count>10%}Wow!{% endif %}">
|
||||||
<span class="input-group-text text-primary border-0">
|
<span class="input-group-text text-primary border-0">
|
||||||
<i class="far fa-user mr-1" aria-hidden="true"></i>{{v.referral_count}}</span>
|
<i class="far fa-user mr-1" aria-hidden="true"></i>{{v.referral_count}}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -134,7 +134,7 @@
|
||||||
<button class="btn btn-primary login w-100 mt-3" id="register_button">Register</button>
|
<button class="btn btn-primary login w-100 mt-3" id="register_button">Register</button>
|
||||||
|
|
||||||
<div class="text-center text-muted text-small mt-2 mb-0">
|
<div class="text-center text-muted text-small mt-2 mb-0">
|
||||||
Already have an account? <a href="/login{{'?redirect='+redirect if redirect}}" class="font-weight-bold toggle-login">Log in</a>
|
Already have an account? <a href="/login{{'?redirect='+redirect if redirect else ''}}" class="font-weight-bold toggle-login">Log in</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
<div class="post-actions d-none d-md-block">
|
<div class="post-actions d-none d-md-block">
|
||||||
<ul class="list-inline text-left mb-2">
|
<ul class="list-inline text-left mb-2">
|
||||||
<li class="list-inline-item"><a {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}><i
|
<li class="list-inline-item"><a {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %}><i
|
||||||
class="fas fa-comment-dots"></i>{{p.comment_count}} Comment{{'s' if p.comment_count != 1}}</a>
|
class="fas fa-comment-dots"></i>{{p.comment_count}} Comment{{'s' if p.comment_count != 1 else ''}}</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
<span id="profile-coins-amount">{{u.coins}}</span>
|
<span id="profile-coins-amount">{{u.coins}}</span>
|
||||||
<img data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{'COINS_NAME' | app_config}}" height="20" src="https://rdrama.net/assets/images/emojis/marseybux.webp">
|
<img data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{'COINS_NAME' | app_config}}" height="20" src="https://rdrama.net/assets/images/emojis/marseybux.webp">
|
||||||
|
|
||||||
{% if u.stored_subscriber_count >=1 and not u.is_nofollow %}<a href="/@{{u.username}}/followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1}}</a> {% endif %}
|
{% if u.stored_subscriber_count >=1 and not u.is_nofollow %}<a href="/@{{u.username}}/followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a> {% endif %}
|
||||||
joined <span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.created_datetime}}">{{u.created_date}}</span>
|
joined <span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.created_datetime}}">{{u.created_date}}</span>
|
||||||
</div>
|
</div>
|
||||||
{% if "pcm" in request.host %}<p class="text-muted">Based Count: {{u.basedcount}}</p>{% endif %}
|
{% if "pcm" in request.host %}<p class="text-muted">Based Count: {{u.basedcount}}</p>{% endif %}
|
||||||
|
@ -389,7 +389,7 @@
|
||||||
<span id="profile-coins-amount-mobile" class="font-weight-bold">{{u.coins}}</span>
|
<span id="profile-coins-amount-mobile" class="font-weight-bold">{{u.coins}}</span>
|
||||||
|
|
||||||
<img data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{'COINS_NAME' | app_config}}" height="15" src="https://rdrama.net/assets/images/emojis/marseybux.webp">
|
<img data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{'COINS_NAME' | app_config}}" height="15" src="https://rdrama.net/assets/images/emojis/marseybux.webp">
|
||||||
{% if u.stored_subscriber_count >=1 and not u.is_nofollow %}<a href="/@{{u.username}}/followers" class="font-weight-bold">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1}}</a> {% endif %}
|
{% if u.stored_subscriber_count >=1 and not u.is_nofollow %}<a href="/@{{u.username}}/followers" class="font-weight-bold">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a> {% endif %}
|
||||||
{% if "pcm" in request.host %}
|
{% if "pcm" in request.host %}
|
||||||
<br>Based count: {{u.basedcount}}
|
<br>Based count: {{u.basedcount}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<form action="votes" method="get" class="mb-6">
|
<form action="votes" method="get" class="mb-6">
|
||||||
<label for="link-input">Paste permalink</label>
|
<label for="link-input">Paste permalink</label>
|
||||||
<input id="link-input" type="text" class="form-control mb-2" name="link" value="{{thing.permalink if thing}}">
|
<input id="link-input" type="text" class="form-control mb-2" name="link" value="{{thing.permalink if thing else ''}}">
|
||||||
<input type="submit" value="Submit" class="btn btn-primary">
|
<input type="submit" value="Submit" class="btn btn-primary">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue