From 7780f74f3fc559f52dbe4730acf06e1de675701c Mon Sep 17 00:00:00 2001 From: Aidan Cornelius-Bell Date: Sat, 23 Nov 2024 08:52:58 +1030 Subject: [PATCH] Visual revisions to post page, changes to join page for logged in users, introduction of a handful of emojis --- Gemfile.lock | 6 +-- app/assets/stylesheets/application.css | 40 ++++++++++++++++- app/views/devise/registrations/edit.html.erb | 47 +++++++++++--------- app/views/layouts/_home_post_links.html.erb | 8 ++-- app/views/pubview/join.html.erb | 11 +++-- app/views/pubview/post.html.erb | 17 ++++--- 6 files changed, 91 insertions(+), 38 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 662018a..1bf95f8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -167,7 +167,7 @@ GEM marcel (1.0.4) matrix (0.4.2) mini_mime (1.1.5) - minitest (5.25.1) + minitest (5.25.2) msgpack (1.7.5) multi_xml (0.7.1) bigdecimal (~> 3.1) @@ -243,7 +243,7 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - rdoc (6.7.0) + rdoc (6.8.1) psych (>= 4.0.0) redcarpet (3.6.0) regexp_parser (2.9.2) @@ -304,7 +304,7 @@ GEM activesupport (>= 6.1) sprockets (>= 3.0.0) stringio (3.1.2) - stripe (13.1.2) + stripe (13.2.0) thor (1.3.2) timeout (0.4.2) tzinfo (2.0.6) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index c40fba6..0332ca8 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -286,6 +286,25 @@ footer p { text-align: center; } +.container .lead { + color: var(--code-text); + max-width: 80%; + margin: auto; +} + +.lead-button { + text-decoration: none; + border: 1px dashed var(--link-color); + padding: 5px; + border-radius: 5px; +} + +.lead-button:hover, +.lead-button:active { + text-decoration: none; + border: 1px solid var(--link-color); +} + .porter { max-width: 170px; float: right; @@ -313,6 +332,22 @@ footer p { display: none; } +.postmeta { + max-width: 80%; + border-radius: 3px; + background: var(--quote-bg); + padding: 3px 15px; +} + +.bookmark-buttons { + margin-bottom: -5px; + padding-bottom: 3px; +} + +.button-bottomless { + border-radius: 5px 5px 0 0 !important; +} + .logo { max-width: 48px; float: right; @@ -547,7 +582,7 @@ ul .post-item a:visited { } } -@media (max-width: 480px) { +@media (max-width: 506px) { .container, footer { margin: 5px 10px -10px 5px; @@ -565,4 +600,7 @@ ul .post-item a:visited { .logo { margin-top: 20px; } + .postmeta { + max-width: 100%; + } } diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index e9e2528..95a875f 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -2,7 +2,7 @@ <% content_for :form_content do %>

Welcome back, <%= resource.first_name %>. Your email address is <%= resource.confirmed? ? "confirmed":"not yet confirmed, please check your email soon" %>.

- + <% if current_user %> <% if current_user.ongoing_subscriber? %>

Thank you for your <%= link_to "ongoing support", subscriptions_path %>!

@@ -15,20 +15,21 @@ <% end %> <% end %> -
- +
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> <%= render "devise/shared/error_messages", resource: resource %> -
- <%= f.label :first_name %> - <%= f.text_field :first_name %> -
- -
- <%= f.label :last_name %> - <%= f.text_field :last_name %> -
+
+
+ <%= f.label :first_name %> + <%= f.text_field :first_name %> +
+
+ <%= f.label :last_name %> + <%= f.text_field :last_name %> +
+
<%= f.label :email %> @@ -39,17 +40,19 @@
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
<% end %> -
- <%= f.label :password %> (leave blank if you don't want to change it) - <%= f.password_field :password, autocomplete: "new-password" %> - <% if @minimum_password_length %> - <%= @minimum_password_length %> characters minimum - <% end %> -
+
+
+ <%= f.label :password %> + <%= f.password_field :password, autocomplete: "new-password", placeholder: "Leave blank to keep your current password" %> + <% if @minimum_password_length %> + <%= @minimum_password_length %> characters minimum + <% end %> +
-
- <%= f.label :password_confirmation %> - <%= f.password_field :password_confirmation, autocomplete: "new-password" %> +
+ <%= f.label :password_confirmation %> + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> +
diff --git a/app/views/layouts/_home_post_links.html.erb b/app/views/layouts/_home_post_links.html.erb index 066ea83..f69f519 100644 --- a/app/views/layouts/_home_post_links.html.erb +++ b/app/views/layouts/_home_post_links.html.erb @@ -1,9 +1,9 @@ <% if !@post&.short_dispatch? %> <% if @post&.title? %>

Follow via RSS, Email or Membership...

<% end %> -

→ Want an email for each new post? Join the mailing list for free <%= link_to "right here ↙︎".html_safe, "/join/" %>.

-

→ Like this work and want to support it? Get started <%= link_to " here ↙︎".html_safe, "/join/" %>.

-

→ Prefer RSS? you can subscribe to a combined <%= link_to "bookmarks+dispatches feed here ↙︎".html_safe, rss_path %> or <%= link_to "full text dispatches only feed here ↗︎".html_safe, dispatches_rss_path %>.

+

→ 📬 Want an email for each new post? Join the mailing list for free <%= link_to "right here ↙︎".html_safe, "/join/" %>.

+

→ 💰 Like this work and want to support it? Get started <%= link_to " here ↙︎".html_safe, "/join/" %>.

+

→ 📰 Prefer RSS? you can subscribe to a combined <%= link_to "bookmarks+dispatches feed here ↙︎".html_safe, rss_path %> or <%= link_to "full text dispatches only feed here ↗︎".html_safe, dispatches_rss_path %>.

<% end %> <% if @post %> -

<%= link_to "↑ Back to top", "#top" %> or <%= link_to "↼ Back to some other dispatches...", "#{root_path}?filter=posts" %>

+

<%= link_to "↑ Back to top", "#top" %> or <%= link_to "⥤ Read more", "#{root_path}" %>

<% end %> diff --git a/app/views/pubview/join.html.erb b/app/views/pubview/join.html.erb index a9cd094..1a6b2e9 100644 --- a/app/views/pubview/join.html.erb +++ b/app/views/pubview/join.html.erb @@ -11,7 +11,7 @@
<%= image_tag "growchart.svg", class: "porter" %>

Join the counter-hegemony

-

mind reader is where theory meets practice. As a free member, you’ll join a growing community of readers thinking deeply about capitalism, technology, and social transformation. What you get for free:

+

mind reader is where theory meets practice. As a <% if current_user %>member you have joined <% else %>free member, you’ll join<% end %> a growing community of readers thinking deeply about capitalism, technology, and social transformation. What you get for free:

  • ☛ Direct dispatches: fresh analysis straight to your inbox.
  • ☛ Community dialogue: exchange ideas and correspond directly about posts.
  • @@ -19,9 +19,14 @@
  • ☛ 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!

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

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" %>

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" %>

-

You can always easily (read: no phone call or email required) cancel any paid affiliation and close your account forever, no quesetions asked. Just log in and modify your options by clicking here: <%= link_to "manage payments", subscriptions_path %>.

+ <% end %> +

You can always easily (read: no phone call or email required) cancel any paid affiliation and close your account forever, no quesetions asked.

diff --git a/app/views/pubview/post.html.erb b/app/views/pubview/post.html.erb index f1ecddf..0268a68 100644 --- a/app/views/pubview/post.html.erb +++ b/app/views/pubview/post.html.erb @@ -8,15 +8,22 @@ <% content_for :meta_published, "#{@post.created_at&.strftime('%Y-%m-%d')}" %> <% if @post.post_type != "bookmark" %>

<%= @post.title %>

- <%= link_to "↼ Back to some other dispatches...", "#{root_path}?filter=posts" %> +
+ <%= link_to "↼ More dispatches 👀", "#{root_path}?filter=posts", class: "button button-bottomless" %> + <% if !current_user %> + <%= link_to "Join mind reader 🫰🏽", join_path, class: "button button-bottomless" %> + <% end %> +
<% else %>

Bookmark comment permalink:

<%= @post.title %>

- <%= link_to "View original content", @post.url, class: "button", target: "_BLANK" %> - <%= link_to "More from mind reader", "#{root_path}?filter=bookmarks", class: "button" %> +
+ <%= link_to "👁 View linked content", @post.url, class: "button button-bottomless", target: "_BLANK" %> + <%= link_to "🗞 More from mind reader", "#{root_path}", class: "button button-bottomless" %> +
@@ -26,7 +33,7 @@
<% if !current_user %> -

<%= @promo_strings.sample %> <%= link_to "Start right now", join_path %>.

+

<%= @promo_strings.sample %> <%= link_to "Start right now!", join_path, class: "lead-button" %>

<% end %> <%= raw @rendered_content %>
-- 2.39.5