Styling and information improvements
This commit is contained in:
parent
9684dd39dd
commit
9fe186a08d
|
@ -0,0 +1,31 @@
|
||||||
|
.character {
|
||||||
|
background-color: var(--inset-bg-color);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 1.1em;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 a:link, h5 a:visited {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
> ul {
|
||||||
|
padding: 0;
|
||||||
|
li {
|
||||||
|
list-style-type: none;
|
||||||
|
display: inline;
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
font-size: .8em;
|
||||||
|
&:after {
|
||||||
|
content: " • ";
|
||||||
|
}
|
||||||
|
&:last-child:after {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,8 @@
|
||||||
--header-text-color: #fff;
|
--header-text-color: #fff;
|
||||||
--header-height: 200px;
|
--header-height: 200px;
|
||||||
|
|
||||||
|
--secondary-text-color: #777;
|
||||||
|
|
||||||
--inset-bg-color: #eee;
|
--inset-bg-color: #eee;
|
||||||
|
|
||||||
--border-radius: .5em;
|
--border-radius: .5em;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<div id=<%= dom_id(character) %>>
|
<div id=<%= dom_id(character) %> class="character">
|
||||||
<h6><%= link_to character.name, character %></h6>
|
<h5><%= link_to character.name, character %></h5>
|
||||||
<p><%= character.game_system.name %></p>
|
<ul>
|
||||||
|
<li><%= character.game_system.name %></li>
|
||||||
|
<li><%= character.user.username %></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,6 +12,24 @@
|
||||||
<dd><%= @table.owner.username %></dd>
|
<dd><%= @table.owner.username %></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
<h4><%= t(".characters") %></h4>
|
||||||
|
<% if @table.characters.any? %>
|
||||||
|
<ul><%= render @table.characters %></ul>
|
||||||
|
<% else %>
|
||||||
|
<p><%= t(".no_characters") %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<h4><%= t(".users") %></h4>
|
||||||
|
<% if @table.users.any? %>
|
||||||
|
<ul>
|
||||||
|
<% @table.users.each do |user| %>
|
||||||
|
<li><%= link_to user.username, user %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% else %>
|
||||||
|
<p><%= t(".no_users") %></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if @table_invites.any? %>
|
<% if @table_invites.any? %>
|
||||||
<h4>Pending invites</h4>
|
<h4>Pending invites</h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
"ignored_warnings": [
|
||||||
|
{
|
||||||
|
"warning_type": "Dynamic Render Path",
|
||||||
|
"warning_code": 15,
|
||||||
|
"fingerprint": "42478896b621fa561e9866e0bc1339d9864fea72109e83c02b194967272202cc",
|
||||||
|
"check_name": "Render",
|
||||||
|
"message": "Render path contains parameter value",
|
||||||
|
"file": "app/views/tables/show.html.erb",
|
||||||
|
"line": 17,
|
||||||
|
"link": "https://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
|
||||||
|
"code": "render(action => Current.user.tables.find(params[:id]).characters, {})",
|
||||||
|
"render_path": [
|
||||||
|
{
|
||||||
|
"type": "controller",
|
||||||
|
"class": "TablesController",
|
||||||
|
"method": "show",
|
||||||
|
"line": 12,
|
||||||
|
"file": "app/controllers/tables_controller.rb",
|
||||||
|
"rendered": {
|
||||||
|
"name": "tables/show",
|
||||||
|
"file": "app/views/tables/show.html.erb"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"location": {
|
||||||
|
"type": "template",
|
||||||
|
"template": "tables/show"
|
||||||
|
},
|
||||||
|
"user_input": "params[:id]",
|
||||||
|
"confidence": "Weak",
|
||||||
|
"cwe_id": [
|
||||||
|
22
|
||||||
|
],
|
||||||
|
"note": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"updated": "2024-06-05 18:49:27 +0100",
|
||||||
|
"brakeman_version": "6.1.2"
|
||||||
|
}
|
|
@ -161,6 +161,10 @@ en:
|
||||||
game_system: Game system
|
game_system: Game system
|
||||||
owner: Owner
|
owner: Owner
|
||||||
invite_user: Invite a new player
|
invite_user: Invite a new player
|
||||||
|
no_characters: This table doesn’t have any characters yet
|
||||||
|
no_users: This table doesn’t have any players yet
|
||||||
|
users: Players
|
||||||
|
characters: Characters
|
||||||
new:
|
new:
|
||||||
new_table: New table
|
new_table: New table
|
||||||
create_table: Create table
|
create_table: Create table
|
||||||
|
|
Loading…
Reference in New Issue