remotes/1693045480750635534/spooky-22
Aevann1 2021-12-11 20:08:03 +02:00
parent 5549588e7f
commit fa9cb897e8
9 changed files with 17 additions and 17 deletions

View File

@ -697,7 +697,7 @@ def thumbnail_thread(pid):
for chunk in image_req.iter_content(1024):
file.write(chunk)
post.thumburl = "https://" + site + process_image(name, True)
post.thumburl = f"https://{site}/" + process_image(name, True)
db.add(post)
db.commit()
db.close()

View File

@ -14,7 +14,7 @@
<div class="settings-section rounded">
<div class="d-lg-flex">
<div class="title w-lg-25">
<label for="over18"><a href="{{app.permalink}}" target="_blank">{{app.app_name}}</a></label>
<label for="over18"><a href="{{app.permalink}}" {% if v and v.newtab %}target="_blank"{% endif %}>{{app.app_name}}</a></label>
</div>
<div class="body w-lg-100">
<label for="edit-{{app.id}}-author" class="mb-0 w-lg-25">User</label>

View File

@ -57,7 +57,7 @@
<span class="text-black">coins</span>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<a target="_blank" class="pop-viewmore ml-auto text-decoration-none">
<a {% if v and v.newtab %}target="_blank"{% endif %} class="pop-viewmore ml-auto text-decoration-none">
View
<i class="fas fa-arrow-right fa-sm px-1"></i>
</a>
@ -295,7 +295,7 @@
<a id="cancel-edit-{{c.id}}" href="javascript:void(0)" onclick="toggleEdit('{{c.id}}')" class="btn btn-link text-muted ml-auto cancel-form fl-r commentmob">Cancel</a>
</form>
<div id="preview-edit-{{c.id}}" class="mb-3 mt-5"></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" target="_blank">Formatting help</a></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
</div>
{% endif %}
<div id="comment-{{c.id}}-actions" class="comment-actions{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
@ -463,7 +463,7 @@
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('d-none')" class="btn btn-link text-muted ml-auto cancel-form fl-r commentmob">Cancel</a>
</form>
<div id="reply-edit-{{c.id}}" class="mb-3 mt-5"></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" target="_blank">Formatting help</a></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
</div>
</div>

View File

@ -50,11 +50,11 @@
{% elif v %}
<p>Please <a target="_blank" href="/settings/security">verify your email address</a> in order to ensure we can respond to your message if needed. Then, refresh this page.</p>
<p>Please <a {% if v and v.newtab %}target="_blank"{% endif %} href="/settings/security">verify your email address</a> in order to ensure we can respond to your message if needed. Then, refresh this page.</p>
{% else %}
<p>In order to ensure that we can respond to your message, please first <a href="/signup" target="_blank">sign up</a> or <a href="/login" target="_blank">log in</a> and make sure you have <a target="_blank" href="/settings/security">verified your email address</a>. Then, refresh this page.</p>
<p>In order to ensure that we can respond to your message, please first <a href="/signup" {% if v and v.newtab %}target="_blank"{% endif %}>sign up</a> or <a href="/login" {% if v and v.newtab %}target="_blank"{% endif %}>log in</a> and make sure you have <a {% if v and v.newtab %}target="_blank"{% endif %} href="/settings/security">verified your email address</a>. Then, refresh this page.</p>
{% endif %}

View File

@ -105,7 +105,7 @@
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="newtab">Open Threads In New Tabs</label>
<label for="newtab">Open Internal Links In New Tabs</label>
</div>
<div class="body w-lg-100">
@ -115,7 +115,7 @@
<label class="custom-control-label" for="newtab"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to automatically open threads in new tabs.</span>
<span class="text-small-extra text-muted">Enable if you would like to automatically open links to other pages in the site in new tabs.</span>
</div>
@ -135,7 +135,7 @@
<label class="custom-control-label" for="newtabexternal"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to automatically open external links in new tabs.</span>
<span class="text-small-extra text-muted">Enable if you would like to automatically open links to other sites in new tabs.</span>
</div>

View File

