Skip to content

Commit

Permalink
css changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrasco committed Nov 19, 2023
1 parent e7023c6 commit 5b5f2f3
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 49 deletions.
23 changes: 16 additions & 7 deletions nobles_and_peasants/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ li a:hover {
margin: 30px auto 10px auto;
}

.nap_table th {
text-decoration: underline;
}

.nap_table th,
.nap_table td {
padding: 5px;
Expand Down Expand Up @@ -265,23 +261,36 @@ li a:hover {
#setup_info {
clear: both;
padding-top: 20px;
margin: 50px auto 20px auto;
margin: 20px auto 20px auto;
}

.setup_block {
float: left;
width: 33%;
min-width: 320px;
margin: auto;
}

.setup_form { margin: 10px auto 0px auto;
.setup_form { margin: 10px auto 10px auto;
width: 90%;
background: #C09F80;
padding: 0.5em;
height: 160px;
height: 120px;
display: inline-block;
text-align: center; }

#easy_reward {
width: 20%;
}

#medium_reward {
width: 20%;
}

#hard_reward {
width: 20%;
}

/*-------------------Main Page------------------------*/

.flash_main { background: #76323F; padding: 0.5em; color: white; width: 50%}
Expand Down
29 changes: 15 additions & 14 deletions nobles_and_peasants/templates/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
<div id="setup_info">
<div class="setup_block" id="set_drinks">
<h3>Drinks At Your Party</h3>
<p>Please drink responsibly</p>
<table class="nap_table" id="drinks_table">
<thead>
<tr>
<td>Drink Name</td>
<td>Price</td>
<th>Drink Name</th>
<th>Price</th>
</tr>
</thead>
<tbody>
Expand All @@ -23,19 +24,19 @@ <h3>Drinks At Your Party</h3>
</tbody>
</table>
<form action="{{ url_for('game.add_drink') }}" method="post" class="setup_form" class="add_drink_form">
<input class="input_box" type="text" name="drink_name" placeholder="Name" required></input>
<input class="input_box" type="text" name="drink_name" placeholder="Drink Name" required></input>
<input class="num_box" type="number" name="price" placeholder="Price" min=1 required></input>
<input class="submit_button" type="submit" value="Add or Update Drink"></input>
</form>
</div>
<div class="setup_block" id="set_coin">
<h3>Starting Coin For Nobles and Peasants</h3>
<p>Give nobles just enough money to support an army</p>
<h3>Initial Coin For Players</h3>
<p>The source of class inequality in the party</p>
<table class="nap_table" id="coin_table">
<thead>
<tr>
<td>Status</td>
<td>Starting Coin</td>
<th>Status</th>
<th>Initial Coin</th>
</tr>
</thead>
<tbody>
Expand All @@ -50,17 +51,17 @@ <h3>Starting Coin For Nobles and Peasants</h3>
<form action="{{ url_for('game.set_coin') }}" method="post" class="setup_form" id="set_coin_form">
<input class="num_box" type="number" name="noble_coin" placeholder="Noble Coin" min=1 required></input>
<p></p>
<input class="submit_button" type="submit" value="Update Starting Coin"></input>
<input class="submit_button" type="submit" value="Update Initial Coin"></input>
</form>
</div>
<div class="setup_block" id="set_reward">
<h3>Rewards For Completing Quests</h3>
<p>Control how easily peasants can get coin</p>
<p>Larger rewards leads to faster upwards mobility</p>
<table class="nap_table" id="reward_table">
<thead>
<tr>
<td>Quest Difficulty</td>
<td>Coin Rewarded</td>
<th>Quest Difficulty</th>
<th>Coin Rewarded</th>
</tr>
</thead>
<tbody>
Expand All @@ -73,9 +74,9 @@ <h3>Rewards For Completing Quests</h3>
</tbody>
</table>
<form action="{{ url_for('game.set_wages') }}" method="post" class="setup_form" id="set_wage_form">
<input class="num_box" type="number" name="easy" placeholder="Easy" min=1 required></input>
<input class="num_box" type="number" name="medium" placeholder="Medium" min=1 required></input>
<input class="num_box" type="number" name="hard" placeholder="Hard" min=1 required></input>
<input class="num_box" id="easy_reward" type="number" name="easy" placeholder="Easy" min=1 required></input>
<input class="num_box" id="medium_reward" type="number" name="medium" placeholder="Medium" min=1 required></input>
<input class="num_box" id="hard_reward" type="number" name="hard" placeholder="Hard" min=1 required></input>
<p></p>
<input class="submit_button" type="submit" value="Set Quest Rewards"></input>
</form>
Expand Down
34 changes: 18 additions & 16 deletions nobles_and_peasants/templates/show_kingdom.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@
{% block body %}
<div class="kingdom">
<table class="nap_table" id="kingdom_table">
<thead><tr>
<td>Name</td>
<td>Status</td>
<td>Allegiance</td>
<td>Coin</td>
<td>Drinks</td>
<td>Soldiers</td>
</tr></thead>
<thead
><tr>
<th>Name</th>
<th>Status</th>
<th>Allegiance</th>
<th>Coin</th>
<th>Drinks</th>
<th>Soldiers</th>
</tr>
</thead>
<tbody>
{% for player in players %}
<tr>
<td>{{player.player_name}}</td>
<td>{{player.player_status}}</td>
<td>{{player.noble_name}}</td>
<td>{{player.coin}}</td>
<td>{{player.drinks}}</td>
<td>{{player.soldiers}}</td>
</tr>
<tr>
<td>{{player.player_name}}</td>
<td>{{player.player_status}}</td>
<td>{{player.noble_name}}</td>
<td>{{player.coin}}</td>
<td>{{player.drinks}}</td>
<td>{{player.soldiers}}</td>
</tr>
{% endfor %}
</tbody>
</table>
Expand Down
26 changes: 14 additions & 12 deletions nobles_and_peasants/templates/show_leaderboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ <h3>{{almighty_ruler}}</h3>
</div>
<div class="leaderboard">
<table class="nap_table" id="leaderboard_table">
<thead><tr>
<td>Name</td>
<td>Soldiers</td>
<td>Coin</td>
<td>Drinks</td>
</tr></thead>
<thead>
<tr>
<th>Name</th>
<th>Soldiers</th>
<th>Coin</th>
<th>Drinks</th>
</tr>
</thead>
<tbody>
{% for noble in leaderboard %}
<tr>
<td>{{noble.player_name}}</td>
<td>{{noble.soldiers}}</td>
<td>{{noble.coin}}</td>
<td>{{noble.drinks}}</td>
</tr>
<tr>
<td>{{noble.player_name}}</td>
<td>{{noble.soldiers}}</td>
<td>{{noble.coin}}</td>
<td>{{noble.drinks}}</td>
</tr>
{% endfor %}
</tbody>
</table>
Expand Down

0 comments on commit 5b5f2f3

Please sign in to comment.