added comments that Actually work + an updates marquee

This commit is contained in:
root 2026-02-21 07:54:30 +00:00
parent 60ef0bc9cc
commit b4afd3d9c9
8 changed files with 52 additions and 5 deletions

View file

@ -7,10 +7,12 @@ class CommentsController < ApplicationController
def create
@comment = @post.comments.build(comment_params)
if @comment.save
CommentMailer.new_comment(@comment).deliver_later
redirect_to member_blog_post_path(@member, @blog, @post), notice: "Comment added!"
else
redirect_to member_blog_post_path(@member, @blog, @post), alert: "Could not save comment."
end
end
def destroy

View file

@ -0,0 +1,11 @@
class CommentMailer < ApplicationMailer
default from: "sunset@lovingwomen.online"
def new_comment_notification
@user = params[:user]
@comment = params[:comment]
@comment_url = post_url(@comment.post)
@author = @post.member
mail(to: @user.email, subject: "A new comment was posted!")
end
end

View file

@ -0,0 +1,14 @@
<h1>New Comment on "<%= @post.title %>"</h1>
<p>
<strong><%= @comment.name %></strong> wrote:
</p>
<p>
<%= @comment.body %>
</p>
<p>
View it here:
<%= link_to "View Post", post_url(@post) %>
</p>

View file

@ -36,10 +36,10 @@
<section class="article">
<section class="auth">
<% if current_user %>
<%= link_to 'Sign Out', sign_out_path, data: { turbo_method: :delete } %>
<%= button_to "Sign Out", sign_out_path, method: :delete %>
<% else %>
<%= link_to "Sign In", new_session_path %>
<%= button_to "Sign In", login_path %>
<% end %>
</section></section>

View file

