diff options
author | Matthew Lemon <y@yulqen.org> | 2024-11-14 17:16:43 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-11-14 17:16:43 +0000 |
commit | 2022831d4960054aef904e27fd2934beb4e3c65e (patch) | |
tree | 77f11b9c629d66b9782d7dc6c77105bb178116d8 /app/views/categories/index.html.erb | |
parent | 9292aae8fe1876fe98c90ae0216fb4ea8917b38a (diff) |
Adds category model but not wired up to resource yet
Diffstat (limited to 'app/views/categories/index.html.erb')
-rw-r--r-- | app/views/categories/index.html.erb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb new file mode 100644 index 0000000..68911e6 --- /dev/null +++ b/app/views/categories/index.html.erb @@ -0,0 +1,21 @@ +<div class="w-full"> + <% if notice.present? %> + <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p> + <% end %> + + <% content_for :title, "Categories" %> + + <div class="flex justify-between items-center"> + <h1 class="font-bold text-4xl">Categories</h1> + <%= link_to "New category", new_category_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> + </div> + + <div id="categories" class="min-w-full"> + <% @categories.each do |category| %> + <%= render category %> + <p> + <%= link_to "Show this category", category, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + </p> + <% end %> + </div> +</div> |