font-size: 0.8rem;
}
+.lead {
+ font-size: 1.1em;
+ text-align: center;
+}
+
.porter {
max-width: 170px;
float: right;
class PubviewController < ApplicationController
-
- def index
+ before_action :set_promo, only: [:index, :post]
+
+ def index
@per_page = 15
@page = params[:page].to_i || 1
@filter = params[:filter] || 'all'
-
+
@items = Post.get_posts_and_bookmarks_with_pagination(@page, @per_page, @filter)
@total_pages = @items.total_pages
@current_page = @items.current_page
end
-
- def show_public
+
+ def show_public
if current_user&.admin?
@page = Page.find_by(slug: params[:slug], visibility: ['visible', 'user_only', 'admin_only'])
elsif current_user
render 'error/error', status: :not_found
end
end
-
+
def join
-
+
end
def post
start_date = Date.new(params[:year].to_i, 1, 1)
end_date = Date.new(params[:year].to_i, 12, 31)
-
+
@post = Post.find_by(slug: params[:slug], published_at: start_date..end_date)
-
+
if @post
@reading_time = calculate_reading_time(@post.content)
@excerpt = @post.generate_excerpt
format.rss { render layout: false }
end
end
-
+
def dispatches_rss
@posts = Post.dispatches.order(published_at: :desc).limit(20)
respond_to do |format|
private
+ def set_promo
+ @promo_strings = [
+ "Join mind reader’s free community of radical thinkers analysing capitalism’s contradictions and imagining better futures.",
+ "Like what you’re reading? Join mind reader (free) to get fresh critical analysis delivered directly to you.",
+ "Support independent radical thought. Join mind reader’s growing community of readers thinking deeply about social transformation.",
+ "Want more analysis like this? Join mind reader (free) to never miss a dispatch.",
+ "Be part of the conversation. Join mind reader’s free community of readers analysing capitalism, technology and social change."
+ ]
+ end
+
def calculate_reading_time(content)
word_count = content.split.size
(word_count / 200.0).ceil
<% if !@post&.short_dispatch? %>
<% if @post&.title? %><h3>Follow via RSS, Email or Membership...</h3><% end %>
-<p><span class="callout">→ Prefer email or want to sponsor?</span> Learn about supporting my work and joining the free mailing list <%= link_to "right here <abbr title=\"internal link\">↙︎</abbr>".html_safe, "/join/" %>.</p>
+<p><span class="callout">→ Want an email for each new post?</span> Join the mailing list for free <%= link_to "right here <abbr title=\"internal link\">↙︎</abbr>".html_safe, "/join/" %>.</p>
+<p><span class="callout">→ Like this work and want to support it?</span> Get started <%= link_to " here <abbr title=\"internal link\">↙︎</abbr>".html_safe, "/join/" %>.</p>
<p><span class="callout">→ Prefer RSS?</span> you can subscribe to a combined <%= link_to "bookmarks+dispatches feed here <abbr title=\"internal link\">↙︎</abbr>".html_safe, rss_path %> or <%= link_to "full text dispatches only feed here <abbr title=\"external link\">↗︎</abbr>".html_safe, dispatches_rss_path %>.</p>
<% end %>
<% if @post %>
<p><%= link_to "↑ Back to top", "#top" %> or <%= link_to "↼ Back to some other dispatches...", "#{root_path}?filter=posts" %></p>
-<% end %>
\ No newline at end of file
+<% end %>
<%= render partial: "layouts/navigation_buttons" %>
+<% if !current_user %>
+ <p class="lead"><%= @promo_strings.sample %> <%= link_to "Start right now", join_path %>.</p>
+<% end %>
+
<div class="post">
<ul class="container">
<% @items.each do |item| %>
<div class="post">
<div class="container">
<%= image_tag "growchart.svg", class: "porter" %>
- <h3>Below you can join mind reader and sign up to receive new dispatches via email.</h3>
- <p>Joining by email means you never have to visit this (admittedly beautiful) website ever again. You’ll receive new posts straight in your email inbox. Bookmarks are, optionally, sent in digest to paid subscribers.</p>
- <p>Optionally, once you’ve signed up and confirmed your email address you are able to subscribe to mind reader financially by entering any non $0 AUD amount you wish – you can do this just once, or annually. You are under no obligation to do this! Paid subscribers may opt to receive a digest of bookmarks and a monthly update from me on the state of the world that regular members miss out on.</p>
- <p>If you’re looking to cancel an existing membership or subscription, <%= link_to "please click here", subscriptions_path %>.</p>
+ <h3>Join the counter-hegemony</h3>
+ <p>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 <strong>free</strong>:</p>
+ <ul>
+ <li>☛ Direct dispatches: fresh analysis straight to your inbox.</li>
+ <li>☛ Community dialogue: exchange ideas and correspond directly about posts.</li>
+ <li>☛ Weekly digests: curated collections of essential reading and resources.</li>
+ <li>☛ A place to support my work by becoming a financial member (free, annual and lifetime tiers — pay what you want).</li>
+ </ul>
+ <p>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!</p>
<%= image_tag "aidan_arrow.svg", class: "aidans_arrow" %>
- <p>To get started with mind reader membership – <em>always free</em> – first register for an account on this website. Don’t worry, I’ll guide you through each step of the process! Just click on that button below:</p>
+ <p>To get started with mind reader membership – <em>always free</em> – 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:</p>
<p><%= link_to "Get started, free forever", new_user_registration_path, class: "button" %> <%= link_to "Log back in", new_user_session_path, class: "button" %></p>
- <p><em>You can subscribe, unsubscribe, pay, cancel, and never hear from me again without ever contacting a human – note, though, if you pay for the service account deletion is manual to ensure all your details are securely erased. You can always one-click opt-out of communication and services.</em></p>
+ <p>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 %>.</p>
</div>
</div>
<div class="post">
<div class="container">
+ <% if !current_user %>
+ <p class="lead"><%= @promo_strings.sample %> <%= link_to "Start right now", join_path %>.</p>
+ <% end %>
<%= raw @rendered_content %>
</div>
</div>
<div class="container" id="bottom">
<%= render partial: "layouts/home_post_links" %>
-</div>
\ No newline at end of file
+</div>