|
|
|
@ -14,6 +14,7 @@
|
|
|
|
|
<%= erb :asidemenu %>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<%= erb :blogbar, locals: {title: title} %>
|
|
|
|
|
<% addtags = { :rbe => { html_open: "\<%=", html_close: "%\>" }, :rb => { html_open: "\<%", html_close: "%\>" } } %>
|
|
|
|
|
<div class="article">
|
|
|
|
|
<% if File.exist?("." + request.path_info) && request.path_info.end_with?(".erb") %>
|
|
|
|
|
<%= ERB.new(File.read("." + request.path_info)).result(binding) %>
|
|
|
|
@ -23,6 +24,10 @@
|
|
|
|
|
<%= markdown(File.read("." + request.path_info)) %>
|
|
|
|
|
<% elsif File.exist?("." + request.path_info + ".md") %>
|
|
|
|
|
<%= markdown(File.read("." + request.path_info + ".md")) %>
|
|
|
|
|
<% elsif File.exist?("." + request.path_info) && request.path_info.end_with?(".bb") %>
|
|
|
|
|
<%= ERB.new(File.read("." + request.path_info).gsub("\n[rb]", '[rb]').bbcode_to_html(false, addtags) + "<br>").result(binding) %>
|
|
|
|
|
<% elsif File.exist?("." + request.path_info + ".bb") %>
|
|
|
|
|
<%= ERB.new(File.read("." + request.path_info + ".bb").gsub("\n[rb]", '[rb]').bbcode_to_html(false, addtags)+ "<br>").result(binding) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if File.exist?("." + request.path_info + ".meta") %>
|
|
|
|
|
<div class="articledate">
|
|
|
|
@ -36,6 +41,14 @@
|
|
|
|
|
<div class="articledate">
|
|
|
|
|
<%= File.read("." + request.path_info + ".md.meta") %>
|
|
|
|
|
</div>
|
|
|
|
|
<% elsif File.exist?("." + request.path_info + ".bb.meta") %>
|
|
|
|
|
<div class="articledate">
|
|
|
|
|
<%= File.read("." + request.path_info + ".bb.meta") %>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="articledate">
|
|
|
|
|
1970.01.01
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|