For blogs, move to left justified, make code sections expand over the
whole screen so they aren't cut off. And on mobile, make them scrollable
because otherwise they overflow the body and i dunno how to fix that.
Fix email error 500 error on comment submission, hidden form not being
hidden. Change main content background to be darker so code sections
stand out more so you notice you can scroll them.
Change comment box to be more standard white with no text in it so its
easier to use.
/resume.md
/_site/resume.html
/resume.md
/_site/resume.html
Some programs need to be in PATH:
https://iankelling.org/git/?p=basic-https-conf;a=summary
Some programs need to be in PATH:
https://iankelling.org/git/?p=basic-https-conf;a=summary
-https://iankelling.org/git/?p=acme-tiny-wrapper;a=summary
chost from
https://iankelling.org/git/?p=fai;a=summary
chost from
https://iankelling.org/git/?p=fai;a=summary
require 'fileutils'
require 'time'
require 'sqlite3'
require 'fileutils'
require 'time'
require 'sqlite3'
Dir.chdir(File.join(File.dirname(__FILE__), '..'))
require '../b'
Dir.chdir(File.join(File.dirname(__FILE__), '..'))
require '../b'
<p>#{captcha_q}</p>
<form action="/cgi/comment" method="post">
<p>#{captcha_q}</p>
<form action="/cgi/comment" method="post">
- <input class="misc" type="text" name="url">
+ <input class="misc-comment-input" type="text" name="url">
<input name="goto" type="hidden" value="#{GOTO}">
<input name="question" type="hidden" value="#{captcha_q}">
<input name="answer">
<input name="goto" type="hidden" value="#{GOTO}">
<input name="question" type="hidden" value="#{captcha_q}">
<input name="answer">
if new_count == 1
require 'net/smtp'
if new_count == 1
require 'net/smtp'
- def send_email(opts={})
- opts[:to] ||= 'root'
- opts[:server] ||= 'localhost'
- opts[:from] ||= 'root'
- opts[:from_alias] ||= 'root'
- opts[:subject] ||= "test subject"
- opts[:body] ||= ""
-
- msg = <<END_OF_MESSAGE
-From: #{opts[:from_alias]} <#{opts[:from]}>
-To: <#{opts[:to]}>
-Subject: #{opts[:subject]}
-
-#{opts[:body]}
+ to = 'root@' + FQDN
+ from = 'www-data@' + FQDN
+ server = 'localhost'
+ msg = <<END_OF_MESSAGE
+From: h <#{from}>
+To: <#{to}>
+Subject: "new comment on #{FQDN}"
+
+empty body
-
- Net::SMTP.start(opts[:server]) do |smtp|
- smtp.send_message msg, opts[:from], opts[:to]
- end
+ Net::SMTP.start(server) do |smtp|
+ smtp.send_message msg, from, to
- send_email :subject => "new comment on #{DN}"
<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="#{o[:prose] ? "prose" : "content"}">
<form action="/cgi/comment" method="post">
<input class="misc-comment-input" type="text" name="url">
<input name="goto" type="hidden" value="#{rel_path}">
<form action="/cgi/comment" method="post">
<input class="misc-comment-input" type="text" name="url">
<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}
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}"
asymtotic = ['asymtotic', '']
asymtotic_modified = ['bound', 'run time', 'growth', 'growth rate']
commonly_modified = ['complexity', 'efficiency', 'growth rate']
asymtotic = ['asymtotic', '']
asymtotic_modified = ['bound', 'run time', 'growth', 'growth rate']
commonly_modified = ['complexity', 'efficiency', 'growth rate']
-common_modifiers = ['computational', 'big oh', 'algorithmic', 'time',
- 'asymtotic', '']
+common_modifiers = ['computational', 'big oh', 'algorithmic', 'time', 'asymtotic', '']
unmodified = ['big oh', 'order', 'order of complexity', 'time']
O = bnf_expand([asymtotic, asymtotic_modified],
[common_modifiers, commonly_modified], [unmodified])
unmodified = ['big oh', 'order', 'order of complexity', 'time']
O = bnf_expand([asymtotic, asymtotic_modified],
[common_modifiers, commonly_modified], [unmodified])
// a few minor things are in main.css and gitweb.css
// a few minor things are in main.css and gitweb.css
-$comment-background-color: #ebeae4;
+$comment-background-color: #d9d8d1;
$comment-br-color: #c4c3bc; // a darkish color, black is too striking
$comment-date-color: #555; // a bit lighter for less emphasis
$comment-br-color: #c4c3bc; // a darkish color, black is too striking
$comment-date-color: #555; // a bit lighter for less emphasis
-$content-color: #f6f6f0; // from gitweb.
+$content-color: #ebeae4;
$inline-code-background-color: #fff;
$link-color: #0645ad;
$link-visited-color: #0b0080;
$inline-code-background-color: #fff;
$link-color: #0645ad;
$link-visited-color: #0b0080;
padding-bottom: 30px;
padding-top: 30px;
padding-bottom: 30px;
padding-top: 30px;
- textarea {
- background-color: $content-color; // go with theme, avoid bright white.
- }
- textarea:active,
- textarea:focus {
// color textarea when selected, and for submit button,
// without 3d effect, we need a different color.
background: $text-input-color;
// color textarea when selected, and for submit button,
// without 3d effect, we need a different color.
background: $text-input-color;
li {
// to compensate for no bullet points, we need extra space between list items
// in the case of small screens where they wrap.
li {
// to compensate for no bullet points, we need extra space between list items
// in the case of small screens where they wrap.
.comment-section,
.content,
.comment-section,
.content,
.page_header,
footer {
// auto does the centering magic
margin-bottom: 0;
.page_header,
footer {
// auto does the centering magic
margin-bottom: 0;
margin-right: auto;
margin-top: 0;
margin-right: auto;
margin-top: 0;
+ padding-left: 16px;
+ padding-right: 16px;
+}
+
+.content,
+.prose,
+.page_header,
+footer {
+ // auto on left +right does the centering magic
+ margin-left: auto;
+}
+
+
+.comment-section,
+.content,
+.prose :not(.highlight),
+.page_header,
+footer {
max-width: $main-column-max-width; // default too wide
max-width: $main-column-max-width; // default too wide
- padding-left: 30px;
- padding-right: 30px;
code {
background-color: $inline-code-background-color;
// defaults are squished next to the borders of the color change
code {
background-color: $inline-code-background-color;
// defaults are squished next to the borders of the color change
+// for code, scroll right instead of overflowing the body
+.highlight {
+ overflow: auto;
+}
+
pre {
// defaults are squished next to the borders of the color change
padding: 6px 8px;
pre {
// defaults are squished next to the borders of the color change
padding: 6px 8px;
a:visited {
color: $link-visited-color;
}
a:visited {
color: $link-visited-color;
}
shell="ssh -oStrictHostKeyChecking=no $(chost iankelling.org)"
while [[ $1 ]]; do
case $1 in
shell="ssh -oStrictHostKeyChecking=no $(chost iankelling.org)"
while [[ $1 ]]; do
case $1 in
-l) shell= ; shift ;; # -l for local
esac
done
-l) shell= ; shift ;; # -l for local
esac
done