Add command-line tutorial (PreGameController) and link it from the lobby
Adds a black-terminal tutorial page at /game/pregame/{session} that walks
players through help, pwd, cd, ls, cat, rm and sudo before the real game
starts. Links to it are shown on both the lobby (waiting for players) and
ready-up screens so players can practice, repeatedly, before starting.
This commit is contained in:
@@ -27,6 +27,13 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="alert alert-secondary">
|
||||
<strong>New here?</strong> Try the <a href="{{ path('game_pregame', {session: session.id}) }}" target="_blank" rel="noopener">command line tutorial</a>.
|
||||
It's a small tutorial that gives you the information you'll need for the game to run.
|
||||
You can go through it as many times as you like — just make sure you feel at least a little confident
|
||||
with the commands it covers before you start the game.
|
||||
</div>
|
||||
|
||||
{% if session.players|length >= session.game.numberOfPlayers %}
|
||||
<form method="post" action="{{ path('game_dashboard') }}" class="mb-3">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('start_session_' ~ session.id) }}">
|
||||
|
||||
@@ -30,6 +30,13 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-secondary">
|
||||
<strong>New here?</strong> Try the <a href="{{ path('game_pregame', {session: session.id}) }}" target="_blank" rel="noopener">command line tutorial</a>.
|
||||
It's a small tutorial that gives you the information you'll need for the game to run.
|
||||
You can go through it as many times as you like — just make sure you feel at least a little confident
|
||||
with the commands it covers before you start the game.
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<h5>Players status:</h5>
|
||||
<ul class="list-group">
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app.request.locale|default(app.request.defaultLocale|default('en')) }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Command Line Tutorial</title>
|
||||
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{{ encore_entry_link_tags('pregame') }}
|
||||
</head>
|
||||
<body>
|
||||
<div id="game-container">
|
||||
<div id="message-container">
|
||||
<div class="message">No tutorial is available for this game yet.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{{ encore_entry_script_tags('pregame') }}
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app.request.locale|default(app.request.defaultLocale|default('en')) }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Command Line Tutorial</title>
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{{ encore_entry_link_tags('pregame') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="game-container">
|
||||
<div id="pregame-config"
|
||||
data-session-id="{{ session.id|e('html_attr') }}"
|
||||
style="display:none">
|
||||
</div>
|
||||
|
||||
<div id="message-container">
|
||||
|
||||
</div>
|
||||
<div id="input">
|
||||
<input type="text" disabled id="input-message">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
{% block javascripts %}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{{ encore_entry_script_tags('pregame') }}
|
||||
{% endblock %}
|
||||
</html>
|
||||
Reference in New Issue
Block a user