A6: public home with the six states, confirmed prize, countdown and polling (WEB-05, WEB-10, WEB-11, WEB-14; LIM-24, WEB-55)
public_state() feeds both the server-rendered home (works without JavaScript) and GET /stato/, so they cannot disagree: none, open, closing, drawing, paying and maintenance, the round's own quota, the winner's 70% of the *confirmed* pool, bets in flight apart, and the closing time on the server's clock. home.js counts down against the server clock and polls every 5 s while visible. Checked in headless Chromium on mobile and desktop widths. Also records the profile reports (WEB-55, roadmap A9) and the name-lock trade-off (LIM-24). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
efb3e2e702
commit
939c113043
16 files changed
+627
-11
No files matched your search
@@ -6,6 +6,7 @@
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>{% block title %}PLM Lottery{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{% static 'web/site.css' %}">
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<a class="skip-link" href="#contenuto">Vai al contenuto</a>
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
{% extends "web/base.html" %}
|
||||
{% load static %}
|
||||
{% block head %}<script src="{% static 'web/home.js' %}" defer></script>{% endblock %}
|
||||
{% block content %}
|
||||
<h1>PLM Lottery</h1>
|
||||
<p>Il sito è in costruzione.</p>
|
||||
<p class="lead">Una lotteria a round: ogni giocatore punta la stessa quota, si estrae un vincitore, il montepremi si divide 70% a lui e 30% alla piattaforma.</p>
|
||||
|
||||
<section id="round-card" class="card round-card" data-state="{{ s.state }}" data-poll-url="{% url 'web:state' %}"
|
||||
data-server-now="{{ s.server_now }}" data-closes-at="{{ s.closes_at|default:'' }}" aria-labelledby="round-state">
|
||||
<p class="state-label" id="round-state" data-field="label" aria-live="polite">{{ s.label }}</p>
|
||||
<p class="state-message" data-field="message">{{ s.message }}</p>
|
||||
|
||||
<p class="countdown"{% if s.seconds_left is None %} hidden{% endif %} data-field="countdown-line">
|
||||
Chiude fra <strong class="clock" data-field="countdown">{{ s.countdown_text|default:'00:00' }}</strong>
|
||||
<span class="hint">(ora del server)</span>
|
||||
</p>
|
||||
|
||||
<dl class="stats">
|
||||
<div><dt>Quota</dt><dd data-field="bet_amount_text">{{ s.bet_amount_text }}</dd></div>
|
||||
<div><dt>Montepremi confermato</dt><dd data-field="jackpot_text">{{ s.jackpot_text }}</dd></div>
|
||||
<div><dt>Giocatori</dt><dd><span data-field="confirmed_players">{{ s.confirmed_players }}</span>
|
||||
<span class="hint" data-field="pending"{% if not s.pending_players %} hidden{% endif %}>+<span data-field="pending_players">{{ s.pending_players }}</span> in conferma</span></dd></div>
|
||||
</dl>
|
||||
|
||||
<p class="actions"{% if not s.can_participate %} hidden{% endif %} data-field="participate-line">
|
||||
<a class="button big" href="{% url 'web:app-home' %}" data-field="participate">Partecipa</a>
|
||||
</p>
|
||||
<p class="hint" data-field="connection" role="status" hidden>Connessione persa: i dati potrebbero non essere aggiornati. Riprovo…</p>
|
||||
<noscript><p class="hint">Senza JavaScript la pagina non si aggiorna da sola: ricaricala per vedere lo stato più recente.</p></noscript>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user