From: Aidan Cornelius-Bell Date: Wed, 14 May 2025 02:00:59 +0000 (+0930) Subject: Burried bookmarks function (not using); changed CSS for readability; updated nav... X-Git-Url: https://gitweb.mndrdr.org/?a=commitdiff_plain;h=63c7c9a16788a15b2a8e550ef80e653a0e93f980;p=arelpe.git Burried bookmarks function (not using); changed CSS for readability; updated nav for consistency; display full post on home page; using hyperlegible font --- diff --git a/Gemfile.lock b/Gemfile.lock index 33e399f..766c4ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -136,7 +136,7 @@ GEM pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.11.3) + json (2.12.0) jsonapi-serializer (2.2.0) activesupport (>= 4.2) kaminari (1.2.2) @@ -151,7 +151,7 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) - language_server-protocol (3.17.0.4) + language_server-protocol (3.17.0.5) launchy (3.1.1) addressable (~> 2.8) childprocess (~> 5.0) @@ -160,7 +160,7 @@ GEM launchy (>= 2.2, < 4) lint_roller (1.1.0) logger (1.7.0) - loofah (2.24.0) + loofah (2.24.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -171,7 +171,7 @@ GEM marcel (1.0.4) matrix (0.4.2) mini_mime (1.1.5) - mini_portile2 (2.8.8) + mini_portile2 (2.8.9) minitest (5.25.5) msgpack (1.8.0) multi_json (1.15.0) @@ -211,7 +211,7 @@ GEM prettyprint prettyprint (0.2.0) prism (1.4.0) - psych (5.2.5) + psych (5.2.6) date stringio public_suffix (6.0.2) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 9a7f595..5a616e0 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -74,6 +74,135 @@ font-style: italic; } +/* Atkinson Hyperlegible Next Font Family */ + +/* Regular */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +/* Regular Italic */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +/* Light */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-Light.woff2') format('woff2'); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +/* Light Italic */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-LightItalic.woff2') format('woff2'); + font-weight: 300; + font-style: italic; + font-display: swap; +} + +/* Extra Light */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-ExtraLight.woff2') format('woff2'); + font-weight: 200; + font-style: normal; + font-display: swap; +} + +/* Extra Light Italic */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-ExtraLightItalic.woff2') format('woff2'); + font-weight: 200; + font-style: italic; + font-display: swap; +} + +/* Medium */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-Medium.woff2') format('woff2'); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +/* Medium Italic */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-MediumItalic.woff2') format('woff2'); + font-weight: 500; + font-style: italic; + font-display: swap; +} + +/* Semi Bold */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-SemiBold.woff2') format('woff2'); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +/* Semi Bold Italic */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-SemiBoldItalic.woff2') format('woff2'); + font-weight: 600; + font-style: italic; + font-display: swap; +} + +/* Bold */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +/* Bold Italic */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +/* Extra Bold */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-ExtraBold.woff2') format('woff2'); + font-weight: 800; + font-style: normal; + font-display: swap; +} + +/* Extra Bold Italic */ +@font-face { + font-family: 'Atkinson Hyperlegible Next'; + src: url('/fonts/AtkinsonHyperlegibleNext-ExtraBoldItalic.woff2') format('woff2'); + font-weight: 800; + font-style: italic; + font-display: swap; +} + + /* Root variables (Dark mode) */ :root { --post-bg: #2b2b2b; /* Deep blue-grey for content areas */ @@ -87,6 +216,8 @@ --dark-text: #ffffff; /* Pure white for headers */ --light-text: #eeeeee; /* Muted blue for secondary text */ --code-text: #9b8aa6; /* Bright blue for code/special text */ + + --today-text: #c6b8b2; /* #3b0aff */ --filter-button-text: #eeeeee; --filter-button: #3d3d3d; @@ -106,17 +237,19 @@ /* Light mode, overwrites at the top of the CSS so it doesn't need to be repeated elsewhere */ @media (prefers-color-scheme: light) { :root { - --post-bg: #fdf6f0; + --post-bg: #fff3f1; --body-bg: #f5e6db; --quote-bg: #e8d1c0; --link-color: #af794d; /* c28656 */ --accent-a: #f2a76c; - --accent-b: #6a8693; + --accent-b: #42697a; --accent-c: #9e6b57; --body-text: #4a332c; --dark-text: #2c1e1a; --light-text: #7d5b4e; --code-text: #b3461c; + + --today-text: #634439; --filter-button-text: #2c1e1a; --filter-button: #e8d1c0; @@ -137,7 +270,7 @@ /* Basic styles */ body { - font-family: "Meta Correspondence Pro", sans-serif; + font-family: "Atkinson Hyperlegible Next", "Meta Correspondence Pro", sans-serif; background-color: var(--body-bg); color: var(--body-text); line-height: 1.6; @@ -182,6 +315,10 @@ blockquote { color: var(--light-text); } +.home-full-content { + max-width: 812px; +} + code { font-family: monospace; background-color: var(--post-bg); @@ -487,6 +624,11 @@ footer p { font-size: 0.8em; } +.add-whitespace { + height: 6em; + width: 1px; +} + .bookmark-buttons { margin-bottom: -5px; padding-bottom: 3px; @@ -641,8 +783,8 @@ input[type="reset"]:hover, .filter-buttons { margin: 20px auto auto; - text-align: center; - max-width: 945px; + text-align: left; + max-width: 952px; } .filter-buttons .button { @@ -691,14 +833,14 @@ input[type="reset"]:hover, .date-heading:first-of-type { margin-top: 0em; margin-bottom: 0.5em; - font-weight: 500; - color: var(--dark-text); + font-weight: 400; + color: var(--today-text); } .date-heading { margin-top: 2.5em; margin-bottom: 0.5em; - font-weight: 500; + font-weight: 400; color: var(--dark-text); } @@ -889,7 +1031,8 @@ ul .post-item a:visited { padding: 0.5em; border-left: 2px solid var(--accent-a); background: var(--post-bg); - word-break: break-all; + word-break: initial; + margin-top: 0.8em !important; transition: border-color 0.2s, background-color 0.2s; @@ -898,6 +1041,7 @@ ul .post-item a:visited { .side-note a { color: var(--light-text); text-decoration: underline; + word-break: break-word; font-size: 0.9em; } @@ -905,6 +1049,11 @@ ul .post-item a:visited { border-left-color: var(--link-color); background-color: var(--quote-bg); } + + .side-note p { + word-break: initial; + padding: 0; margin: 0; + } /* Style reference numbers in main text */ .main-content p a[rel="nofollow"] { diff --git a/app/controllers/pubview_controller.rb b/app/controllers/pubview_controller.rb index fa64997..9a9cd4d 100644 --- a/app/controllers/pubview_controller.rb +++ b/app/controllers/pubview_controller.rb @@ -3,7 +3,7 @@ class PubviewController < ApplicationController before_action :set_promo, only: [:index, :post] def index - @per_page = 15 + @per_page = 3 @page = params[:page].to_i || 1 @filter = params[:filter] || 'all' diff --git a/app/services/markdown_renderer.rb b/app/services/markdown_renderer.rb index 712c59f..0cffba5 100644 --- a/app/services/markdown_renderer.rb +++ b/app/services/markdown_renderer.rb @@ -19,11 +19,6 @@ class MarkdownRenderer renderer = Redcarpet::Render::HTML.new(options) markdown = Redcarpet::Markdown.new(renderer, extensions) - '
' + - '
' + - markdown.render(text) + - '
' + - '
' + - '
' + markdown.render(text) end end diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index f2f30b7..fa49fe5 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -54,7 +54,7 @@
-
+
diff --git a/app/views/layouts/_navigation_buttons.html.erb b/app/views/layouts/_navigation_buttons.html.erb index 144668f..cec9430 100644 --- a/app/views/layouts/_navigation_buttons.html.erb +++ b/app/views/layouts/_navigation_buttons.html.erb @@ -1,11 +1,11 @@
- <%= 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 "#{action_name == 'post' ? 'More dispatches' : 'Dispatches'}", root_path(filter: 'posts'), class: "button #{@filter == 'posts' ? 'active' : ''}" %> + <%= link_to "About", public_page_path("about"), class: "button #{@page.is_a?(Page) && @page.slug == 'about' ? 'active' : ''}" %> <% if !current_user %> - <%= link_to "Join mind reader", join_path, class: "button" %> + <%= link_to "Join mind reader", join_path, class: "button #{action_name == 'join' ? 'active' : ''}" %> <% else %> <%= link_to "My membership", subscriptions_path, class: "button #{controller_name == 'subscriptions' ? 'active' : ''}" %> <%= link_to "My emails", mailing_lists_path, class: "button #{controller_name == 'mailing_lists' ? 'active' : ''}" %> diff --git a/app/views/mailing_lists/index.html.erb b/app/views/mailing_lists/index.html.erb index 3955bcd..d459374 100644 --- a/app/views/mailing_lists/index.html.erb +++ b/app/views/mailing_lists/index.html.erb @@ -1,7 +1,7 @@ <% content_for :title do %>Your mailing list membership<% end %> <% content_for :form_content do %> -

