feat: Add vote message
All checks were successful
Build Docker / Build Image (push) Successful in 25s
All checks were successful
Build Docker / Build Image (push) Successful in 25s
This commit is contained in:
parent
8df92712d6
commit
ec1d29ea0b
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@ node_modules
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
||||||
data/
|
data/
|
||||||
|
|
||||||
|
.env
|
||||||
|
4
main.py
4
main.py
@ -14,7 +14,7 @@ import render
|
|||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
dotenv.load_dotenv()
|
dotenv.load_dotenv()
|
||||||
|
|
||||||
|
CURRENT_VOTE = os.getenv('CURRENT_VOTE')
|
||||||
DISCORD_WEBHOOK = os.getenv('DISCORD_WEBHOOK')
|
DISCORD_WEBHOOK = os.getenv('DISCORD_WEBHOOK')
|
||||||
|
|
||||||
# If votes file doesn't exist, create it
|
# If votes file doesn't exist, create it
|
||||||
@ -52,7 +52,7 @@ def faviconPNG():
|
|||||||
def index():
|
def index():
|
||||||
year = datetime.datetime.now().year
|
year = datetime.datetime.now().year
|
||||||
votes = render.votes()
|
votes = render.votes()
|
||||||
return render_template('index.html',year=year,votes=votes)
|
return render_template('index.html',year=year,votes=votes, current_vote=CURRENT_VOTE)
|
||||||
|
|
||||||
@app.route('/<path:path>')
|
@app.route('/<path:path>')
|
||||||
def catch_all(path):
|
def catch_all(path):
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
<div class="col-md-8 text-center text-md-start mx-auto">
|
<div class="col-md-8 text-center text-md-start mx-auto">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h1 class="display-4 fw-bold mb-5">Vote on projects from<br><a class="no-a-display" href="https://nathan.woodburn.au" target="_blank"><span class="underline">Nathan.Woodburn/</span></a></h1>
|
<h1 class="display-4 fw-bold mb-5">Vote on projects from<br><a class="no-a-display" href="https://nathan.woodburn.au" target="_blank"><span class="underline">Nathan.Woodburn/</span></a></h1>
|
||||||
|
<h2 class="display-3" style="margin-bottom: 20px;">{{current_vote}}</h2>
|
||||||
<h3>You have <span id="balance">0</span> votes.</h3>
|
<h3>You have <span id="balance">0</span> votes.</h3>
|
||||||
<h4><span id="percent">0</span>% of the voting power.</h4>
|
<h4><span id="percent">0</span>% of the voting power.</h4>
|
||||||
<p class="fs-5 text-muted mb-5">Vote here</p>
|
<p class="fs-5 text-muted mb-5">Vote here</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user