forked from rDrama/rDrama
247 lines
6.1 KiB
HTML
247 lines
6.1 KiB
HTML
{% extends "default.html" %}
|
|
{% block pagetitle %}{{game.capitalize()}}{% endblock %}
|
|
{% block content %}
|
|
<style nonce="{{g.nonce}}">
|
|
.game_screen-title {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-transform: uppercase;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.game_screen-title hr {
|
|
flex: 1;
|
|
margin-left: 0.5rem;
|
|
}
|
|
|
|
#casinoGameResult {
|
|
visibility: hidden;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
#casinoGameFeedList {
|
|
max-height: 110px;
|
|
overflow: auto;
|
|
list-style-type: none;
|
|
}
|
|
</style>
|
|
|
|
<script defer src="{{'js/game_screen.js' | asset}}"></script>
|
|
|
|
{% block script %} {% endblock %}
|
|
|
|
<style nonce="{{g.nonce}}">
|
|
@keyframes drawing {
|
|
from {
|
|
left: 0;
|
|
opacity: 1;
|
|
}
|
|
|
|
to {
|
|
left: 100px;
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
.drawing-a-card {
|
|
animation: drawing 1s ease-in-out;
|
|
}
|
|
|
|
.playing-card-deck {
|
|
position: relative;
|
|
z-index: 3;
|
|
box-shadow: -5px 5px 5px 0px rgba(60, 60, 60, 0.56);
|
|
-webkit-box-shadow: -5px 5px 5px 0px rgba(60, 60, 60, 0.56);
|
|
-moz-box-shadow: -5px 5px 5px 0px rgba(60, 60, 60, 0.56);
|
|
}
|
|
|
|
.flipped-playing-card {
|
|
position: absolute;
|
|
width: 100px;
|
|
height: 150px;
|
|
border-radius: 4px;
|
|
border: 1px solid #21262C;
|
|
background-color: #FF66AC;
|
|
transform: scale(0.7);
|
|
}
|
|
|
|
.playing-card {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 100px;
|
|
height: 150px;
|
|
border-radius: 4px;
|
|
border: 1px solid #21262C;
|
|
background-color: #FFF;
|
|
box-shadow: -5px 5px 5px 0px rgba(60, 60, 60, 0.56);
|
|
-webkit-box-shadow: -5px 5px 5px 0px rgba(60, 60, 60, 0.56);
|
|
-moz-box-shadow: -5px 5px 5px 0px rgba(60, 60, 60, 0.56);
|
|
}
|
|
|
|
.playing-card_red {
|
|
color: #ff0000;
|
|
}
|
|
|
|
.playing-card_black {
|
|
color: #333;
|
|
}
|
|
|
|
.playing-card_small {
|
|
font-size: 18px;
|
|
position: absolute;
|
|
}
|
|
|
|
.playing-card_large {
|
|
font-size: 48px;
|
|
text-align: center;
|
|
}
|
|
|
|
.playing-card_topright {
|
|
top: 6px;
|
|
right: 6px;
|
|
}
|
|
|
|
.playing-card_bottomleft {
|
|
bottom: 6px;
|
|
left: 6px;
|
|
transform: scaleX(-1) scaleY(-1);
|
|
}
|
|
|
|
#casinoGameResult, #casinoGameStats {
|
|
text-transform: uppercase;
|
|
text-align: center;
|
|
letter-spacing: 3px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.casino-game-leaderboard {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.casino-game-leaderboard-info {
|
|
text-align: right;
|
|
text-transform: uppercase;
|
|
letter-spacing: 2px;
|
|
}
|
|
|
|
.leaderboard-marsey-trophy {
|
|
position: relative;
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
|
|
.leaderboard-marsey-trophy__marsey {
|
|
position: relative;
|
|
z-index: 1;
|
|
height: 100px;
|
|
}
|
|
|
|
.leaderboard-marsey-trophy__trophy {
|
|
position: absolute;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 2;
|
|
font-size: 48px;
|
|
}
|
|
</style>
|
|
|
|
<div id="casino-game-wrapper" data-game="{{game}}" class="container-fluid" style="max-width: 500px">
|
|
<div class="row row-cols-1">
|
|
<div class="col game_screen-title">
|
|
<h3>{{game}}</h3>
|
|
<hr>
|
|
</div>
|
|
<div class="col">{% block screen %} {% endblock %}</div>
|
|
<div class="col">
|
|
<div id="casinoGameResult" class="alert" role="alert">
|
|
{% block result %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
{% set stats_alert_class = 'success' if v_stats[0] >= v_stats[2] else 'danger' %}
|
|
<div id="casinoGameStats" class="alert alert-{{stats_alert_class}}" role="alert">
|
|
{{v_stats[0]}} win{{macros.plural(v_stats[0])}}{% if v_stats[1] %} - {{v_stats[1]}} tie{{macros.plural(v_stats[1])}}{% endif %} - {{v_stats[2]}} loss{{macros.plural(v_stats[2], 'es')}}
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="row row-cols-2">
|
|
<div class="col">
|
|
<div class="game_screen-title">
|
|
<h5>Wager</h5>
|
|
<hr>
|
|
</div>
|
|
<input id="wagerAmount" type="number" min="5" step="1" value="5" class="form-control">
|
|
</div>
|
|
<div class="col">
|
|
<div class="game_screen-title">
|
|
<h5>Currency</h5>
|
|
<hr>
|
|
</div>
|
|
<div class="btn-group" role="group">
|
|
<input type="radio" class="btn-check" name="wagerCurrency" autocomplete="off" id="wagerCoins"
|
|
value="coin" checked>
|
|
<label for="wagerCoins" class="btn btn-primary">
|
|
<img src="/i/rDrama/coins.webp?v=3009" alt="coin" width="32" data-bs-toggle="tooltip"
|
|
data-bs-placement="bottom" title="Coin">
|
|
</label>
|
|
<input type="radio" class="btn-check ml-2" name="wagerCurrency" autocomplete="off" id="wagerMarseybux"
|
|
value="marseybux">
|
|
<label for="wagerMarseybux" class="btn btn-primary">
|
|
<img src="/i/marseybux.webp?v=2000" alt="marseybux" width="32" data-bs-toggle="tooltip"
|
|
data-bs-placement="bottom" title="Marseybux">
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="game_screen-title">
|
|
<h5>{% block actiontext %}Actions{% endblock %}</h5>
|
|
<hr>
|
|
</div>
|
|
{% block actions %} {% endblock %}
|
|
</div>
|
|
<div id="casinoGameFeed" data-feed="{{feed}}" class="col">
|
|
<div class="game_screen-title">
|
|
<h5>Feed</h5>
|
|
<hr>
|
|
</div>
|
|
<ul id="casinoGameFeedList"></ul>
|
|
<button type="button" class="btn btn-secondary" style="width: 100%" onclick="reloadFeed()">
|
|
Reload Feed
|
|
</button>
|
|
</div>
|
|
<div class="col">
|
|
<div class="game_screen-title">
|
|
<h5>Leaders</h5>
|
|
<hr>
|
|
</div>
|
|
<div id="gameLeaderboard" data-leaderboard="{{leaderboard}}">
|
|
{%- macro leaderboard(text, css_class, marsey, color) -%}
|
|
<div class="casino-game-leaderboard">
|
|
<div class="leaderboard-marsey-trophy">
|
|
<img class="leaderboard-marsey-trophy__marsey" src="/e/{{marsey}}.webp">
|
|
<i class="fas fa-trophy leaderboard-marsey-trophy__trophy" style="color: {{color}};"></i>
|
|
</div>
|
|
<div class="casino-game-leaderboard-info">
|
|
<small>{{text}}</small>
|
|
<h3 id="{{css_class}}">-</h3>
|
|
</div>
|
|
</div>
|
|
{%- endmacro -%}
|
|
{{leaderboard('Biggest Winner (All Time)', 'biggestWinnerAllTime', 'marseyhappytears', 'gold')}}
|
|
{{leaderboard('Biggest Winner (Last 24h)', 'biggestWinner24h', 'marseyexcited', 'gold')}}
|
|
{{leaderboard('Biggest Loser (Last 24h)', 'biggestLoser24h', 'marseycry', 'darkred')}}
|
|
{{leaderboard('Biggest Loser (All Time)', 'biggestLoserAllTime', 'marseyrain', 'darkred')}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|