]> gitweb.mndrdr.org Git - arelpe.git/commitdiff
Major improvements to linked content
authorAidan Cornelius-Bell <[email protected]>
Thu, 9 Jan 2025 04:08:11 +0000 (14:38 +1030)
committerAidan Cornelius-Bell <[email protected]>
Thu, 9 Jan 2025 04:08:11 +0000 (14:38 +1030)
app/models/post.rb
app/views/pubview/post.html.erb

index b76a935405affc90ac0f143e0b8fe3e117620727..ce70ad27adacf17f12628aa03aa36abe6e45c93e 100644 (file)
@@ -49,7 +49,13 @@ class Post < ApplicationRecord
   end
 
   def rendered_content
-    MarkdownRenderer.render(content)
+    if self.bookmark?
+      content = "#{self.content}[1]\n\n\n[1] #{self.url}"
+      #raise content
+      MarkdownRenderer.render(self.content)
+    else
+      MarkdownRenderer.render(self.content)
+    end
   end
 
   def format_tags
index 67a37db0474a404f45755450ae98299ce8a7b0e4..07ac9b9d7af89a3edb6e490933adc11a90d1a862 100644 (file)
 <div class="container" id="bottom">
   <%= render partial: "layouts/home_post_links" %>
 </div>
+<% else %>
+<style>
+.side-note {
+    margin-top: -5.35em !important;
+}
+</style>
 <% end %>
 
 <script>