Skip to content

Commit 145735c

Browse files
committed
Add DEVCADE_IS_DEV environment variable
Set DEVCADE_IS_DEV to show a slick dev icon
1 parent 1f59572 commit 145735c

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@
3030
OIDC_CLIENT_ID = env.get('OIDC_CLIENT_ID', 'devcade')
3131
OIDC_CLIENT_SECRET = env.get('OIDC_CLIENT_SECRET', 'NOT-A-SECRET')
3232

33-
DEVCADE_API_URI = env.get('DEVCADE_API_URI')
33+
DEVCADE_API_URI = env.get('DEVCADE_API_URI')
34+
35+
DEVCADE_IS_DEV = env.get('DEVCADE_IS_DEV')
27.2 KB
Loading

src/templates/header.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,24 @@ <h3>{{ game.author }}</h3>
3737
<body onload="dropdown_init()">
3838
<div id="navBar">
3939
<div class="crate">
40+
41+
{% if config.DEVCADE_IS_DEV %}
42+
<a href="/" class="title">
43+
<img
44+
style="height: 3em"
45+
src="{{ url_for('static', filename='images/DevcadeDevLogoNoText.png') }}"
46+
/>
47+
<h1>Devcade</h1>
48+
</a>
49+
{% else %}
4050
<a href="/" class="title">
4151
<img
4252
style="height: 3em"
4353
src="{{ url_for('static', filename='images/DevcadeLogoNoText.png') }}"
4454
/>
4555
<h1>Devcade</h1>
4656
</a>
47-
57+
{% endif %}
4858
<div class="dropdown-toggle">
4959
<img
5060
src="{{ url_for('static', filename='icons/picklist.svg') }}"

0 commit comments

Comments
 (0)