]> gitweb.mndrdr.org Git - arelpe.git/commitdiff
Exclude pages from rendering with sidebar footnotes
authorAidan Cornelius-Bell <[email protected]>
Wed, 8 Jan 2025 05:43:46 +0000 (16:13 +1030)
committerAidan Cornelius-Bell <[email protected]>
Wed, 8 Jan 2025 05:43:46 +0000 (16:13 +1030)
app/assets/stylesheets/application.css
app/views/pubview/index.html.erb
app/views/pubview/post.html.erb
app/views/pubview/show_public.html.erb

index e21421a37ed36e6aaf3f9174274bbb48d8fbd8c0..008a172f7f9101389ced813f0f5d1684c0cd48f8 100644 (file)
@@ -327,10 +327,18 @@ footer p {
 
 .container .lead {
     color: var(--code-text);
-    max-width: 80%;
     margin: auto;
 }
 
+.promo {
+    border: 1px solid var(--code-text);
+    border-radius: 3px;
+    padding: 0.55em 1em;
+    margin: 1em auto;
+    background: var(--body-bg);
+    max-width: 80%;
+}
+
 .lead-button {
     text-decoration: none;
     border: 1px dashed var(--link-color);
@@ -709,6 +717,10 @@ ul .post-item a:visited {
     .toggle-icon {
         transition: transform 0.2s ease;
     }
+
+    .button {
+        margin-bottom: 4px;
+    }
 }
 
 /* Margin Notes/Footnotes */
@@ -721,6 +733,13 @@ ul .post-item a:visited {
         margin: 0 auto;
     }
 
+    .page .post-grid {
+        display: initial;
+    }
+    .page .main-content {
+        grid-column: 0;
+    }
+
     .main-content {
         grid-column: 1;
         position: relative;
index dc1e8814a46a6eff7c8563ee738f9f4229fca3ec..9e02b68aabd81522fb019aa43641af1caa73df6f 100644 (file)
@@ -8,15 +8,14 @@
 
 <%= 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.group_by { |item| item.respond_to?(:published_at) ? item.published_at&.to_date : item.created_at.to_date }.each do |date, items| %>
       <li class="date-heading">
         From <%= date&.strftime('%B %e, %Y') %>:
+        <% if !current_user %>
+            <em><%= @promo_strings.sample %> <%= link_to "Start right now", join_path %>.</em>
+        <% end %>
       </li>
       <% items.each do |item| %>
         <li class="<%= item.post_type %>-item<%= if item.short_dispatch? then " thought-item" end %>">
index 37d1244c16896f8dcb4a8584c5ae5bf782d25d7e..d338a1dc6e3e315f784d369dcd1b4a220d9ff6a3 100644 (file)
@@ -34,7 +34,9 @@
 <div class="post">
   <div class="container">
     <% if !current_user %>
-        <p class="lead"><%= @promo_strings.sample %> <%= link_to "Start right now!", join_path, class: "lead-button" %></p>
+        <div class="promo">
+            <p class="lead"><%= @promo_strings.sample %> <%= link_to "Start right now!", join_path, class: "lead-button" %></p>
+        </div>
     <% end %>
        <%= raw @rendered_content %>
 
index c27f80f574080f60a39e0c7721f29b41ca1db5d5..0cfc16578515ed2fdbe804d58c71cc942ff1ccd5 100644 (file)
@@ -10,7 +10,7 @@
 <%= render partial: "layouts/navigation_buttons" %>
 
 <div class="post">
-  <div class="container">
+  <div class="container page">
     <%= MarkdownRenderer.render(@page.content).html_safe %>
   </div>
 </div>