Below you can change your settings for receiving new dispatches as they are published. This is sent via a service called Buttondown, and you can manage your subscription below and via the settings at the bottom of emails sent by the service. Note, <%= link_to "members", subscriptions_path %> may also receive a digest version of mind reader which includes full-text dispatches and bookmarks via the opt-in on your <%= link_to "profile page", edit_user_registration_path %>.

+

Below you can change your settings for receiving new dispatches as they are published. This is sent via a service called Buttondown, and you can manage your subscription below and via the settings at the bottom of emails sent by the service.

<% if @buttondown_status == 'unactivated' %>

You are not currently subscribed to our mailing list.

diff --git a/app/views/pubview/index.html.erb b/app/views/pubview/index.html.erb index 1045c7d..bd22a53 100644 --- a/app/views/pubview/index.html.erb +++ b/app/views/pubview/index.html.erb @@ -3,7 +3,7 @@ <%= image_tag "icon-512.png", class: "logo", alt: "mind reader logo" %> <% end %>

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

+

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

<%= render partial: "layouts/navigation_buttons" %> @@ -13,9 +13,6 @@ <% @items.group_by { |item| item.respond_to?(:published_at) ? item.published_at&.to_date : item.created_at.to_date }.each do |date, items| %>
  • From <%= date&.strftime('%B %e, %Y') %>: - <% if !current_user %> - <%= @promo_strings.sample %> <%= link_to "Start right now", join_path %>. - <% end %>
  • <% items.each do |item| %>
  • "> @@ -26,13 +23,9 @@ posted <%= item.published_at.strftime('%d/%m/%y') %>, tagged as <%= raw item.format_tags %> - <% if item.short_dispatch? %> -
    - <%= raw item.rendered_content.html_safe %> -
    - <% else %> -
    <%= item.generate_excerpt %>...
    - <% end %> +
    + <%= raw item.rendered_content.html_safe %> +
    <% else %> <%= link_to item.title, item.url, target: "_blank" %> @@ -57,4 +50,4 @@ -
  • +
    \ No newline at end of file diff --git a/app/views/pubview/join.html.erb b/app/views/pubview/join.html.erb index 1a6b2e9..cb95b5d 100644 --- a/app/views/pubview/join.html.erb +++ b/app/views/pubview/join.html.erb @@ -4,9 +4,11 @@ <% end %> <% content_for :title, "Join mind reader" %>

    Join mind reader

    - <%= link_to "↼ Back home...", "#{root_path}" %> +

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

    +<%= render partial: "layouts/navigation_buttons" %> +
    <%= image_tag "growchart.svg", class: "porter" %> @@ -15,7 +17,7 @@
    • ☛ Direct dispatches: fresh analysis straight to your inbox.
    • ☛ Community dialogue: exchange ideas and correspond directly about posts.
    • -
    • ☛ Weekly digests: curated collections of essential reading and resources.
    • +
    • ☛ A place to support my work by becoming a financial member (free, annual and lifetime tiers — pay what you want).

    There’s no paywall here – just like there shouldn’t be barriers to critical thought. Joining takes two minutes and keeps this independent platform for radical analysis going strong. So, what are you waiting for? Let’s be happy together!

    @@ -23,7 +25,7 @@

    As a current member (thank you!) you can adjust your settings on these pages:

    <% if current_user&.paid_user? %><%= link_to "Financial supporter settings", subscriptions_path, class: "button" %><% else %><%= link_to "Become a financial supporter", subscriptions_path, class: "button" %><% end %> <%= link_to "Join the mailing list", mailing_lists_path, class: "button" %>

    <% else %> - <%= image_tag "aidan_arrow.svg", class: "aidans_arrow" %> + <%= image_tag "aidan_arrow.svg", class: "aidans_arrow" %>

    To get started with mind reader membership – always free – simply register for an account on this website and confirm your email. Don’t worry, I’ll guide you through each step of the process! Just Get started below:

    <%= link_to "Get started, free forever", new_user_registration_path, class: "button" %> <%= link_to "Log back in", new_user_session_path, class: "button" %>

    <% end %> diff --git a/app/views/pubview/post.html.erb b/app/views/pubview/post.html.erb index 223912c..5b8900a 100644 --- a/app/views/pubview/post.html.erb +++ b/app/views/pubview/post.html.erb @@ -9,22 +9,23 @@ <% if @post.post_type != "bookmark" %>

    Aidan Cornelius-Bell’s mind reader:

    <%= @post.title %>

    -
    + <%= render partial: "layouts/navigation_buttons" %> + <% else %>

    Aidan Cornelius-Bell’s mind reader:

    <%= @post.title %>

    -
    + @@ -42,8 +43,18 @@ <% if @post.audio.present? && @post.audio.file.attached? %> <%= render partial: "shared/audio_player", locals: { audio: @post.audio } %> <% end %> - - <%= raw @rendered_content %> + +
    +
    + <%= raw @rendered_content %> +
    +
    +
    + + <% if @post.bookmark? %> +
    + + <% end %> <% if @post.bookmark? && @post.summary? %>

    @@ -64,79 +75,7 @@
    <%= render partial: "layouts/home_post_links" %>
    -<% else %> - <% end %> - +<%= render partial: "scripts/side_notes" %> + diff --git a/app/views/pubview/show_public.html.erb b/app/views/pubview/show_public.html.erb index 0cfc165..9c1316a 100644 --- a/app/views/pubview/show_public.html.erb +++ b/app/views/pubview/show_public.html.erb @@ -4,7 +4,7 @@ <% end %> <% content_for :title, "#{@page.title} :: mind reader" %>

    <%= @page.title.downcase %>

    -

    Aidan’s anti-capitalist posting and sharing project

    +

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

    <%= render partial: "layouts/navigation_buttons" %> diff --git a/app/views/scripts/_side_notes.html.erb b/app/views/scripts/_side_notes.html.erb new file mode 100644 index 0000000..1ca9fcc --- /dev/null +++ b/app/views/scripts/_side_notes.html.erb @@ -0,0 +1,68 @@ + \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index 7be03bd..7b350a2 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -19,6 +19,10 @@ Rails.application.configure do # Do jobs config.active_job.queue_adapter = :async + + config.assets.compress = false + config.assets.debug = true + # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. diff --git a/public/fonts/AtkinsonHyperlegibleNext-Bold.woff2 b/public/fonts/AtkinsonHyperlegibleNext-Bold.woff2 new file mode 100644 index 0000000..3b73597 Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-Bold.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-BoldItalic.woff2 b/public/fonts/AtkinsonHyperlegibleNext-BoldItalic.woff2 new file mode 100644 index 0000000..25b2858 Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-BoldItalic.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-ExtraBold.woff2 b/public/fonts/AtkinsonHyperlegibleNext-ExtraBold.woff2 new file mode 100644 index 0000000..65039ac Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-ExtraBold.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-ExtraBoldItalic.woff2 b/public/fonts/AtkinsonHyperlegibleNext-ExtraBoldItalic.woff2 new file mode 100644 index 0000000..5abb72e Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-ExtraBoldItalic.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-ExtraLight.woff2 b/public/fonts/AtkinsonHyperlegibleNext-ExtraLight.woff2 new file mode 100644 index 0000000..5a13603 Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-ExtraLight.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-ExtraLightItalic.woff2 b/public/fonts/AtkinsonHyperlegibleNext-ExtraLightItalic.woff2 new file mode 100644 index 0000000..ad1940c Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-ExtraLightItalic.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-Light.woff2 b/public/fonts/AtkinsonHyperlegibleNext-Light.woff2 new file mode 100644 index 0000000..b1eac3f Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-Light.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-LightItalic.woff2 b/public/fonts/AtkinsonHyperlegibleNext-LightItalic.woff2 new file mode 100644 index 0000000..f0f492f Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-LightItalic.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-Medium.woff2 b/public/fonts/AtkinsonHyperlegibleNext-Medium.woff2 new file mode 100644 index 0000000..e82765d Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-Medium.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-MediumItalic.woff2 b/public/fonts/AtkinsonHyperlegibleNext-MediumItalic.woff2 new file mode 100644 index 0000000..c9e218a Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-MediumItalic.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-Regular.woff2 b/public/fonts/AtkinsonHyperlegibleNext-Regular.woff2 new file mode 100644 index 0000000..d2babdf Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-Regular.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2 b/public/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2 new file mode 100644 index 0000000..dc05d06 Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-SemiBold.woff2 b/public/fonts/AtkinsonHyperlegibleNext-SemiBold.woff2 new file mode 100644 index 0000000..a7d9ece Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-SemiBold.woff2 differ diff --git a/public/fonts/AtkinsonHyperlegibleNext-SemiBoldItalic.woff2 b/public/fonts/AtkinsonHyperlegibleNext-SemiBoldItalic.woff2 new file mode 100644 index 0000000..f911176 Binary files /dev/null and b/public/fonts/AtkinsonHyperlegibleNext-SemiBoldItalic.woff2 differ