From 0dc4fc11211803f813431972d5e2265b81be4331 Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Sat, 11 Nov 2023 15:58:14 +0000 Subject: [PATCH] Improve token index style --- app/assets/stylesheets/tokens.sass | 3 +- app/views/tokens/index.html.haml | 62 +++++++++++++++--------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/app/assets/stylesheets/tokens.sass b/app/assets/stylesheets/tokens.sass index 34a2f75d..387113e2 100644 --- a/app/assets/stylesheets/tokens.sass +++ b/app/assets/stylesheets/tokens.sass @@ -2,4 +2,5 @@ font-family: "monospace" .token-logo - max-width: 100% + max-width: 3rem + vertical-align: middle diff --git a/app/views/tokens/index.html.haml b/app/views/tokens/index.html.haml index 0686854f..5f30656d 100644 --- a/app/views/tokens/index.html.haml +++ b/app/views/tokens/index.html.haml @@ -5,36 +5,36 @@ - if policy(Token).new? = link_to 'Add Token', new_token_path -.table-container - %table.token-index - %thead - %tr - %th Logo - %th Canister - %th Standard - %th Symbol - %th Name - %th Total supply - %th Decimals - %th Transfer fee - - if policy(@tokens).update? - %th - %th - %th - - %tbody - - @tokens.each do |token| + .table-container + %table.token-index + %thead %tr - %td= raw "" - %td= link_to token.canister_id, token - %td= token.standard - %td= token.symbol - %td= token.name - %td= token.total_supply - %td= token.decimals - %td= token.transfer_fee - - if policy(token).update? - %td= link_to 'Show', token - %td= link_to 'Edit', edit_token_path(token) - %td= link_to 'Destroy', token, method: :delete, data: { confirm: 'Are you sure?' } + %th Logo + %th Canister + %th Standard + %th Symbol + %th Name + %th Total supply + %th Decimals + %th Transfer fee + - if policy(@tokens).update? + %th + %th + %th + + %tbody + - @tokens.each do |token| + %tr + %td= raw "" + %td= link_to token.canister_id, token + %td= token.standard + %td= token.symbol + %td= token.name + %td= token.total_supply + %td= token.decimals + %td= token.transfer_fee + - if policy(token).update? + %td= link_to 'Show', token + %td= link_to 'Edit', edit_token_path(token) + %td= link_to 'Destroy', token, method: :delete, data: { confirm: 'Are you sure?' }