diff --git a/slices/admin/templates/layouts/app.html.slim b/slices/admin/templates/layouts/app.html.slim index bf2a879..28ecea3 100644 --- a/slices/admin/templates/layouts/app.html.slim +++ b/slices/admin/templates/layouts/app.html.slim @@ -28,12 +28,12 @@ html a href="/" rel="me" class="u-url u-uid" h1 class="p-name uppercase text-sm md:text-sm text-gray-400 dark:text-gray-400" = Hanami.app.settings.site_name nav class="space-x-1 text-sm md:text-sm uppercase md:block" - a class="p-1 rounded text-gray-400 hover:bg-red-100 hover:text-red-400 dark:hover:bg-red-200 #{link_active?('about') ? 'text-red-600 dark:text-red-400' : ''}" href="/admin" Admin + a class="p-1 rounded text-gray-400 hover:bg-red-100 hover:text-red-400 dark:hover:bg-red-200 #{context.current_path == '/admin' ? 'text-red-600 dark:text-red-400' : ''}" href="/admin" Admin span class="text-gray-400 dark:text-gray-600" = "/" - a class="p-1 rounded text-gray-400 hover:bg-red-100 hover:text-red-400 dark:hover:bg-red-200 #{link_active?('about') ? 'text-red-600 dark:text-red-400' : ''}" href="/admin/tags" Tags + a class="p-1 rounded text-gray-400 hover:bg-red-100 hover:text-red-400 dark:hover:bg-red-200 #{context.current_path.include?('/admin/tags') ? 'text-red-600 dark:text-red-400' : ''}" href="/admin/tags" Tags span class="text-gray-400 dark:text-gray-600" = "/" - a class="p-1 rounded text-gray-400 hover:bg-red-100 hover:text-red-400 dark:hover:bg-red-200 #{link_active?('about') ? 'text-red-600 dark:text-red-400' : ''}" href="/admin/bookmarks" Bookmarks + a class="p-1 rounded text-gray-400 hover:bg-red-100 hover:text-red-400 dark:hover:bg-red-200 #{context.current_path.include?('/bookmarks') ? 'text-red-600 dark:text-red-400' : ''}" href="/admin/bookmarks" Bookmarks == yield \ No newline at end of file diff --git a/slices/admin/templates/shared/_tag.html.slim b/slices/admin/templates/shared/_tag.html.slim index db98575..ead78b3 100644 --- a/slices/admin/templates/shared/_tag.html.slim +++ b/slices/admin/templates/shared/_tag.html.slim @@ -1,4 +1,4 @@ -li id="tag-#{tag.id}" class="text-gray-800 dark:text-gray-200" - = "#{tag.label} (#{tag.posts.count})" +li id="tag-#{post_tag.id}" class="text-gray-800 dark:text-gray-200" + = "#{post_tag.label} (#{post_tag.posts.count})" = " — " - button hx-delete="/admin/tags/#{tag.id}" hx-target="#tag-#{tag.id}" delete \ No newline at end of file + button hx-delete="/admin/tags/#{post_tag.id}" hx-target="#tag-#{post_tag.id}" delete \ No newline at end of file diff --git a/slices/admin/templates/tags/index.html.slim b/slices/admin/templates/tags/index.html.slim index 995604f..402f0e4 100644 --- a/slices/admin/templates/tags/index.html.slim +++ b/slices/admin/templates/tags/index.html.slim @@ -3,13 +3,13 @@ div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark: div class="max-w-prose mx-auto" ul - - unused_tags.each do |tag| - == render "shared/tag", tag: tag + - unused_tags.each do |post_tag| + == render "shared/tag", post_tag: post_tag - if !unused_tags.empty? li class="py-2" hr - - used_tags.each do |tag| - == render "shared/tag", tag: tag + - used_tags.each do |post_tag| + == render "shared/tag", post_tag: post_tag div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"