@ -111,7 +111,7 @@
<div class="custom-control custom-checkbox mt-4">
<input type="checkbox" class="custom-control-input" id="termsCheck" required>
<label class="custom-control-label terms" for="termsCheck">I accept the <a
href="/rules" target="_blank">terms and conditions</a></label>
href="/rules" {% if v and v.newtab %}target="_blank"{% endif %}>terms and conditions</a></label>
</div>
{% if hcaptcha %}

View File

@ -470,7 +470,7 @@
<a href="javascript:void(0)" onclick="togglePostEdit('{{p.id}}')" class="btn btn-link text-muted ml-auto cancel-form fl-r">Cancel</a>
</form>
<div id="post-edit-{{p.id}}" class="mb-3 mt-5"></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" target="_blank">Formatting help</a></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
</div>
{% endif %}
@ -734,7 +734,7 @@
<a id="save-reply-to-{{p.fullname}}" href="javascript:void(0)" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
</form>
<div id="form-preview-{{p.id}}" class="mb-3 mt-5"></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" target="_blank">Formatting help</a></div>
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
</div>
{% if not v and not p.is_banned %}

View File

@ -45,7 +45,7 @@
<span class="text-black">coins</span>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<a target="_blank" class="pop-viewmore ml-auto text-decoration-none">
<a {% if v and v.newtab %}target="_blank"{% endif %} class="pop-viewmore ml-auto text-decoration-none">
View
<i class="fas fa-arrow-right fa-sm px-1"></i>
</a>
@ -185,7 +185,7 @@
<a class="user-name text-decoration-none" onclick='popclick({{p.author.json_popover | tojson}})' data-bs-placement="bottom" data-bs-toggle="popover" data-bs-trigger="focus" data-content-id="popover" href="javascript:void(0)" tabindex="0" style="color: #{{p.author.namecolor}}; font-weight: bold;"><img loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-25 mr-2"><span {% if p.author.patron and not p.distinguish_level %}class="patron" style="background-color:#{{p.author.namecolor}};"{% elif p.distinguish_level and 'rama' in request.host %}class="mod"{% endif %}>{{p.author.username}}</span></a>{% if p.author.customtitle %}<bdi style="color: #{{p.author.titlecolor}}">&nbsp;&nbsp;{% if p.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/quadrants/{{p.author.quadrant}}.webp?v=1">{% endif %}{{p.author.customtitle | safe}}</bdi>{% endif %}
<span data-bs-toggle="tooltip" data-bs-placement="bottom" onmouseover="timestamp('timestamp-{{p.id}}','{{p.created_utc}}')" id="timestamp-{{p.id}}">&nbsp;{{p.age_string}}</span>
&nbsp;
({% if p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" target="_blank">{{p.domain}}</a>{% else %}text post{% endif %})
({% if p.realurl(v) %}<a href="/search/posts/?q=domain%3A{{p.domain}}&sort=new&t=all" {% if v and v.newtab %}target="_blank"{% endif %}>{{p.domain}}</a>{% else %}text post{% endif %})
{% if p.edited_utc %}
&nbsp;&nbsp;Edited <span data-bs-toggle="tooltip" data-bs-placement="bottom" id="edited_timestamp-{{p.id}}" onmouseover="timestamp('edited_timestamp-{{p.id}}','{{p.edited_utc}}')">{{p.edited_string}}</span>
{% endif %}
@ -474,7 +474,7 @@
{% if p.is_image and not p.over_18 and ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}
<div style="text-align: center" class="mt-3 mb-4">
<a target="_blank" rel="nofollow noopener noreferrer" href="{{p.url}}">
<a {% if v and v.newtab %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.url}}">
<img loading="lazy" src="/assets/images/loading.webp" data-src="{{p.url}}" class="img-fluid" style="max-height:20rem;" alt="Unable to load image">
</a>
</div>

View File

@ -126,7 +126,7 @@
</label>
<pre></pre>
<div class="form-text text-small"><a href="/formatting" target="_blank">Formatting help</a></div>
<div class="form-text text-small"><a href="/formatting" {% if v and v.newtab %}target="_blank"{% endif %}>Formatting help</a></div>
<pre></pre>
<div class="custom-control custom-checkbox">