summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ImANerdRules.rb11
-rw-r--r--header5
2 files changed, 11 insertions, 5 deletions
diff --git a/bin/ImANerdRules.rb b/bin/ImANerdRules.rb
index 2443f51..5d74d04 100755
--- a/bin/ImANerdRules.rb
+++ b/bin/ImANerdRules.rb
@@ -6,10 +6,13 @@ require 'redcarpet'
module ImANerdRules
class CustomRender < Redcarpet::Render::HTML
- def header(text, header_level)
- text =~ /([\d+\.?]+)/
- "<h#{header_level} id=\"hdr#{$1}\">#{text}</h#{header_level}>"
- end
+ def header(text, header_level)
+ text =~ /([\d+\.?]+)/
+ "<h#{header_level} id=\"hdr#{$1}\">#{text}</h#{header_level}>"
+ end
+ def image link, title, alt_text
+ "<a data-fancybox='gallery' data-caption='#{title}' href='#{link}'><img src='#{link.gsub(/.png/,'_th.png')}'></a>"
+ end
end
class Node
diff --git a/header b/header
index 98acda1..95032e1 100644
--- a/header
+++ b/header
@@ -1,6 +1,9 @@
<html>
<header>
- <link href="retro.css" media="screen, projection" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <link href="retro.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.css" />
+ <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js"></script>
</header>
<body>