summaryrefslogtreecommitdiff
path: root/tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/index.atom.erb12
-rw-r--r--tmpl/index.md.erb6
-rw-r--r--tmpl/index.md.erb.bak12
-rw-r--r--tmpl/page.atom.erb11
-rw-r--r--tmpl/page.html.erb35
5 files changed, 76 insertions, 0 deletions
diff --git a/tmpl/index.atom.erb b/tmpl/index.atom.erb
new file mode 100644
index 0000000..390c02a
--- /dev/null
+++ b/tmpl/index.atom.erb
@@ -0,0 +1,12 @@
+<feed xmlns="http://www.w3.org/2005/Atom">
+
+ <title><%= atom_title %></title>
+ <link rel="self" type="application/atom+xml" href="./index.atom"/>
+ <link rel="alternate" type="text/html" href="./"/>
+ <link rel="alternate" type="text/markdown" href="./index.md"/>
+ <updated><%= index_pages_leaves.map{|p|p.atom_updated}.sort.last.to_datetime.rfc3339 %></updated>
+ <author><%= atom_author.atom %></author>
+ <id><%= url %></id>
+
+ <% index_pages_leaves.sort_by{|p|p.atom_updated}.reverse.each do |page| %><%= page.atom %><% end %>
+</feed>
diff --git a/tmpl/index.md.erb b/tmpl/index.md.erb
new file mode 100644
index 0000000..2febcb5
--- /dev/null
+++ b/tmpl/index.md.erb
@@ -0,0 +1,6 @@
+---
+title: "<%= atom_title %>"
+class: "index"
+---
+
+<%= index_link(url, 1) %>
diff --git a/tmpl/index.md.erb.bak b/tmpl/index.md.erb.bak
new file mode 100644
index 0000000..a3ec547
--- /dev/null
+++ b/tmpl/index.md.erb.bak
@@ -0,0 +1,12 @@
+---
+title: "<%= @title %>"
+class: "index"
+---
+
+<% @sections.keys.sort.each do |path| %>
+<% unless path.empty? %>## [<%= @sections[path]['head'] %>](<%= path %>)<% end %>
+
+<% @sections[path]['body'].sort_by{|a|a.published}.reverse.each do |a| %>
+ * <span><a <% if a.is_a?(ExternPage) %>class="external" <% end %>href="<%= @url.route_to(a.url) %>" title="Published on <%= a.published.strftime('%Y-%m-%d') %><% if a.updated != a.published %> (updated on<%= a.updated.strftime('%Y-%m-%d') %>)<% end %>"><%= a.title %></a></span><span><% a.tags.each do |t| %><%= t.html %><% end %></span><% end %>
+
+<% end %>
diff --git a/tmpl/page.atom.erb b/tmpl/page.atom.erb
new file mode 100644
index 0000000..e4957e3
--- /dev/null
+++ b/tmpl/page.atom.erb
@@ -0,0 +1,11 @@
+<% require 'siteutil' %><entry xmlns="http://www.w3.org/2005/Atom">
+ <link rel="alternate" type="text/html" href="<%= url %>"/>
+ <id><%= url %></id>
+ <updated><%= atom_updated.to_datetime.rfc3339 %></updated>
+ <published><%= atom_published.to_datetime.rfc3339 %></published>
+ <title><%= atom_title %></title>
+ <author><%= atom_author.atom %></author>
+ <% atom_categories.each do |c| %><%= c.atom %><% end %>
+ <% if atom_content %><content type="html"><%= Sitegen::html_escape(atom_content) %></content><% end %>
+ <% if atom_rights %><rights type="html"><%= Sitegen::html_escape(atom_rights) %></rights><% end %>
+</entry>
diff --git a/tmpl/page.html.erb b/tmpl/page.html.erb
new file mode 100644
index 0000000..5dc95ea
--- /dev/null
+++ b/tmpl/page.html.erb
@@ -0,0 +1,35 @@
+<% require 'siteutil' %><!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title><%= atom_title %> — AndrewDM</title>
+ <link rel="stylesheet" href="/main.css">
+ <link rel="alternate" type="application/atom+xml" href="/index.atom" />
+ <%= html_head_extra %>
+ </head>
+ <body class="<%= html_class %>">
+ <header>
+ <h1 class=breadcrumbs><%= Sitegen::breadcrumbs(url) %></h1>
+ <nav>
+ <ul>
+ <li><a href="/">Projects</a>
+ <li><a href="/ChangeLog.html"><abbr title="Blog">Blahg</abbr></a>
+ <li><a href="/Andrew.html">Andrew</a>
+ <li>
+ <form method="GET" action="/search.html">
+ <input type=search name="s" placeholder="Search" /><input type=submit value="🔍" />
+ </form>
+ </ul>
+ </nav>
+ </header>
+ <article>
+ <% if atom_categories.count > 0 %><p>Tags: <% atom_categories.each do |t| %><%= t.html %><% end %></p><% end %>
+ <%= atom_content %>
+ </article>
+ <footer>
+ <%= atom_rights %>
+ <% if local_srcurl %><p>Page source: <a href="<%= url.route_to(local_srcurl) %>"><%= File.basename(local_srcurl.to_s) %></a></p><% end %>
+ <p>Website source: <a href="https://git.andrewdm.me/www.git">www.git</a></p>
+ </footer>
+ </body>
+</html>