more shit
This commit is contained in:
parent
e5878ea429
commit
554e0bd9c8
5 changed files with 14 additions and 25 deletions
|
|
@ -7,7 +7,7 @@ class PostsController < ApplicationController
|
|||
before_action :set_post, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
def index
|
||||
@posts = @blog.posts
|
||||
@posts = Post.order(created_at: :desc)
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<body>
|
||||
|
||||
<main><br>
|
||||
<div class="headerall"><h3 class="float"><img src="/kissingcomputer.png" width="80px" alt="An emoji of a computer with kiss marks."> K I S S I N G C O M P U T E R</h3><div class="header"> <a href="/">Home</a> | <a href="/members/1">About Me</a> | <a href="/blogmap">Pages</a> | <a href="/sitemaps">Sitemap</a> | <a href="https://lesbian.alien.dentist/@feed.atom"><img src="https://file.garden/aJzQmzrHVB4BLKwu/46.png" alt="pink rss feed logo"></a></div></div>
|
||||
<div class="headerall"><h3 class="float"><img src="/kissingcomputer.png" width="80px" alt="An emoji of a computer with kiss marks."> K I S S I N G C O M P U T E R</h3><div class="header"> <a href="/">Home</a> | <a href="/members/1">About Me</a> | <a href="/blogmap">Pages</a> | <a href="https://lesbian.alien.dentist/@feed.atom"><img src="https://file.garden/aJzQmzrHVB4BLKwu/46.png" alt="pink rss feed logo"></a></div></div>
|
||||
<br><br>
|
||||
<section class="article">
|
||||
<section class="auth">
|
||||
|
|
|
|||
|
|
@ -58,12 +58,12 @@
|
|||
</section>
|
||||
|
||||
<section class="about">
|
||||
<label for="member_blog">Choose a blog:</label>
|
||||
<label for="member_blog">Choose a category:</label>
|
||||
<select id="member_blog" onchange="if(this.value){
|
||||
window.location.href = '<%= member_blog_path(@member, 'BLOG_ID') %>'.replace('BLOG_ID', this.value);
|
||||
}
|
||||
">
|
||||
<option value="">My blogs</option>
|
||||
<option value="">My stuff</option>
|
||||
<% @member.blogs.each do |blog| %>
|
||||
<option value="<%= blog.id %>"><%= blog.title %></option>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
<%= link_to 'Edit', edit_member_blog_post_path(@member, @blog, post) %>
|
||||
<%= link_to 'Destroy', member_blog_post_path(@member, @blog, post), data: {
|
||||
turbo_method: :delete
|
||||
turbo_method: :delete,
|
||||
turbo_confirm: "Are you sureee?"
|
||||
} %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -6,34 +6,22 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Content:</strong>
|
||||
<strong></strong>
|
||||
<%= @post.text %>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
<% if @post.music.present? %>
|
||||
<strong>Currently Listening To...:</strong>
|
||||
<%= @post.music %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% if @post.mood.present? %>
|
||||
<p>
|
||||
<strong>Current Mood:</strong>
|
||||
<%= @post.mood %>
|
||||
<hr>
|
||||
<section class="comment">
|
||||
<h2>Comments</h2>
|
||||
<%= render @post.comments %>
|
||||
add a comment...
|
||||
<%= form_with(
|
||||
model: [@post.blog.member, @post.blog, @post, Comment.new],
|
||||
local: true
|
||||
) do |form| %>
|
||||
|
||||
<%= form.label :commenter %><br>
|
||||
<%= form.text_field :commenter %>
|
||||
<br>
|
||||
<%= form.label :body %><br>
|
||||
<%= form.rich_text_area :body %>
|
||||
|
||||
<%= form.submit %>
|
||||
<%= @post.mood %></p>
|
||||
<% end %>
|
||||
</section></section>
|
||||
<hr>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue