]> gitweb.mndrdr.org Git - arelpe.git/commitdiff
Added some corner-case handling for users from a.c-b.com
authorAidan Cornelius-Bell <[email protected]>
Sat, 18 Jan 2025 07:18:15 +0000 (17:48 +1030)
committerAidan Cornelius-Bell <[email protected]>
Sat, 18 Jan 2025 07:18:15 +0000 (17:48 +1030)
app/assets/stylesheets/application.css
app/controllers/pubview_controller.rb
app/views/pubview/index.html.erb

index 75155dd8e5a67c1de4e1d5172e4b1e0947f8d2ed..d60475595a181bb00a7b951171dd86df561ba7da 100644 (file)
@@ -421,6 +421,10 @@ footer p {
     max-width: 80%;
 }
 
+#no-a-style {
+    color: var(--accent-b);
+}
+
 .lead-button {
     text-decoration: none;
     border: 1px dashed var(--link-color);
index 5864bce687c7dc2b1b92f028ecc8c942af50db07..6bd93f41d9f7c2c789eb4f5077e24b1af4586927 100644 (file)
@@ -7,6 +7,17 @@ class PubviewController < ApplicationController
     @page = params[:page].to_i || 1
     @filter = params[:filter] || 'all'
 
+    if params[:from] == "a...com" || session[:cbcom] == "true"
+      @cbcom = true
+      session[:cbcom] = "true"
+      puts "DEBUG: Matched condition #{@cbcom} #{session[:cbcom]} SET"
+    end
+    if params[:from] == "clear"
+      @cbcom = false
+      session.delete(:cbcom)
+      puts "DEBUG: Matched condition #{@cbcom} #{session[:cbcom]} CLEAR"
+    end
+
     @items = Post.get_posts_and_bookmarks_with_pagination(@page, @per_page, @filter)
     @total_pages = @items.total_pages
     @current_page = @items.current_page
index ada59d27ff693d530b4d7fe49b2fe4561be7e493..ec3a855080b4df6d26d46d915e63be5914f9d9fa 100644 (file)
@@ -2,7 +2,10 @@
   <%= link_to root_path do %>
        <%= image_tag "icon-512.png", class: "logo", alt: "mind reader logo" %>
   <% end %>
-  <h1 class="header">mind reader <% if ["9/1", "8/2", "14/2", "12/4"].include?(Time.current.strftime("%-d/%-m")) %><small id="valentine">acb&#10086;pab</small><% end %></h1>
+  <h1 class="header">mind reader <% if ["9/1", "8/2", "14/2", "12/4"].include?(Time.current.strftime("%-d/%-m")) %>
+                                                    <small id="valentine">acb&#10086;pab</small><% end %><% if ["7/2", "9/2"].include?(Time.current.strftime("%-d/%-m")) %>
+                                                    <small id="valentine">luxuriating in my anxiety</small><% end %><% if @cbcom === true %>
+                                                    <small id="valentine"><a href="https://aidan.cornelius-bell.com">click to return</a> <a href="/?from=clear" id="no-a-style">to cornelius-bell.com</a></small><% end %></h1>
   <p class="subheading"><small>An anti-capitalist blog of dispatches and links from Aidan Cornelius-Bell</small></p>
 </div>