From 7767ae6cfdf27be441082e148f6d0c4a0b0ba76a Mon Sep 17 00:00:00 2001 From: Aidan Cornelius-Bell Date: Mon, 5 May 2025 10:08:13 +0930 Subject: [PATCH] Changed home page to reflect posts first not combined feed --- Gemfile.lock | 236 +++++++++--------- app/assets/stylesheets/application.css | 2 +- app/controllers/pubview_controller.rb | 4 +- .../layouts/_navigation_buttons.html.erb | 2 +- app/views/pubview/index.html.erb | 5 +- config/credentials/development.yml.enc | 1 + 6 files changed, 128 insertions(+), 122 deletions(-) create mode 100644 config/credentials/development.yml.enc diff --git a/Gemfile.lock b/Gemfile.lock index 2d948c1..c021fca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,29 +1,29 @@ GEM remote: https://rubygems.org/ specs: - actioncable (8.0.1) - actionpack (= 8.0.1) - activesupport (= 8.0.1) + actioncable (8.0.2) + actionpack (= 8.0.2) + activesupport (= 8.0.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.1) - actionpack (= 8.0.1) - activejob (= 8.0.1) - activerecord (= 8.0.1) - activestorage (= 8.0.1) - activesupport (= 8.0.1) + actionmailbox (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) - actionmailer (8.0.1) - actionpack (= 8.0.1) - actionview (= 8.0.1) - activejob (= 8.0.1) - activesupport (= 8.0.1) + actionmailer (8.0.2) + actionpack (= 8.0.2) + actionview (= 8.0.2) + activejob (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.1) - actionview (= 8.0.1) - activesupport (= 8.0.1) + actionpack (8.0.2) + actionview (= 8.0.2) + activesupport (= 8.0.2) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -31,35 +31,35 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.1) - actionpack (= 8.0.1) - activerecord (= 8.0.1) - activestorage (= 8.0.1) - activesupport (= 8.0.1) + actiontext (8.0.2) + actionpack (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.1) - activesupport (= 8.0.1) + actionview (8.0.2) + activesupport (= 8.0.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.1) - activesupport (= 8.0.1) + activejob (8.0.2) + activesupport (= 8.0.2) globalid (>= 0.3.6) - activemodel (8.0.1) - activesupport (= 8.0.1) - activerecord (8.0.1) - activemodel (= 8.0.1) - activesupport (= 8.0.1) + activemodel (8.0.2) + activesupport (= 8.0.2) + activerecord (8.0.2) + activemodel (= 8.0.2) + activesupport (= 8.0.2) timeout (>= 0.4.0) - activestorage (8.0.1) - actionpack (= 8.0.1) - activejob (= 8.0.1) - activerecord (= 8.0.1) - activesupport (= 8.0.1) + activestorage (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activesupport (= 8.0.2) marcel (~> 1.0) - activesupport (8.0.1) + activesupport (8.0.2) base64 benchmark (>= 0.3) bigdecimal @@ -74,7 +74,7 @@ GEM uri (>= 0.13.1) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) - ast (2.4.2) + ast (2.4.3) base64 (0.2.0) bcrypt (3.1.20) benchmark (0.4.0) @@ -82,7 +82,7 @@ GEM bindex (0.8.1) bootsnap (1.18.4) msgpack (~> 1.2) - brakeman (7.0.0) + brakeman (7.0.2) racc builder (3.3.0) capybara (3.40.0) @@ -99,9 +99,9 @@ GEM chronic (0.10.2) chunky_png (1.4.0) concurrent-ruby (1.3.5) - connection_pool (2.5.0) + connection_pool (2.5.3) crass (1.0.6) - csv (3.3.2) + csv (3.3.4) dante (0.2.0) date (3.4.1) debug (1.10.0) @@ -118,24 +118,25 @@ GEM devise (~> 4.0) railties (>= 7.0, < 8.1) rotp (~> 6.0) - dotenv (3.1.7) + dotenv (3.1.8) drb (2.2.1) erubi (1.13.1) globalid (1.2.1) activesupport (>= 6.1) hcaptcha (7.1.0) json - httparty (0.22.0) + httparty (0.23.1) csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.14.6) + i18n (1.14.7) concurrent-ruby (~> 1.0) io-console (0.8.0) - irb (1.14.3) + irb (1.15.2) + pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.9.1) + json (2.11.3) jsonapi-serializer (2.2.0) activesupport (>= 4.2) kaminari (1.2.2) @@ -150,13 +151,15 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) - language_server-protocol (3.17.0.3) - launchy (3.0.1) + language_server-protocol (3.17.0.4) + launchy (3.1.1) addressable (~> 2.8) childprocess (~> 5.0) + logger (~> 1.6) letter_opener (1.10.0) launchy (>= 2.2, < 4) - logger (1.6.5) + lint_roller (1.1.0) + logger (1.7.0) loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -169,49 +172,53 @@ GEM matrix (0.4.2) mini_mime (1.1.5) mini_portile2 (2.8.8) - minitest (5.25.4) - msgpack (1.7.5) + minitest (5.25.5) + msgpack (1.8.0) multi_json (1.15.0) - multi_xml (0.7.1) + multi_xml (0.7.2) bigdecimal (~> 3.1) mysql2 (0.5.6) - net-imap (0.5.5) + net-imap (0.5.8) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.5.0) + net-smtp (0.5.1) net-protocol nio4r (2.7.4) - nokogiri (1.18.1) + nokogiri (1.18.8) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.18.1-aarch64-linux-gnu) + nokogiri (1.18.8-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.1-arm-linux-gnu) + nokogiri (1.18.8-arm-linux-gnu) racc (~> 1.4) - nokogiri (1.18.1-arm64-darwin) + nokogiri (1.18.8-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.1-x86_64-darwin) + nokogiri (1.18.8-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.1-x86_64-linux-gnu) + nokogiri (1.18.8-x86_64-linux-gnu) racc (~> 1.4) orm_adapter (0.5.0) ostruct (0.6.1) - parallel (1.26.3) - parser (3.3.7.0) + parallel (1.27.0) + parser (3.3.8.0) ast (~> 2.4.1) racc - psych (5.2.2) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + prism (1.4.0) + psych (5.2.4) date stringio - public_suffix (6.0.1) - puma (6.5.0) + public_suffix (6.0.2) + puma (6.6.0) nio4r (~> 2.0) racc (1.8.1) - rack (3.1.8) + rack (3.1.13) rack-session (2.1.0) base64 (>= 0.1.0) rack (>= 3.0.0) @@ -219,20 +226,20 @@ GEM rack (>= 1.3) rackup (2.2.1) rack (>= 3) - rails (8.0.1) - actioncable (= 8.0.1) - actionmailbox (= 8.0.1) - actionmailer (= 8.0.1) - actionpack (= 8.0.1) - actiontext (= 8.0.1) - actionview (= 8.0.1) - activejob (= 8.0.1) - activemodel (= 8.0.1) - activerecord (= 8.0.1) - activestorage (= 8.0.1) - activesupport (= 8.0.1) + rails (8.0.2) + actioncable (= 8.0.2) + actionmailbox (= 8.0.2) + actionmailer (= 8.0.2) + actionpack (= 8.0.2) + actiontext (= 8.0.2) + actionview (= 8.0.2) + activejob (= 8.0.2) + activemodel (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) bundler (>= 1.15.0) - railties (= 8.0.1) + railties (= 8.0.2) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -244,9 +251,9 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.0.1) - actionpack (= 8.0.1) - activesupport (= 8.0.1) + railties (8.0.2) + actionpack (= 8.0.2) + activesupport (= 8.0.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -254,61 +261,62 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - rdoc (6.11.0) + rdoc (6.13.1) psych (>= 4.0.0) - redcarpet (3.6.0) + redcarpet (3.6.1) regexp_parser (2.10.0) - reline (0.6.0) + reline (0.6.1) io-console (~> 0.5) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.4.0) + rexml (3.4.1) rotp (6.3.0) - rouge (4.5.1) - rqrcode (2.2.0) + rouge (4.5.2) + rqrcode (3.1.0) chunky_png (~> 1.0) - rqrcode_core (~> 1.0) - rqrcode_core (1.2.0) - rubocop (1.70.0) + rqrcode_core (~> 2.0) + rqrcode_core (2.0.0) + rubocop (1.75.4) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.36.2, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.37.0) - parser (>= 3.3.1.0) - rubocop-minitest (0.36.0) - rubocop (>= 1.61, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-performance (1.23.1) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.28.0) + rubocop-ast (1.44.1) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-performance (1.25.0) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + rubocop-rails (2.31.0) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.52.0, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails-omakase (1.0.0) - rubocop - rubocop-minitest - rubocop-performance - rubocop-rails + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + rubocop-rails-omakase (1.1.0) + rubocop (>= 1.72) + rubocop-performance (>= 1.24) + rubocop-rails (>= 2.30) ruby-progressbar (1.13.0) rubyzip (2.4.1) securerandom (0.4.1) - selenium-webdriver (4.27.0) + selenium-webdriver (4.32.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sprockets (4.2.1) + sprockets (4.2.2) concurrent-ruby (~> 1.0) + logger rack (>= 2.2.4, < 4) sprockets-rails (3.5.2) actionpack (>= 6.1) @@ -316,7 +324,7 @@ GEM sprockets (>= 3.0.0) streamio-ffmpeg (3.0.2) multi_json (~> 1.8) - stringio (3.1.2) + stringio (3.1.7) stripe (5.55.0) stripe-ruby-mock (3.1.0) dante (>= 0.2.0) @@ -329,7 +337,7 @@ GEM unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) - uri (1.0.2) + uri (1.0.3) useragent (0.16.11) warden (1.2.9) rack (>= 2.0.9) @@ -347,7 +355,7 @@ GEM chronic (>= 0.6.3) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.1) + zeitwerk (2.7.2) PLATFORMS aarch64-linux diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index d604755..9a7f595 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -77,7 +77,7 @@ /* Root variables (Dark mode) */ :root { --post-bg: #2b2b2b; /* Deep blue-grey for content areas */ - --body-bg: #262626; /* Slightly lighter blue-grey for main background */ + --body-bg: #1f1f1f; /* Slightly lighter blue-grey for main background */ --quote-bg: #4a4a4a; /* Medium blue-grey for quoted content */ --link-color: #a58cb5; /* Bright blue for links */ --accent-a: #8f7d9b; /* Primary blue */ diff --git a/app/controllers/pubview_controller.rb b/app/controllers/pubview_controller.rb index 6bd93f4..fa64997 100644 --- a/app/controllers/pubview_controller.rb +++ b/app/controllers/pubview_controller.rb @@ -10,14 +10,14 @@ class PubviewController < ApplicationController 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 + @filter = params[:filter] || 'posts' + @items = Post.get_posts_and_bookmarks_with_pagination(@page, @per_page, @filter) @total_pages = @items.total_pages @current_page = @items.current_page diff --git a/app/views/layouts/_navigation_buttons.html.erb b/app/views/layouts/_navigation_buttons.html.erb index 223bce8..144668f 100644 --- a/app/views/layouts/_navigation_buttons.html.erb +++ b/app/views/layouts/_navigation_buttons.html.erb @@ -1,7 +1,7 @@
- <%= link_to "Everything", root_path(filter: 'all'), class: "button #{@filter == 'all' ? 'active' : ''}" %> <%= link_to "Dispatches", root_path(filter: 'posts'), class: "button #{@filter == 'posts' ? 'active' : ''}" %> <%= link_to "Bookmarks", root_path(filter: 'bookmarks'), class: "button #{@filter == 'bookmarks' ? 'active' : ''}" %> + <%= link_to "Combined feed", root_path(filter: 'all'), class: "button #{@filter == 'all' ? 'active' : ''}" %> <%= link_to "About", public_page_path("about"), class: "button #{@page.is_a?(Page) && @page.slug == 'about' ? 'active' : ''}" %> <% if !current_user %> diff --git a/app/views/pubview/index.html.erb b/app/views/pubview/index.html.erb index 1708f4f..1045c7d 100644 --- a/app/views/pubview/index.html.erb +++ b/app/views/pubview/index.html.erb @@ -2,10 +2,7 @@ <%= link_to root_path do %> <%= image_tag "icon-512.png", class: "logo", alt: "mind reader logo" %> <% end %> -

mind reader

+

mind reader <% if @cbcom === true %>click to return to cornelius-bell.com<% end %>

An anti-capitalist blog of dispatches and links from Aidan Cornelius-Bell

diff --git a/config/credentials/development.yml.enc b/config/credentials/development.yml.enc new file mode 100644 index 0000000..3c37f70 --- /dev/null +++ b/config/credentials/development.yml.enc @@ -0,0 +1 @@ +OkcB4xQy9zy3bl1sPpvhekWe1avl1uhE85EyZY+7bozWL68VmenjYEVJETKaTQ20C83Zt3gwo8F7SKrgSw2ieXmqli8c7/iPoS9KjDo1altcMazsrHb130peLUv/lt+6A12NsjXH/cspD2PfXSqJaowlenIPd6REXwTZZVSkw/hr0KM=--UWq3zJQ6b5T3qait--6QVOHfv1TL25z6OaFD4jTQ== \ No newline at end of file -- 2.39.5