You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.7 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<% title = request.path_info[1..-1].capitalize %>
<% title = title.slice(0..(title.index('/') - 1)) %>
<head>
<title><%= title %></title>
<meta name="description" content="broken-moon.net - <%= title %>" />
<meta name="keywords" content="<%= title.downcase %>" />
<meta property="og:url" content="http://broken-moon.net/<%= title.downcase %>" />
<meta property="og:title" content="<%= title %>" />
<%= erb :headerBoilerplate %>
</head>
<body>
<%= erb :asidemenu %>
<div class="content">
<%= erb :blogbar, locals: {title: title} %>
<div class="article">
<% if File.exist?("." + request.path_info) && request.path_info.end_with?(".erb") %>
<%= ERB.new(File.read("." + request.path_info)).result(binding) %>
<% elsif File.exist?("." + request.path_info + ".erb") %>
<%= ERB.new(File.read("." + request.path_info + ".erb")).result(binding) %>
<% elsif File.exist?("." + request.path_info) && request.path_info.end_with?(".md") %>
<%= markdown(File.read("." + request.path_info)) %>
<% elsif File.exist?("." + request.path_info + ".md") %>
<%= markdown(File.read("." + request.path_info + ".md")) %>
<% end %>
<% if File.exist?("." + request.path_info + ".meta") %>
<div class="articledate">
<%= File.read("." + request.path_info + ".meta") %>
</div>
<% elsif File.exist?("." + request.path_info + ".erb.meta") %>
<div class="articledate">
<%= File.read("." + request.path_info + ".erb.meta") %>
</div>
<% elsif File.exist?("." + request.path_info + ".md.meta") %>
<div class="articledate">
<%= File.read("." + request.path_info + ".md.meta") %>
</div>
<% end %>
</div>
</div>
<%= erb :bottom %>
</body>