@ -23,8 +23,16 @@
<%= @post.mood %></p>
<% end %>
<hr>
<div id="c_widget"></div>
<script src="/comment-widget.js"></script>
<section class="comment">
<h2>Comments</h2>
<h2>Add a comment:</h2>
<section class="comment">
<!-- begin wwww.htmlcommentbox.com -->
<div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">Comment Form</a> is loading comments...</div>
<link rel="stylesheet" type="text/css" href="https://www.htmlcommentbox.com/static/skins/bootstrap/twitter-bootstrap.css?v=0" />
<script type="text/javascript" id="hcb"> /*<!--*/ if(!window.hcb_user){hcb_user={};} (function(){var s=document.createElement("script"), l=hcb_user.PAGE || (""+window.location).replace(/'/g,"%27"), h="https://www.htmlcommentbox.com";s.setAttribute("type","text/javascript");s.setAttribute("src", h+"/jread?page="+encodeURIComponent(l).replace("+","%2B")+"&mod=%241%24wq1rdBcg%24I2ULE.Sdf3QRU4qHM3OVg0"+"&opts=16798&num=10&ts=1771659693602");if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})(); /*-->*/ </script>
<!-- end www.htmlcommentbox.com -->
</section>
</section>

View file

@ -1,6 +1,8 @@
<section class="latestpost">
<marquee class="MyMarquee" id="my_marquee" direction="left" behavior="1" scrollamount="4">UPDATES: feb 21, 2026: added comments to posts!!</marquee>
<h3>Latest....</h3>
<% if @latest_post %>
<h2><%= @latest_post.post_title %></h2> <%=@latest_post.created_at %>
<p><%= truncate(@latest_post.text.to_plain_text, length: 200) %></p>
@ -14,7 +16,7 @@
<section class="aboutus">
<h3>Welcome...</h3>
<img src="/button.png" alt="a 88x31 site button, with a radial pink and green gradient. in the middle, there is a graphic of a computer with kiss marks."><br>
Hi! I'm Agnes (Agnes the Alien!). I'm a freakdyke alien in its mid 20s trying to create a little home on the web. Here, you will find fandom thoughts and events, personal thoughts and life goings-on, my writing and creativity, and just about anything. This website is an eternal work in progress :) Feel free to look around!<br><br>friends, mutuals, cool people... <br><a href="https://serpentinemalign.neocities.org/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/smbutton.png"></a><a href="https://eunoia.sayitditto.net/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/eunoia.png"></a><a href="https://linkyblog.neocities.org/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/linkybanner.png"></a><a href="https://www.hellomei.dev/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/hellomei.gif"></a><a href="https://maevedarcy.neocities.org/"><img src="https://hospital.alien.town/lib/exe/fetch.php?w=68&tok=84e143&media=https%3A%2F%2Ffile.garden%2FaJzQmzrHVB4BLKwu%2Fmaeve.png" width="88px"></a><br><br><marquee class="MyMarquee" id="my_marquee" direction="left" behavior="1" scrollamount="4"><a href="http://culqued.wings.nu/">NPC - The Negative Spirit</a> // <a href="http://culqued.wings.nu/"><font color="#FF0000">r</font><font color="#FF8000">a</font><font color="#FFFF00">i</font><font color="#008000">n</font><font color="#0000FF">b</font><font color="#8000FF">o</font><font color="#800080">w</font></a> &#x1F308; <font color="#03fc35">green</font> & <font color="#b5046b">pink</font> // <a href="https://lockheart.love/collections/culques">Cutie Connection</a> <img src="https://file.garden/aJzQmzrHVB4BLKwu/paw-green.png">Binturong // 🛸 If I was in <a href="https://alien.hospital/clique">Doom Patrol</a>, I'd be a Negative Spirit. 🛸 // <img src="https://file.garden/ZRcocrUQNGkxIJor/ao3e.png"> Additional <a href="https://alien.hospital/clique">Tags:</a> Vivisection // <a href="https://gg8473.com/?page=cliques">Evil Yuri</a> ★ Age Gap</marquee><br>I'm a <a href="http://deathbusters.org/romantic/" target="_blank">Hopeless Romantic</a><br>
Hi! I'm Agnes (Agnes the Alien!). I'm a freakdyke alien in its mid 20s trying to create a little home on the web. Here, you will find fandom thoughts and events, personal thoughts and life goings-on, my writing and creativity, and just about anything. This website is an eternal work in progress :) Feel free to look around!<br><br>friends, mutuals, cool internet people... <br><a href="https://serpentinemalign.neocities.org/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/smbutton.png"></a><a href="https://eunoia.sayitditto.net/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/eunoia.png"></a><a href="https://linkyblog.neocities.org/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/linkybanner.png"></a><a href="https://www.hellomei.dev/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/hellomei.gif"></a><a href="https://maevedarcy.neocities.org/"><img src="https://hospital.alien.town/lib/exe/fetch.php?w=68&tok=84e143&media=https%3A%2F%2Ffile.garden%2FaJzQmzrHVB4BLKwu%2Fmaeve.png" width="88px"></a><a href="https://overmore.neocities.org/"><img src="https://file.garden/aJzQmzrHVB4BLKwu/ul9xd6.png"></a><br><br><marquee class="MyMarquee" id="my_marquee" direction="left" behavior="1" scrollamount="4"><a href="http://culqued.wings.nu/">NPC - The Negative Spirit</a> // <a href="http://culqued.wings.nu/"><font color="#FF0000">r</font><font color="#FF8000">a</font><font color="#FFFF00">i</font><font color="#008000">n</font><font color="#0000FF">b</font><font color="#8000FF">o</font><font color="#800080">w</font></a> &#x1F308; <font color="#03fc35">green</font> & <font color="#b5046b">pink</font> // <a href="https://lockheart.love/collections/culques">Cutie Connection</a> <img src="https://file.garden/aJzQmzrHVB4BLKwu/paw-green.png">Binturong // 🛸 If I was in <a href="https://alien.hospital/clique">Doom Patrol</a>, I'd be a Negative Spirit. 🛸 // <img src="https://file.garden/ZRcocrUQNGkxIJor/ao3e.png"> Additional <a href="https://alien.hospital/clique">Tags:</a> Vivisection // <a href="https://gg8473.com/?page=cliques">Evil Yuri</a> ★ Age Gap</marquee><br>I'm a <a href="http://deathbusters.org/romantic/" target="_blank">Hopeless Romantic</a><br>
<iframe width="314" height="321" scrollng="no" src="https://gifypet.neocities.org/pet/pet.html?name=tns&dob=1755757193&gender=undefined&element=Air&pet=https%3A%2F%2Ffile.garden%2FaJzQmzrHVB4BLKwu%2Fimage1%2520-%2520Copy.png&map=https%3A%2F%2Ffile.garden%2FaJzQmzrHVB4BLKwu%2Fpink40esg.jpg&background=https%3A%2F%2Ffile.garden%2FaJzQmzrHVB4BLKwu%2Fpinkhrtsbg.gif&tablecolor=black&textcolor=black" frameborder="0"></iframe>
<center>PICLOG!!<br><a href="https://piclog.blue/profile.php?id=924"><img src="https://piclog.blue/latest.php?id=924"></a><br><div id="YumeRing"><script src="yume.js"></script></div>
</section><section class="etc"><center>

View file

@ -0,0 +1,7 @@
require "test_helper"
class CommentMailerTest < ActionMailer::TestCase
# test "the truth" do
# assert true
# end
end

View file

@ -0,0 +1,3 @@
# Preview all emails at http://localhost:3000/rails/mailers/comment_mailer
class CommentMailerPreview < ActionMailer::Preview
end