-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move <head> back into app.html.erb * rendering the _head partial seemed to be negating the benefit of turbo: took 1.4ms to render that partial. chore: remove bad seed file
- Loading branch information
1 parent
f3e21c8
commit 9723378
Showing
19 changed files
with
88 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.avatar { | ||
width: 50px; | ||
height: 50px; | ||
border-radius: 50%; | ||
} | ||
|
||
.profile-container { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
background-color: azure; | ||
padding-left: 1em; | ||
} | ||
|
||
.profile-header { | ||
display: flex; | ||
align-items: center; | ||
gap: 1em; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
<div> | ||
<h2>create or edit a post here</h2> | ||
<div class="form"> | ||
<%= form_with model: @post do |post_form| %> | ||
<%= post_form.text_field :title %> | ||
<%= post_form.text_field :body %> | ||
<%= post_form.submit "Submit" %> | ||
<% end %> | ||
</div> | ||
<div class="post-form"> | ||
<%= form_with model: @post do |post_form| %> | ||
<fieldset> | ||
<legend> | ||
<h2><%= "#{action_name.capitalize} post" %></h2> | ||
</legend> | ||
<div class="post-form-fields-container"> | ||
<div class="post-title"> | ||
<%= post_form.label :title %> | ||
<%= post_form.text_field :title %> | ||
</div> | ||
<div class="post-body"> | ||
<%= post_form.label :body %> | ||
<%= post_form.text_area :body %> | ||
</div> | ||
</div> | ||
</fieldset> | ||
<%= post_form.submit "Submit" %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
<h1>Posts#edit</h1> | ||
<p>Find me in app/views/posts/edit.html.erb</p> | ||
<%= render partial: "post_form" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
<h1>Posts#new</h1> | ||
<p>Find me in app/views/posts/new.html.erb</p> | ||
<%= render partial: "post_form" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<%= render partial: 'post' %> | ||
<%= render partial: 'actions' %> | ||
<%= render partial: 'comments' %> | ||
<%# TODO: make a comment button %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<%= form_with model: @profile do |profile_form| %> | ||
<%= profile_form.label :bio %> | ||
<%= profile_form.text_area :bio %> | ||
<%= profile_form.submit "Save Changes", data: {turbo_confirm: "Really save?"} %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<h1><%= action_name == "edit" ? "Edit" : nil %> Profile</h1> | ||
<p>Keep the world apprised of your state--as if it cares.</p> | ||
<h2> | ||
<div class="profile-header"> | ||
<span class="profile-banner"><img class="avatar" src=<%= | ||
avatar_src_url(@email) %>&alt="profile pic"></span><%= @email %> | ||
</div> | ||
</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
<h1>Profile#edit</h1> | ||
<p>Find me in app/views/profile/edit.html.erb</p> | ||
<div class="profile-container"> | ||
<div class="profile"> | ||
<h2><%= @profile.user.email %>'s profile</h2> | ||
<%= form_with model: @profile do |profile_form| %> | ||
<div class="form"> | ||
<%= profile_form.label :bio %> | ||
<%= profile_form.text_area :bio %> | ||
<%= profile_form.submit "Submit" %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<%= render partial: 'header' %> | ||
<%= render partial: 'form' %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
<h1>Profile#show</h1> | ||
<p>Find me in app/views/profile/show.html.erb</p> | ||
<div class="profile-container"> | ||
<div class="profile"> | ||
<div class="profile-header"> | ||
<h2><span><img src=<%= avatar_src_url(@email) %>&alt="profile pic"></span><%= @email %></h2> | ||
</div> | ||
<p><%= @profile.bio %></p> | ||
</div> | ||
<%= render partial: 'header' %> | ||
<p><%= @profile.bio %></p> | ||
</div> | ||
<div> | ||
<%= link_to "Edit Profile", edit_profile_path %> | ||
<%= button_to "Edit Profile", edit_profile_path, method: :get %> | ||
</div> |
This file was deleted.
Oops, something went wrong.