diff options
Diffstat (limited to 'app/views/items')
-rw-r--r-- | app/views/items/index.html.erb | 8 | ||||
-rw-r--r-- | app/views/items/show.html.erb | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/app/views/items/index.html.erb b/app/views/items/index.html.erb new file mode 100644 index 0000000..5d004d3 --- /dev/null +++ b/app/views/items/index.html.erb @@ -0,0 +1,8 @@ +<h1 class="text-3xl mb-4">Items</h1> + +<% @items.each do |item| %> + <div class="my-2"> + <div><%= link_to item.name, item_path(item) %></div> + <p class="italic"><%= item.description %></p> + </div> +<% end %> diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb new file mode 100644 index 0000000..675c518 --- /dev/null +++ b/app/views/items/show.html.erb @@ -0,0 +1,12 @@ +<h1 class="text-3xl mb-2"><%= @item.name %></h1> +<p class="italic"><%= @item.description %></p> + +<div class="my-6"> + <h2 class="text-xl">Game Data</h2> + <p>GID: <span class="text-code"><%= @item.gid %></span></p> + <% if @item.whatnot %> + <div class="text-code my-2"><%= JSON.pretty_generate(@item.whatnot) %></div> + <% else %> + <p>Item has no additional data.</p> + <% end %> +</div> |