iankelling.org
/
git
/
iankelling.org
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bunch of updates
[iankelling.org]
/
b.rb
diff --git
a/b.rb
b/b.rb
index 2dc8ad8ad7d9287dda1106a67b66544642663cd0..4bd8f96d0c187dbe365073f90ccad5a9b544c5e4 100644
(file)
--- a/
b.rb
+++ b/
b.rb
@@
-86,7
+86,7
@@
EOF
<h3><a href="/">iankelling.org</a>#{o[:header]}</h3>
</header>
<div class="main-content-stripe">
<h3><a href="/">iankelling.org</a>#{o[:header]}</h3>
</header>
<div class="main-content-stripe">
- <div class="
content
">
+ <div class="
#{o[:prose] ? "prose" : "content"}
">
#{content}
</div>
</div>
#{content}
</div>
</div>
@@
-125,15
+125,14
@@
EOF
end
def comment_html(comment, date)
end
def comment_html(comment, date)
- inner = Redcarpet::Markdown.new(Redcarpet::Render::Safe, fenced_code_blocks: true).render(<<EOF)
-#{comment}
-<span class="comment-date">#{Time.at(date).strftime("%b %-d '%y")}</span>
-EOF
# I tried putting the time, %I:%M %p UTC, but it looks kinda
# clunky, going against my simple theme.
# I tried putting the time, %I:%M %p UTC, but it looks kinda
# clunky, going against my simple theme.
+ user_input = Redcarpet::Markdown.new(Redcarpet::Render::Safe,
+ fenced_code_blocks: true).render(comment)
<<EOF
<div class="comment">
<<EOF
<div class="comment">
- #{inner}
+ #{user_input}
+ <p class="comment-date">#{Time.at(date).strftime("%b %-d '%y")}</p>
</div>
EOF
end
</div>
EOF
end
@@
-221,11
+220,11
@@
EOF
comment_html("Note: there #{text} pending approval.", NOW)
end
com_section = <<-EOF
comment_html("Note: there #{text} pending approval.", NOW)
end
com_section = <<-EOF
- <form
class="comment"
action="/cgi/comment" method="post">
- <input class="misc" type="text" name="url">
+ <form action="/cgi/comment" method="post">
+ <input class="misc
-comment-input
" type="text" name="url">
<input name="goto" type="hidden" value="#{rel_path}">
<input name="goto" type="hidden" value="#{rel_path}">
- <textarea rows="10" name="comment"
placeholder="markdown"
maxlength="1000"></textarea>
- <input type="submit" value="
Leave a comment
">
+ <textarea rows="10" name="comment" maxlength="1000"></textarea>
+ <input type="submit" value="
Add a comment (markdown works)
">
</form>
<div id="comments">
#{com_list}
</form>
<div id="comments">
#{com_list}
@@
-268,6
+267,11
@@
EOF
fskel(rel_path, title, page_html,
header: header_rel,
footer: footer_extra,
fskel(rel_path, title, page_html,
header: header_rel,
footer: footer_extra,
+ # We call the main content prose because it can contain
+ # code, so we want to left justify it, so we dont have
+ # to cram all the code into the middle and can use
+ # a wider area.
+ prose: true,
comments: com_section,
description: description)
url="#{DURL}#{rel_path}"
comments: com_section,
description: description)
url="#{DURL}#{rel_path}"