Style profile index

This commit is contained in:
Jesse C. Fisher 2023-11-07 03:58:09 +00:00
parent 18a12afb78
commit 940bcbfb2f
4 changed files with 28 additions and 10 deletions

View File

@ -213,3 +213,4 @@ textarea
padding: 1em padding: 1em
@import doodads @import doodads
@import profiles

View File

@ -0,0 +1,11 @@
.profile
text-align: center
background: #ffffff33
border-radius: 1rem
padding: 1rem
margin: 1rem
border: .1rem solid #333333
a .profile
span, p
color: black

View File

@ -1,3 +0,0 @@
// Place all the styles related to the Profiles controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/

View File

@ -7,18 +7,18 @@
= link_to 'Sign In', new_user_session_path = link_to 'Sign In', new_user_session_path
to create a new Profile to create a new Profile
%table -# %table
%thead -# %thead
%tr -# %tr
-# %th User -# %th User
%th Name -# %th Name
%th Summary -# %th Summary
%th About -# %th About
-# - if policy(Profile).destroy? -# - if policy(Profile).destroy?
-# %th -# %th
-# %th -# %th
%tbody -# %tbody
- @profiles.each do |profile| - @profiles.each do |profile|
%tr %tr
-# %td= profile.user -# %td= profile.user
@ -29,3 +29,12 @@
-# %td= link_to 'Edit', edit_profile_path(profile) -# %td= link_to 'Edit', edit_profile_path(profile)
-# %td= link_to 'Destroy', profile, method: :delete, data: { confirm: 'Are you sure?' } -# %td= link_to 'Destroy', profile, method: :delete, data: { confirm: 'Are you sure?' }
- @profiles.each do |profile|
= link_to profile do
.profile
%h1= profile.name
%span= profile.summary
%p= profile.about
- if policy(profile).destroy?
= link_to 'Edit', edit_profile_path(profile)
= link_to 'Delete', profile, method: :delete, data: { confirm: 'Are you sure?' }