Set static image for banner

This commit is contained in:
Michael House 2022-05-03 21:29:33 -05:00
parent 37765f8449
commit a18b2f134e
10 changed files with 72 additions and 12 deletions

2
env
View file

@ -1,6 +1,6 @@
MASTER_KEY=blahblahblah
DOMAIN=localhost
SITE_NAME=rDrama
SITE_NAME=TheMotte
GIPHY_KEY=blahblahblah
DISCORD_SERVER_ID=blahblahblah
DISCORD_CLIENT_ID=blahblahblah

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View file

@ -245,17 +245,6 @@
{% if '@' not in request.path %}
{% if sub %}
<img alt="/h/{{sub.name}} banner" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{sub.banner_url}}')" loading="lazy" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:25vw">
{% elif SITE_NAME == 'rDrama' %}
{% set path = "assets/images/" + SITE_NAME + "/banners" %}
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=25' %}
<a href="https://secure.transequality.org/site/Donation2?df_id=1480">
{% if v and (v.is_banned or v.agendaposter) %}
<img alt="site banner" src="/assets/images/rDrama/banner2.webp?v=1" width="100%">
{% else %}
<img alt="site banner" src="{{image}}" width="100%">
{% endif %}
</a>
{% else %}
<a href="/">
<img alt="site banner" src="/assets/images/{{SITE_NAME}}/banner.webp?v=1046" width="100%">

View file

@ -0,0 +1,71 @@
<div class="col sidebar text-left d-none d-lg-block pt-3 pb-5 bg-white" style="max-width:300px">
{% if sub %}
{% set image=sub.sidebar_url %}
{% endif %}
{% if sub %}
{% if sub.sidebar_html %}
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
{% endif %}
{% if v %}
{% if v.admin_level > 2 %}
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
{% endif %}
{% if v.mods(sub.name) %}
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/settings">HOLE SETTINGS</a>
{% endif %}
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/mods">HOLE MODS</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/exilees">HOLE EXILEES</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/blockers">HOLE BLOCKERS</a>
{% else %}
{% if v and v.admin_level > 2 %}
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/holes">BROWSE HOLES</a>
<a class="btn btn-primary btn-block mb-3" href="/post/16583">EMOJI MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/18459">BUGS/SUGGESTIONS MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/32341">SIDEBAR ARTWORK MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/33652">SNAPPY QUOTES MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/35835">BANNER ARTWORK MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/37677">EMOJI REQUESTS MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/39413">GAMBLING MEGATHREAD</a>
<div class="rules mt-4">
Rulez:<br><br>
- Don't post anything illegal<br><br>
- No sexualizing minors even as a “joke”<br><br>
- No doxing<br><br>
- Using alts to game dramacoin will get you banned<br><br>
- Supporting free speech is an immediate ban<br><br>
<b>- Absolutely NO anti-CCP sentiment</b><br><br>
All rules can and likely will be ignored at the discretion of the janitorial staff. Be funny, or at least compelling, and pretty much anything legal is welcome<br><br>
<font color="hotpink">𝐜𝐚𝐫𝐩 𝐰𝐨𝐳 𝐞𝐫𝐞</font><BR><BR>
</div>
{% endif %}
<pre>
</pre>
</div>